@@ -1,5 +1,6 @@
package com.mogo.map ;
import static com.mogo.eagle.core.utilcode.mogo.logger.scene.SceneConstant.M_MAP ;
import static com.mogo.map.uicontroller.VisualAngleMode.MAP_STYLE_VR_ANGLE_300 ;
import static com.mogo.map.uicontroller.VisualAngleMode.MAP_STYLE_VR_ANGLE_CROSS ;
import static com.mogo.map.uicontroller.VisualAngleMode.MAP_STYLE_VR_ANGLE_TOP ;
@@ -107,16 +108,12 @@ public class AMapViewWrapper implements IMogoMapView,
private EnumMapUI mCurrentUI = EnumMapUI . MAP_STYLE_NIGHT_VR ;
private VisualAngleMode mVisualAngleMode = MODE_MEDIUM_SIGHT ;
private float mDefaultZoomLevel = 16 . 0f ;
private boolean mIsLightStyle = false ;
private boolean mMapLoaded = false ;
private boolean mIsFirstLocated = true ;
private boolean mIsDelayed = false ;
private volatile String mRoadId = null ;
public AMapViewWrapper ( MapAutoView mMapView ) {
CallerLogger . INSTANCE . i ( TAG , " autoop--AMapViewWrapper: init " ) ;
CallerLogger . INSTANCE . i ( M_MAP + TAG, " autoop--AMapViewWrapper: init " ) ;
this . mMapView = mMapView ;
initViews ( ) ;
initListeners ( ) ;
@@ -124,6 +121,28 @@ public class AMapViewWrapper implements IMogoMapView,
}
private void initViews ( ) {
// 初始化首次地图进入的时候的样式, MapAutoApi.INSTANCE.init(context, mapParams);将影响这里的数据
int mapStyle = MapAutoApi . INSTANCE . getMapParams ( ) . getStyleMode ( ) ;
switch ( mapStyle ) {
case MapAutoApi . MAP_STYLE_DAY :
mCurrentUI = EnumMapUI . MAP_STYLE_DAY ;
break ;
case MapAutoApi . MAP_STYLE_DAY_VR :
mCurrentUI = EnumMapUI . MAP_STYLE_DAY_VR ;
break ;
case MapAutoApi . MAP_STYLE_DAY_NAV :
mCurrentUI = EnumMapUI . MAP_STYLE_DAY_NAV ;
break ;
case MapAutoApi . MAP_STYLE_NIGHT :
mCurrentUI = EnumMapUI . MAP_STYLE_NIGHT ;
break ;
case MapAutoApi . MAP_STYLE_NIGHT_VR :
mCurrentUI = EnumMapUI . MAP_STYLE_NIGHT_VR ;
break ;
case MapAutoApi . MAP_STYLE_NIGHT_NAV :
mCurrentUI = EnumMapUI . MAP_STYLE_NIGHT_NAV ;
break ;
}
}
@@ -158,17 +177,17 @@ public class AMapViewWrapper implements IMogoMapView,
mMapView . setOnMapStyleListener ( this ) ;
mMapView . setOnMapViewVisualAngleChangeListener ( this ) ;
mMapView . setOnRoadInfoListener ( this , 1 ) ;
CallerLogger . INSTANCE . d ( TAG , " styleop - initListeners - setOnMapStyleListener - view " + mMapView ) ;
CallerLogger . INSTANCE . d ( M_MAP + TAG, " styleop - initListeners - setOnMapStyleListener - view " + mMapView ) ;
}
@Override
public void onRoadIdInfo ( @androidx.annotation.Nullable String roadId ) {
if ( roadId ! = null & & ! TextUtils . isEmpty ( roadId ) ) {
CallerLogger . INSTANCE . d ( TAG , " onRoadIdInfo:: " + roadId ) ;
CallerLogger . INSTANCE . d ( M_MAP + TAG, " onRoadIdInfo:: " + roadId ) ;
CallerMapRoadListenerManager . INSTANCE . invokeListenersOnRoadIdGet ( roadId ) ;
} else {
CallerLogger . INSTANCE . d ( TAG , " onRoadIdInfo::null " ) ;
CallerLogger . INSTANCE . d ( M_MAP + TAG, " onRoadIdInfo::null " ) ;
}
}
@@ -186,27 +205,27 @@ public class AMapViewWrapper implements IMogoMapView,
* }
*/
String provider = carLoc . getProvider ( ) ;
CallerLogger . INSTANCE . d ( TAG , " car_loc: " + carLoc + " " ) ;
CallerLogger . INSTANCE . d ( M_MAP + TAG, " car_loc: " + carLoc + " " ) ;
if ( ! MapAutoApi . GPS_FLAG . equals ( provider ) ) {
CallerLogger . INSTANCE . d ( TAG , " convert before: car_loc: {lon: " + carLoc . getLongitude ( ) + " , lat: " + carLoc . getLatitude ( ) + " } " ) ;
CallerLogger . INSTANCE . d ( M_MAP + TAG, " convert before: car_loc: {lon: " + carLoc . getLongitude ( ) + " , lat: " + carLoc . getLatitude ( ) + " } " ) ;
LonLatPoint p = new LonLatPoint ( carLoc . getLongitude ( ) , carLoc . getLatitude ( ) ) ;
p = MapTools . INSTANCE . switchLonLatWGS84 ( p ) ;
carLoc . setLongitude ( p . longitude ) ;
carLoc . setLatitude ( p . latitude ) ;
CallerLogger . INSTANCE . d ( TAG , " convert after: car_loc: {lon: " + carLoc . getLongitude ( ) + " , lat: " + carLoc . getLatitude ( ) + " } " ) ;
CallerLogger . INSTANCE . d ( M_MAP + TAG, " convert after: car_loc: {lon: " + carLoc . getLongitude ( ) + " , lat: " + carLoc . getLatitude ( ) + " } " ) ;
}
CallerLogger . INSTANCE . d ( TAG , " onStopLineInfo:stop_line " + stopLine + " , car_loc:{lon: " + carLoc . getLatitude ( ) + " , lat: " + carLoc . getLongitude ( ) + " } " ) ;
CallerLogger . INSTANCE . d ( M_MAP + TAG, " onStopLineInfo:stop_line " + stopLine + " , car_loc:{lon: " + carLoc . getLatitude ( ) + " , lat: " + carLoc . getLongitude ( ) + " } " ) ;
MapRoadInfo . StopLine stopInfo = convert ( stopLine ) ;
LonLatPoint p1 = points . get ( 0 ) ;
LonLatPoint p2 = points . get ( points . size ( ) - 1 ) ;
double distanceOfCarToStopLine = MapDataApi . INSTANCE . getNearstFromPointToSegment ( carLoc . getLongitude ( ) , carLoc . getLatitude ( ) , p1 . longitude , p1 . latitude , p2 . longitude , p2 . latitude ) * 10_0000 ;
stopInfo . setDistanceOfCarToStopLine ( distanceOfCarToStopLine ) ;
CallerLogger . INSTANCE . d ( TAG , " onStopLineInfo: --- distance: " + distanceOfCarToStopLine ) ;
CallerLogger . INSTANCE . d ( M_MAP + TAG, " onStopLineInfo: --- distance: " + distanceOfCarToStopLine ) ;
CallerMapRoadListenerManager . INSTANCE . invokeListenersOnStopLineGet ( stopInfo ) ;
}
} else {
if ( carLoc ! = null ) {
CallerLogger . INSTANCE . d ( TAG , " onStopLineInfo::null, car_loc:{lon: " + carLoc . getLatitude ( ) + " , lat: " + carLoc . getLongitude ( ) + " } " ) ;
CallerLogger . INSTANCE . d ( M_MAP + TAG, " onStopLineInfo::null, car_loc:{lon: " + carLoc . getLatitude ( ) + " , lat: " + carLoc . getLongitude ( ) + " } " ) ;
}
}
}
@@ -254,7 +273,7 @@ public class AMapViewWrapper implements IMogoMapView,
public void onCreate ( Bundle bundle ) {
if ( mMapView ! = null ) {
mMapView . onCreate ( bundle ) ;
CallerLogger . INSTANCE . d ( TAG , " map onCreate " ) ;
CallerLogger . INSTANCE . d ( M_MAP + TAG, " map onCreate " ) ;
}
}
@@ -262,7 +281,7 @@ public class AMapViewWrapper implements IMogoMapView,
public void onResume ( ) {
if ( mMapView ! = null ) {
mMapView . onResume ( ) ;
CallerLogger . INSTANCE . d ( TAG , " map onResume " ) ;
CallerLogger . INSTANCE . d ( M_MAP + TAG, " map onResume " ) ;
}
}
@@ -270,7 +289,7 @@ public class AMapViewWrapper implements IMogoMapView,
public void onPause ( ) {
if ( mMapView ! = null ) {
mMapView . onPause ( ) ;
CallerLogger . INSTANCE . d ( TAG , " map onPause " ) ;
CallerLogger . INSTANCE . d ( M_MAP + TAG, " map onPause " ) ;
}
}
@@ -284,7 +303,7 @@ public class AMapViewWrapper implements IMogoMapView,
mMapView . setOnMapClickListener ( null ) ;
mMapView . getLocationClient ( ) . unRegisterListener ( this ) ;
mMapView . setOnCameraChangeListener ( null ) ;
CallerLogger . INSTANCE . d ( TAG , " map onDestroy " ) ;
CallerLogger . INSTANCE . d ( M_MAP + TAG, " map onDestroy " ) ;
}
}
@@ -292,7 +311,7 @@ public class AMapViewWrapper implements IMogoMapView,
public void onSaveInstanceState ( Bundle outState ) {
if ( mMapView ! = null ) {
mMapView . onSaveInstanceState ( outState ) ;
CallerLogger . INSTANCE . d ( TAG , " map onSaveInstanceState " ) ;
CallerLogger . INSTANCE . d ( M_MAP + TAG, " map onSaveInstanceState " ) ;
}
}
@@ -306,9 +325,9 @@ public class AMapViewWrapper implements IMogoMapView,
if ( isVrMold ( ) ) {
return MapControlResult . ERROR ;
}
CallerLogger . INSTANCE . d ( TAG , " changeZoom : " + zoom ) ;
CallerLogger . INSTANCE . d ( M_MAP + TAG, " changeZoom : " + zoom ) ;
if ( DebugConfig . isDebug ( ) ) {
CallerLogger . INSTANCE . d ( TAG , Log . getStackTraceString ( new Throwable ( ) ) ) ;
CallerLogger . INSTANCE . d ( M_MAP + TAG, Log . getStackTraceString ( new Throwable ( ) ) ) ;
}
getMap ( ) . changeZoom ( zoom ) ;
return MapControlResult . SUCCESS ;
@@ -322,7 +341,7 @@ public class AMapViewWrapper implements IMogoMapView,
mVisualAngleMode = angelMode ;
if ( angelMode = = MODE_CLOSE_SIGHT ) {
if ( mogoLatLng = = null ) {
CallerLogger . INSTANCE . e ( TAG , " 切换地图近景需要传入要移动的经纬度数据 " ) ;
CallerLogger . INSTANCE . e ( M_MAP + TAG, " 切换地图近景需要传入要移动的经纬度数据 " ) ;
return ;
}
// 近景传入经纬度为点击地图上静态marker经纬度数据, 为GPS坐标点。
@@ -345,7 +364,7 @@ public class AMapViewWrapper implements IMogoMapView,
private boolean checkAMapView ( ) {
if ( mMapView = = null | | mMapView . getMapAutoViewHelper ( ) = = null ) {
CallerLogger . INSTANCE . e ( TAG , " 自研mapView实例为空, 请检查 " ) ;
CallerLogger . INSTANCE . e ( M_MAP + TAG, " 自研mapView实例为空, 请检查 " ) ;
return false ;
}
return true ;
@@ -353,20 +372,20 @@ public class AMapViewWrapper implements IMogoMapView,
@Override
public void moveToCenter ( MogoLatLng latLng , boolean animate ) {
CallerLogger . INSTANCE . d ( TAG , " move to center " + latLng ) ;
CallerLogger . INSTANCE . d ( M_MAP + TAG, " move to center " + latLng ) ;
if ( latLng = = null | | latLng . lat = = 0 . 0d | | latLng . lon = = 0 . 0d ) {
CallerLogger . INSTANCE . e ( TAG , " latlng = null or is illegal " ) ;
CallerLogger . INSTANCE . e ( M_MAP + TAG, " latlng = null or is illegal " ) ;
return ;
}
if ( DebugConfig . isDebug ( ) ) {
CallerLogger . INSTANCE . d ( TAG , Log . getStackTraceString ( new Throwable ( ) ) ) ;
CallerLogger . INSTANCE . d ( M_MAP + TAG, Log . getStackTraceString ( new Throwable ( ) ) ) ;
}
mMapView . getMapAutoViewHelper ( ) . animateCamera ( new LonLatPoint ( latLng . lon , latLng . lat ) ) ;
}
@Override
public void showMyLocation ( boolean visible ) {
CallerLogger . INSTANCE . d ( TAG , " showMyLocation1 " + visible ) ;
CallerLogger . INSTANCE . d ( M_MAP + TAG, " showMyLocation1 " + visible ) ;
// 如果是VR模式
if ( isVrMold ( ) ) {
return ;
@@ -388,7 +407,9 @@ public class AMapViewWrapper implements IMogoMapView,
* @return true-是, false=不是
*/
private boolean isVrMold ( ) {
return mCurrentUI = = EnumMapUI . MAP_STYLE_NIGHT_VR | | mCurrentUI = = EnumMapUI . MAP_STYLE_DAY_VR ;
boolean isVrMode = mCurrentUI = = EnumMapUI . MAP_STYLE_NIGHT_VR | | mCurrentUI = = EnumMapUI . MAP_STYLE_DAY_VR ;
CallerLogger . INSTANCE . d ( M_MAP + TAG , " 是否是VR模式: " + isVrMode ) ;
return isVrMode ;
}
/**
@@ -396,16 +417,18 @@ public class AMapViewWrapper implements IMogoMapView,
*
* @return true-是, false-不是
*/
private boolean isDayMol d ( ) {
return mCurrentUI = = EnumMapUI . MAP_STYLE_DAY_VR
private boolean isDayMode ( ) {
boolean isDayMode = mCurrentUI = = EnumMapUI . MAP_STYLE_DAY_VR
| | mCurrentUI = = EnumMapUI . MAP_STYLE_DAY
| | mCurrentUI = = EnumMapUI . MAP_STYLE_DAY_NAV ;
CallerLogger . INSTANCE . d ( M_MAP + TAG , " 是否是白天模式: " + isDayMode ) ;
return isDayMode ;
}
@Override
public void showMyLocation ( View view ) {
if ( DebugConfig . isDebug ( ) ) {
CallerLogger . INSTANCE . d ( TAG , Log . getStackTraceString ( new Throwable ( ) ) ) ;
CallerLogger . INSTANCE . d ( M_MAP + TAG, Log . getStackTraceString ( new Throwable ( ) ) ) ;
}
if ( checkAMapView ( ) ) {
MyLocationStyle style = mMapView . getMapAutoViewHelper ( ) . getMyLocationStyle ( ) ;
@@ -474,7 +497,7 @@ public class AMapViewWrapper implements IMogoMapView,
if ( isVrMold ( ) ) {
return ;
}
CallerLogger . INSTANCE . d ( TAG , " setPointToCenter x : " + mapCenterX + " y : " + mapCenterY ) ;
CallerLogger . INSTANCE . d ( M_MAP + TAG, " setPointToCenter x : " + mapCenterX + " y : " + mapCenterY ) ;
mMapView . getMapAutoViewHelper ( ) . setPointToCenter ( ( float ) mapCenterX , ( float ) mapCenterY ) ;
}
}
@@ -511,7 +534,7 @@ public class AMapViewWrapper implements IMogoMapView,
if ( checkAMapView ( ) ) {
if ( mMapView . getMapAutoViewHelper ( ) ! = null ) {
mMapView . getMapAutoViewHelper ( ) . setRenderFps ( fps ) ;
CallerLogger . INSTANCE . d ( TAG , " 设置刷新帧率 fps = " + fps ) ;
CallerLogger . INSTANCE . d ( M_MAP + TAG, " 设置刷新帧率 fps = " + fps ) ;
}
}
}
@@ -522,16 +545,16 @@ public class AMapViewWrapper implements IMogoMapView,
return ;
}
if ( isVrMold ( ) ) {
CallerLogger . INSTANCE . w ( TAG , " vr 模式下忽略该设置 " ) ;
CallerLogger . INSTANCE . w ( M_MAP + TAG, " vr 模式下忽略该设置 " ) ;
return ;
}
CallerLogger . INSTANCE . i ( TAG , " showBounds : " + tag + " , " + carPosition . toString ( ) + " , " + bound . toShortString ( ) + " , " + lockCarPosition ) ;
CallerLogger . INSTANCE . i ( M_MAP + TAG, " showBounds : " + M_MAP + TAG + " , " + carPosition . toString ( ) + " , " + bound . toShortString ( ) + " , " + lockCarPosition ) ;
try {
LatLngBounds latLngBounds = MogoMapUtils . getLatLngBounds ( carPosition , lonLats , lockCarPosition ) ;
mMapView . getMapAutoViewHelper ( ) . setCenter ( ObjectUtils . fromMogo ( carPosition ) ) ;
mMapView . getMapAutoViewHelper ( ) . moveCamera ( CameraUpdateFactory . INSTANCE . newLatLngBounds ( latLngBounds , bound . left , bound . right , bound . top , bound . bottom ) ) ;
} catch ( Exception e ) {
CallerLogger . INSTANCE . e ( TAG , " tag : " + tag + " error : " + e ) ;
CallerLogger . INSTANCE . e ( M_MAP + TAG, " M_MAP+TAG : " + M_MAP + TAG + " error : " + e ) ;
}
}
@@ -674,14 +697,14 @@ public class AMapViewWrapper implements IMogoMapView,
if ( ! mIsDelayed ) {
mIsDelayed = true ;
UiThreadHandler . postDelayed ( ( ) - > {
//CallerLogger.INSTANCE.d(TAG, "倒计时结束");
//CallerLogger.INSTANCE.d(M_MAP+ TAG, "倒计时结束");
mIsFirstLocated = false ;
} , 5_000L ) ;
}
} else {
mIsFirstLocated = true ;
mIsDelayed = false ;
CallerLogger . INSTANCE . d ( TAG , " 同步定位: " + GsonUtils . toJson ( location ) ) ;
CallerLogger . INSTANCE . d ( M_MAP + TAG, " 同步定位: " + GsonUtils . toJson ( location ) ) ;
}
}
}
@@ -694,13 +717,13 @@ public class AMapViewWrapper implements IMogoMapView,
@Override
public void onMapInit ( ) {
CallerLogger . INSTANCE . i ( TAG , " autoop--onMapInit: " ) ;
CallerLogger . INSTANCE . i ( M_MAP + TAG, " autoop--onMapInit: " ) ;
MogoMapListenerHandler . getInstance ( ) . onMapLoaded ( ) ;
}
@Override
public void onMapLoaded ( ) {
CallerLogger . INSTANCE . i ( TAG , " autoop--onMapLoaded: " ) ;
CallerLogger . INSTANCE . i ( M_MAP + TAG, " autoop--onMapLoaded: " ) ;
mMapLoaded = true ;
CameraPosition cameraPosition = mMapView . getMapAutoViewHelper ( ) . getCameraPosition ( ) ;
Trace . beginSection ( " timer.onCameraChangeFinish " ) ;
@@ -727,18 +750,18 @@ public class AMapViewWrapper implements IMogoMapView,
@Override
public void onRoadLoaded ( @Nullable String s ) {
CallerLogger . INSTANCE . i ( TAG , " autoop--onMapLoaded: " ) ;
CallerLogger . INSTANCE . i ( M_MAP + TAG, " autoop--onMapLoaded: " ) ;
}
@Override
public void onMapStatusChanged ( int type , int value ) {
//CallerLogger.INSTANCE.i(TAG, "mapop--onMapStatusChanged-: " + type + "," + value);
//CallerLogger.INSTANCE.i(M_MAP+ TAG, "mapop--onMapStatusChanged-: " + type + "," + value);
}
@Override
public void onMapViewVisualAngleChange ( int i ) {
CallerLogger . INSTANCE . d ( TAG , " 地图自动更改视距 currentThread : " + Thread . currentThread ( ) . getName ( ) ) ;
CallerLogger . INSTANCE . d ( M_MAP + TAG, " 地图自动更改视距 currentThread : " + Thread . currentThread ( ) . getName ( ) ) ;
mVisualAngleMode = getVisualAngleMode ( i ) ;
MogoMapListenerHandler . getInstance ( ) . onMapVisualAngleChanged ( mVisualAngleMode ) ;
}
@@ -770,12 +793,12 @@ public class AMapViewWrapper implements IMogoMapView,
@Override
public void onCameraChange ( int type , int value ) {
//CallerLogger.INSTANCE.i(TAG, "mapop--onCameraChange-: " + type + "," + value);
//CallerLogger.INSTANCE.i(M_MAP+ TAG, "mapop--onCameraChange-: " + type + "," + value);
}
@Override
public void onCameraChangeFinish ( @Nullable CameraPosition cameraPosition ) {
// CallerLogger.INSTANCE.i( TAG, "mapop--onCameraChangeFinish-: " + cameraPosition + "cost:" + ( System.currentTimeMillis() - startTime ) );
// CallerLogger.INSTANCE.i( M_MAP+ TAG, "mapop--onCameraChangeFinish-: " + cameraPosition + "cost:" + ( System.currentTimeMillis() - startTime ) );
if ( cameraPosition ! = null ) {
Trace . beginSection ( " timer.onCameraChangeFinish " ) ;
MogoMapListenerHandler . getInstance ( ) . onMapChanged ( ObjectUtils . fromAMap ( cameraPosition . getTarget ( ) ) ,
@@ -788,8 +811,8 @@ public class AMapViewWrapper implements IMogoMapView,
@Override
public void onChangeMapStyle ( int styleId ) {
CallerLogger . INSTANCE . d ( TAG , " currentMapStyle = " + styleId ) ;
CallerLogger . INSTANCE . d ( TAG , Log . getStackTraceString ( new Throwable ( ) ) ) ;
CallerLogger . INSTANCE . d ( M_MAP + TAG, " currentMapStyle = " + styleId ) ;
CallerLogger . INSTANCE . d ( M_MAP + TAG, Log . getStackTraceString ( new Throwable ( ) ) ) ;
// 映射地图样式ID到鹰眼样式ID
if ( styleId = = MapAutoApi . MAP_STYLE_DAY
@@ -810,7 +833,7 @@ public class AMapViewWrapper implements IMogoMapView,
if ( mCurrentUI ! = null ) {
UiThreadHandler . post ( ( ) - > {
try {
CallerLogger . INSTANCE . d ( TAG , " currentUI = " + mCurrentUI ) ;
CallerLogger . INSTANCE . d ( M_MAP + TAG, " currentUI = " + mCurrentUI ) ;
MogoMapListenerHandler . getInstance ( ) . onMapModeChanged ( mCurrentUI ) ;
CallerMapStyleListenerManager . INSTANCE . invokeMapStyleChange ( styleId ) ;
} catch ( Exception e ) {
@@ -830,7 +853,7 @@ public class AMapViewWrapper implements IMogoMapView,
TipToast . shortTip ( mRtkEnable ? " 已开启rtk道路匹配 " : " 已开启gps道路匹配 " ) ;
mMapView . getLocationClient ( ) . rtkEnable ( mRtkEnable ) ;
} catch ( Exception e ) {
CallerLogger . INSTANCE . e ( TAG , " rtkEnable has exception : " + e ) ;
CallerLogger . INSTANCE . e ( M_MAP + TAG, " rtkEnable has exception : " + e ) ;
}
}
@@ -840,7 +863,7 @@ public class AMapViewWrapper implements IMogoMapView,
return ;
}
if ( data = = null ) {
CallerLogger . INSTANCE . d ( TAG , " 停止使用rtk定位数据 " ) ;
CallerLogger . INSTANCE . d ( M_MAP + TAG, " 停止使用rtk定位数据 " ) ;
return ;
}
double lon = data . optDouble ( " lon " , - 1 ) ;
@@ -934,8 +957,11 @@ public class AMapViewWrapper implements IMogoMapView,
}
/**
* 加载3D模型
*/
private void loadPreVehicleModel ( ) {
CallerLogger . INSTANCE . d ( TAG , " 添加感知模型到地图中…… " ) ;
CallerLogger . INSTANCE . d ( M_MAP + TAG, " 添加感知模型到地图中…… " ) ;
addPreVehicleModelWeiZhi ( TrafficTypeEnum . TYPE_TRAFFIC_ID_WEI_ZHI , " 添加感知模型到地图中……preVehicleStrWeiZhi= " ) ;
addPreVehicleModelWeiZhi ( TrafficTypeEnum . TYPE_TRAFFIC_ID_PEOPLE , " 添加感知模型到地图中……preVehicleStrPeople= " ) ;
@@ -960,7 +986,7 @@ public class AMapViewWrapper implements IMogoMapView,
private void addPreVehicleModelWeiZhi ( TrafficTypeEnum typeTrafficId , String logMsg ) {
String preVehicleStrWeiZhi ;
// 根据当前的地图皮肤模式动态替换
if ( isDayMol d ( ) ) {
if ( isDayMode ( ) ) {
preVehicleStrWeiZhi =
// 添加模型到地图中
MogoMarkerManager . getInstance ( getContext ( ) )
@@ -972,11 +998,11 @@ public class AMapViewWrapper implements IMogoMapView,
. addPreVehicleModel ( typeTrafficId . getType ( ) , typeTrafficId . getTraffic3DNightIconId ( ) ) ;
}
CallerLogger . INSTANCE . d ( TAG , logMsg + preVehicleStrWeiZhi ) ;
CallerLogger . INSTANCE . d ( M_MAP + TAG, logMsg + preVehicleStrWeiZhi ) ;
if ( preVehicleStrWeiZhi = = null ) {
UiThreadHandler . postDelayed ( ( ) - > {
CallerLogger . INSTANCE . w ( TAG , " 添加感知模型到地图中失败,尝试重复添加…… " ) ;
CallerLogger . INSTANCE . w ( M_MAP + TAG, " 添加感知模型到地图中失败,尝试重复添加…… " ) ;
addPreVehicleModelWeiZhi ( typeTrafficId , logMsg ) ;
} , 1000L ) ;
}