地图依赖重构

This commit is contained in:
wangcongtao
2020-12-13 11:04:44 +08:00
parent 6fee5deaca
commit 564b1356a1
59 changed files with 1033 additions and 626 deletions

View File

@@ -1,18 +1,11 @@
package com.mogo.module.machine.vision;
import android.annotation.TargetApi;
import android.content.Context;
import android.util.AttributeSet;
import android.view.View;
import android.view.ViewGroup;
import android.widget.FrameLayout;
import androidx.annotation.Nullable;
import com.mogo.map.IMogoMapView;
import com.mogo.map.MogoBaseMapView;
import com.mogo.map.MogoMap;
import com.mogo.map.impl.custom.CustomMapView;
import com.mogo.utils.logger.Logger;
public
@@ -39,33 +32,7 @@ class MachineVisionMapView extends MogoBaseMapView {
}
@Override
protected void addDleMaps() {
IMogoMapView machineMapView = new CustomMapView().create( getContext() );
if ( machineMapView != null ) {
final View mapView = machineMapView.getMapView();
if ( mapView != null ) {
addView( mapView, new FrameLayout.LayoutParams( ViewGroup.LayoutParams.MATCH_PARENT, ViewGroup.LayoutParams.MATCH_PARENT ) );
} else {
Logger.e( TAG, "create MapView instance failed." );
}
} else {
Logger.e( TAG, "create IMogoMapView instance failed." );
}
mMapView = machineMapView;
MogoMap.getInstance().init( getContext(), mMapView.getMap() );
onCreate( null );
postDelayed( ()->{
getMap().getUIController().showMyLocation( true );
}, 1000 );
}
@Override
public void display2DMap( boolean invokeCreateAuto, boolean invokeResumeAuto ) {
}
@Override
public void displayVRMap( boolean invokeCreateAuto, boolean invokeResumeAuto ) {
protected void addMapView( Context context ) {
Logger.d(TAG, "addMapView");
}
}