绘制每秒一次的车辆

This commit is contained in:
wangcongtao
2020-10-28 14:31:12 +08:00
parent 9da8c1fdee
commit 5385199493
20 changed files with 566 additions and 77 deletions

View File

@@ -55,7 +55,7 @@ dependencies {
implementation project(':foudations:mogo-commons')
}
implementation 'com.zhidaoauto.machine:map:1.0.0-online-19'
implementation 'com.zhidaoauto.machine:map:1.0.0-online-21'
}
apply from: new File(rootProject.rootDir, "gradle/upload.gradle").toString()

View File

@@ -68,7 +68,7 @@ public class AMapViewWrapper implements IMogoMapView, IMogoMapUIController, Loca
private float mDefaultZoomLevel = 16.0f;
private final CarCursorOption DEFAULT_OPTION = new CarCursorOption.Builder()
.carCursorRes( R.drawable.map_api_ic_current_location2 )
.carCursorRes( R.drawable.map_custom_ic_current_location2 )
.naviCursorRes( R.drawable.ic_amap_navi_cursor )
.build();
private CarCursorOption mCarCursorOption = DEFAULT_OPTION;

View File

@@ -23,12 +23,14 @@ public class CustomMapView implements IMogoMapViewCreator {
@Override
public IMogoMapView create( Context context ) {
MapAutoApi.INSTANCE.init( context, MapParams.Companion.init().setDebugMode( true )
.setCoordinateType( MapParams.COORDINATETYPE_GCJ02 )
.setPerspectiveMode( MapParams.MAP_PERSPECTIVE_2D )
.setZoom( 16 )
.setPointToCenter( 0.5f, 0.5f )
.setStyleMode( MapParams.MAP_STYLE_VR ) );
if ( mapView == null ) {
MapAutoApi.INSTANCE.init( context, MapParams.Companion.init().setDebugMode( false )
.setCoordinateType( MapParams.COORDINATETYPE_GCJ02 )
.setPerspectiveMode( MapParams.MAP_PERSPECTIVE_2D )
.setZoom( 16 )
.setPointToCenter( 0.5f, 0.5f )
.setStyleMode( MapParams.MAP_STYLE_VR ) );
}
MapAutoView mapAutoView = new MapAutoView( context );
mapView = new AMapViewWrapper( mapAutoView );
return mapView;

Binary file not shown.

After

Width:  |  Height:  |  Size: 46 KiB

View File

@@ -95,6 +95,16 @@ public class MogoMapView extends MogoBaseMapView implements ILifeCycle {
mCustomMapView.getMapView().setVisibility( View.VISIBLE );
mAMapView.onPause();
mAMapView.getMapView().setVisibility( View.GONE );
post( new Runnable() {
@Override
public void run() {
try {
mAMapView.getMap().getUIController().showMyLocation( true );
} catch ( Exception e ) {
e.printStackTrace();
}
}
} );
}
public boolean isVrMode() {