diff --git a/app/src/main/java/com/mogo/launcher/MogoApplication.java b/app/src/main/java/com/mogo/launcher/MogoApplication.java index 208c303fbb..3313577672 100644 --- a/app/src/main/java/com/mogo/launcher/MogoApplication.java +++ b/app/src/main/java/com/mogo/launcher/MogoApplication.java @@ -1,5 +1,6 @@ package com.mogo.launcher; +import android.app.ActivityManager; import android.content.Context; import android.content.Intent; import android.text.TextUtils; @@ -37,6 +38,8 @@ import com.zhidao.boot.persistent.lib.PersistentManager; import com.zhidao.mogo.module.left.panel.LeftPanelConst; import com.zhidao.mogo.tanlu.api.TanluApiConst; +import java.util.List; + import static com.mogo.module.guide.GuideConstant.PATH_GUIDE_FRAGMENT; import static com.mogo.module.guide.GuideConstant.PATH_GUIDE_MODULE_NAME; @@ -110,9 +113,23 @@ public class MogoApplication extends AbsMogoApplication { @Override protected boolean shouldInit() { - return !LeakCanary.isInAnalyzerProcess( this ); + return isMainProcess(); } + private boolean isMainProcess() { + ActivityManager am = ( ( ActivityManager ) getSystemService( Context.ACTIVITY_SERVICE ) ); + List< ActivityManager.RunningAppProcessInfo > processInfos = am.getRunningAppProcesses(); + String mainProcessName = getPackageName(); + int myPid = android.os.Process.myPid(); + for ( ActivityManager.RunningAppProcessInfo info : processInfos ) { + if ( info.pid == myPid && mainProcessName.equals( info.processName ) ) { + return true; + } + } + return false; + } + + private void initDebugConfig() { if ( !shouldInit() ) { return; diff --git a/libraries/map-custom/build.gradle b/libraries/map-custom/build.gradle index b542142f9d..6e93301417 100644 --- a/libraries/map-custom/build.gradle +++ b/libraries/map-custom/build.gradle @@ -55,7 +55,7 @@ dependencies { implementation project(':foudations:mogo-commons') } - implementation 'com.zhidaoauto.machine:map:1.0.0-online-21' + implementation 'com.zhidaoauto.machine:map:1.0.0-online-23' } apply from: new File(rootProject.rootDir, "gradle/upload.gradle").toString() diff --git a/modules/mogo-module-common/src/main/java/com/mogo/module/common/drawer/AdasRecognizedResultDrawer.java b/modules/mogo-module-common/src/main/java/com/mogo/module/common/drawer/AdasRecognizedResultDrawer.java index 08d3bc5ba6..917f883c74 100644 --- a/modules/mogo-module-common/src/main/java/com/mogo/module/common/drawer/AdasRecognizedResultDrawer.java +++ b/modules/mogo-module-common/src/main/java/com/mogo/module/common/drawer/AdasRecognizedResultDrawer.java @@ -102,7 +102,7 @@ class AdasRecognizedResultDrawer { points.add( new MogoLatLng( latLng.lat, latLon.lon ) ); } if ( points.size() >= 1 ) { - marker.startSmooth( points, 1000 ); + marker.startSmooth( points, 1 ); } } } @@ -153,7 +153,7 @@ class AdasRecognizedResultDrawer { } MogoMarkerOptions options = new MogoMarkerOptions() .owner( DataTypes.TYPE_MARKER_ADAS ) - .icon( BitmapFactory.decodeResource( mContext.getResources(), R.drawable.map_custom_ic_current_location2 ) ) + .icon( BitmapFactory.decodeResource( mContext.getResources(), R.drawable.module_common_online_car_vr_middle ) ) .position( new MogoLatLng( recognizedListResult.latLonList.get( 0 ).lat, recognizedListResult.latLonList.get( 0 ).lon ) ); return MogoApisHandler.getInstance().getApis().getMapServiceApi().getMarkerManager( mContext ).addMarker( ModuleNames.CARD_TYPE_ROAD_CONDITION, options ); } diff --git a/modules/mogo-module-common/src/main/java/com/mogo/module/common/drawer/MarkerDrawer.java b/modules/mogo-module-common/src/main/java/com/mogo/module/common/drawer/MarkerDrawer.java new file mode 100644 index 0000000000..1ab52d1cb6 --- /dev/null +++ b/modules/mogo-module-common/src/main/java/com/mogo/module/common/drawer/MarkerDrawer.java @@ -0,0 +1,261 @@ +package com.mogo.module.common.drawer; + +import android.text.TextUtils; + +import com.mogo.commons.AbsMogoApplication; +import com.mogo.map.MogoLatLng; +import com.mogo.map.marker.IMogoMarker; +import com.mogo.map.marker.IMogoMarkerClickListener; +import com.mogo.map.marker.MogoMarkerOptions; +import com.mogo.module.common.MogoApisHandler; +import com.mogo.module.common.drawer.marker.IMarkerView; +import com.mogo.module.common.drawer.marker.MapMarkerAdapter; +import com.mogo.module.common.drawer.marker.OnlineCarMarkerView; +import com.mogo.module.common.entity.MarkerExploreWay; +import com.mogo.module.common.entity.MarkerNoveltyInfo; +import com.mogo.module.common.entity.MarkerOnlineCar; +import com.mogo.module.common.entity.MarkerShareMusic; +import com.mogo.module.common.entity.MarkerShowEntity; +import com.mogo.utils.logger.Logger; + +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +public +/** + * @author congtaowang + * @since 2020/10/28 + *
+ * 描述
+ */
+class MarkerDrawer {
+
+ public static final int MARKER_Z_INDEX_HIGH = 100;
+ public static final int MARKER_Z_INDEX_LOW = 2;
+
+ private static volatile MarkerDrawer sInstance;
+
+ private MarkerDrawer() {
+ }
+
+ public static MarkerDrawer getInstance() {
+ if ( sInstance == null ) {
+ synchronized ( MarkerDrawer.class ) {
+ if ( sInstance == null ) {
+ sInstance = new MarkerDrawer();
+ }
+ }
+ }
+ return sInstance;
+ }
+
+ public synchronized void release() {
+ sInstance = null;
+ }
+
+ private Object readResolve() {
+ // 阻止反序列化,必须实现 Serializable 接口
+ return sInstance;
+ }
+
+ public IMogoMarker drawMapMarkerImpl( MarkerShowEntity markerShowEntity, int zIndex, IMogoMarkerClickListener listener ) {
+ if ( markerShowEntity == null || markerShowEntity.getMarkerLocation() == null ) {
+ return null;
+ }
+ MogoMarkerOptions options = new MogoMarkerOptions().owner( markerShowEntity.getMarkerType() ).zIndex( zIndex ).object( markerShowEntity ).latitude( markerShowEntity.getMarkerLocation().getLat() ).longitude( markerShowEntity.getMarkerLocation().getLon() );
+ IMarkerView markerView = MapMarkerAdapter.getMarkerView( AbsMogoApplication.getApp(), markerShowEntity, options );
+ if ( markerView instanceof OnlineCarMarkerView ) {
+ try {
+ options.icon( markerView.getBitmap( ( ( MarkerOnlineCar ) markerShowEntity.getBindObj() ).getCarInfo().getVehicleType() ) );
+ } catch ( Exception e ) {
+ options.icon( markerView.getBitmap( 0 ) );
+ }
+ options.anchor( 0.5f, 0.5f );
+ } else {
+ options.icon( markerView.getView() );
+ }
+
+ IMogoMarker marker = MogoApisHandler.getInstance().getApis().getMapServiceApi().getMarkerManager( AbsMogoApplication.getApp() ).addMarker( markerShowEntity.getMarkerType(), options );
+ marker.setOwner( markerShowEntity.getMarkerType() );
+ markerView.setMarker( marker );
+ marker.setOnMarkerClickListener( listener );
+ markerShowEntity.setMarker( marker );
+ return marker;
+ }
+
+ /**
+ * S = (A ∩ B) ∪ B
+ * (A ∩ B)作为旧列表需要保留的部分
+ *
+ * @param newList
+ * @return
+ */
+ public Map< String, IMogoMarker > purgeMarkerData( List newList, String markerType ) {
+
+ final long start = System.currentTimeMillis();
+ Map< String, IMogoMarker > existMap = new HashMap<>();
+ List< IMogoMarker > allCarsList = MogoApisHandler.getInstance().getApis().getMapServiceApi().getMarkerManager( AbsMogoApplication.getApp() ).getMarkers( markerType );
+ if ( allCarsList == null || allCarsList.isEmpty() ) {
+ return existMap;
+ }
+ if ( newList == null || newList.isEmpty() ) {
+ return existMap;
+ }
+
+ Map< String, IMogoMarker > allMap = new HashMap<>();
+ for ( IMogoMarker marker : allCarsList ) {
+ String sn = getPrimaryKeyFromMarker( marker );
+ allMap.put( sn, marker );
+ }
+ for ( Object entity : newList ) {
+ String sn = getPrimaryKeyFromEntity( entity );
+ if ( allMap.containsKey( sn ) ) {
+ if ( !isNewVehicleType( entity, allMap.get( sn ) ) ) {
+ existMap.put( sn, allMap.get( sn ) );
+ }
+ }
+ }
+ for ( String sn : allMap.keySet() ) {
+ if ( !existMap.containsKey( sn ) ) {
+ IMogoMarker dirtyMarker = allMap.get( sn );
+ allCarsList.remove( dirtyMarker );
+ dirtyMarker.destroy();
+ }
+ }
+ allMap.clear();
+ Logger.i( "timer", "purge data cost " + ( System.currentTimeMillis() - start ) + "ms" );
+ return existMap;
+ }
+
+
+ /**
+ * @param maxAmount 展示的最大数量
+ * @param list
+ * @return
+ */
+ public int getAppropriateSize( int maxAmount, List list ) {
+ if ( list == null ) {
+ return 0;
+ }
+ return Math.min( maxAmount, list.size() );
+ }
+
+
+ private boolean isNewVehicleType( Object object, IMogoMarker marker ) {
+ if ( object instanceof MarkerOnlineCar
+ && marker != null
+ && marker.getObject() instanceof MarkerShowEntity
+ && ( ( MarkerShowEntity ) marker.getObject() ).getBindObj() instanceof MarkerOnlineCar ) {
+ try {
+ return ( ( MarkerOnlineCar ) object ).getCarInfo().getVehicleType()
+ != ( ( MarkerOnlineCar ) ( ( MarkerShowEntity ) marker.getObject() ).getBindObj() ).getCarInfo().getVehicleType();
+ } catch ( Exception e ) {
+
+ }
+ }
+ return false;
+ }
+
+ public String getPrimaryKeyFromEntity( Object entity ) {
+ if ( entity instanceof MarkerExploreWay ) {
+ String id = ( ( MarkerExploreWay ) entity ).getInfoId();
+ if ( !TextUtils.isEmpty( id ) ) {
+ return id;
+ }
+ }
+ return getCarSnFromEntity( entity );
+ }
+
+ private String getPrimaryKeyFromMarker( IMogoMarker marker ) {
+ if ( marker == null || marker.getObject() == null || marker.isDestroyed() ) {
+ return null;
+ }
+ if ( !( marker.getObject() instanceof MarkerShowEntity ) ) {
+ return null;
+ }
+ return getPrimaryKeyFromEntity( ( ( MarkerShowEntity ) marker.getObject() ).getBindObj() );
+ }
+
+ private String getCarSnFromEntity( Object entity ) {
+ try {
+ if ( entity instanceof MarkerOnlineCar ) {
+ return ( ( MarkerOnlineCar ) entity ).getUserInfo().getSn();
+ } else if ( entity instanceof MarkerShareMusic ) {
+ return ( ( MarkerShareMusic ) entity ).getUserInfo().getSn();
+ } else if ( entity instanceof MarkerNoveltyInfo ) {
+ return ( ( MarkerNoveltyInfo ) entity ).getSn();
+ } else if ( entity instanceof MarkerExploreWay ) {
+ return ( ( MarkerExploreWay ) entity ).getUserInfo().getSn();
+ }
+ } catch ( Exception e ) {
+
+ }
+ return "";
+ }
+
+ public String getCarSnFromMarker( IMogoMarker marker ) {
+ if ( marker == null || marker.getObject() == null || marker.isDestroyed() ) {
+ return null;
+ }
+ if ( !( marker.getObject() instanceof MarkerShowEntity ) ) {
+ return null;
+ }
+ return getCarSnFromEntity( ( ( MarkerShowEntity ) marker.getObject() ).getBindObj() );
+ }
+
+ /**
+ * 距离半径计算方式
+ *
+ * @param point1 点一坐标
+ * @param point2 点二坐标
+ * @return 两坐标的距离 单位:米(M)
+ */
+ public static float calculateLineDistance( MogoLatLng point1, MogoLatLng point2 ) {
+ if ( point1 != null && point2 != null ) {
+ return calculateLineDistance( point1.lon, point1.lat, point2.lon, point2.lat );
+ } else {
+ return 0.0F;
+ }
+ }
+
+ /**
+ * @param lon1
+ * @param lat1
+ * @param lon2
+ * @param lat2
+ * @return 两坐标的距离 单位:米(M)
+ */
+ public static float calculateLineDistance( double lon1, double lat1, double lon2, double lat2 ) {
+ try {
+ double var2 = lon1;
+ double var4 = lat1;
+ double var6 = lon2;
+ double var8 = lat2;
+ var2 *= 0.01745329251994329D;
+ var4 *= 0.01745329251994329D;
+ var6 *= 0.01745329251994329D;
+ var8 *= 0.01745329251994329D;
+ double var10 = Math.sin( var2 );
+ double var12 = Math.sin( var4 );
+ double var14 = Math.cos( var2 );
+ double var16 = Math.cos( var4 );
+ double var18 = Math.sin( var6 );
+ double var20 = Math.sin( var8 );
+ double var22 = Math.cos( var6 );
+ double var24 = Math.cos( var8 );
+ double[] var28 = new double[3];
+ double[] var29 = new double[3];
+ var28[0] = var16 * var14;
+ var28[1] = var16 * var10;
+ var28[2] = var12;
+ var29[0] = var24 * var22;
+ var29[1] = var24 * var18;
+ var29[2] = var20;
+ return ( float ) ( Math.asin( Math.sqrt( ( var28[0] - var29[0] ) * ( var28[0] - var29[0] ) + ( var28[1] - var29[1] ) * ( var28[1] - var29[1] ) + ( var28[2] - var29[2] ) * ( var28[2] - var29[2] ) ) / 2.0D ) * 1.27420015798544E7D );
+ } catch ( Throwable var26 ) {
+ var26.printStackTrace();
+ return 0.0F;
+ }
+ }
+}
diff --git a/modules/mogo-module-common/src/main/java/com/mogo/module/common/drawer/OnlineCarDrawer.java b/modules/mogo-module-common/src/main/java/com/mogo/module/common/drawer/OnlineCarDrawer.java
new file mode 100644
index 0000000000..5829eee710
--- /dev/null
+++ b/modules/mogo-module-common/src/main/java/com/mogo/module/common/drawer/OnlineCarDrawer.java
@@ -0,0 +1,193 @@
+package com.mogo.module.common.drawer;
+
+import android.graphics.Rect;
+
+import com.mogo.commons.AbsMogoApplication;
+import com.mogo.map.MogoLatLng;
+import com.mogo.map.marker.IMogoMarker;
+import com.mogo.map.marker.IMogoMarkerClickListener;
+import com.mogo.module.common.ModuleNames;
+import com.mogo.module.common.MogoApisHandler;
+import com.mogo.module.common.entity.MarkerCarPois;
+import com.mogo.module.common.entity.MarkerLocation;
+import com.mogo.module.common.entity.MarkerOnlineCar;
+import com.mogo.module.common.entity.MarkerShowEntity;
+import com.mogo.utils.logger.Logger;
+
+import java.util.ArrayList;
+import java.util.List;
+import java.util.Map;
+
+public
+/**
+ * @author congtaowang
+ * @since 2020/10/28
+ *
+ * 描述
+ */
+class OnlineCarDrawer {
+
+ private static final String TAG = "OnlineCarDrawer";
+
+ // 平滑移动事件间隔(单位:秒)
+ private static final int SMOOTH_DURATION = 15;
+
+ private static volatile OnlineCarDrawer sInstance;
+
+ private OnlineCarDrawer() {
+ }
+
+ public static OnlineCarDrawer getInstance() {
+ if ( sInstance == null ) {
+ synchronized ( OnlineCarDrawer.class ) {
+ if ( sInstance == null ) {
+ sInstance = new OnlineCarDrawer();
+ }
+ }
+ }
+ return sInstance;
+ }
+
+ public synchronized void release() {
+ sInstance = null;
+ }
+
+ private Object readResolve() {
+ // 阻止反序列化,必须实现 Serializable 接口
+ return sInstance;
+ }
+
+ /**
+ * 绘制在线车辆marker
+ *
+ * @param onlineCarList
+ */
+ public void drawOnlineCarMarkers( List< MarkerOnlineCar > onlineCarList,
+ int maxAmount,
+ boolean clearOld,
+ boolean showBounds,
+ Rect bound,
+ MogoLatLng centerPoint,
+ IMogoMarkerClickListener listener ) {
+ // 将数据同步给在线车辆,避免每次 perform 的时候去拉取,造成消耗
+ if ( onlineCarList == null || onlineCarList.isEmpty() ) {
+ MogoApisHandler.getInstance().getApis().getMapServiceApi().getMarkerManager( AbsMogoApplication.getApp() ).removeMarkers( ModuleNames.CARD_TYPE_USER_DATA );
+ return;
+ }
+
+ if ( clearOld ) {
+ MogoApisHandler.getInstance().getApis().getMapServiceApi().getMarkerManager( AbsMogoApplication.getApp() ).removeMarkers( ModuleNames.CARD_TYPE_USER_DATA );
+ }
+
+ int size = MarkerDrawer.getInstance().getAppropriateSize( maxAmount, onlineCarList );
+
+ Map< String, IMogoMarker > existCarMap = MarkerDrawer.getInstance().purgeMarkerData( onlineCarList, ModuleNames.CARD_TYPE_USER_DATA );
+
+ List< MogoLatLng > carPoints = new ArrayList<>();
+ for ( int i = 0; i < size; i++ ) {
+ MarkerOnlineCar markerOnlineCar = onlineCarList.get( i );
+ MarkerLocation markerLocation = markerOnlineCar.getLocation();
+ MarkerShowEntity markerShowEntity = new MarkerShowEntity();
+ markerShowEntity.setBindObj( markerOnlineCar );
+ markerShowEntity.setMarkerLocation( markerLocation );
+ markerShowEntity.setMarkerType( markerOnlineCar.getType() );
+
+ if ( markerOnlineCar.getCarInfo() != null ) {
+ markerShowEntity.setTextContent( markerOnlineCar.getUserInfo().getUserName() );
+ markerShowEntity.setIconUrl( markerOnlineCar.getUserInfo().getUserHead() );
+ }
+
+ if ( i <= 5 ) {
+ carPoints.add( new MogoLatLng( markerLocation.getLat(), markerLocation.getLon() ) );
+ }
+
+ String sn = MarkerDrawer.getInstance().getPrimaryKeyFromEntity( markerOnlineCar );
+ IMogoMarker mogoMarker = existCarMap.get( sn );
+ if ( mogoMarker == null || mogoMarker.isDestroyed() ) {
+ mogoMarker = MarkerDrawer.getInstance().drawMapMarkerImpl( markerShowEntity, MarkerDrawer.MARKER_Z_INDEX_LOW, listener );
+ }
+ if ( mogoMarker != null ) {
+ mogoMarker.setVisible( true );
+ }
+ startSmooth( mogoMarker, markerOnlineCar, markerLocation );
+ }
+
+ if ( showBounds && bound != null ) {
+ // 将前6个点显示在固定范围内
+ MogoApisHandler.getInstance().getApis().getMapServiceApi().getMapUIController().showBounds( TAG, centerPoint, carPoints, bound, false );
+ }
+ }
+
+
+ // 平滑移动
+ private void startSmooth( IMogoMarker iMogoMarker, MarkerOnlineCar markerOnlineCar,
+ MarkerLocation markerLocation ) {
+ if ( iMogoMarker == null ) {
+ return;
+ }
+ List< MarkerCarPois > poiList = markerOnlineCar.getPois();
+ if ( filterErrorPoint( poiList ) ) {
+ return;
+ }
+ if ( poiList == null || poiList.size() < 2 ) {
+ return;
+ }
+
+ List< MogoLatLng > points = new ArrayList<>();
+
+ double lastLat = 0.0d;
+ double lastLon = 0.0d;
+
+ for ( int j = 0; j < poiList.size(); j++ ) {
+ MarkerCarPois poi = poiList.get( j );
+ if ( poi == null || poi.getCoordinates() == null && poi.getCoordinates().size() != 2 ) {
+ continue;
+ }
+ try {
+ double lat = Double.valueOf( poi.getCoordinates().get( 1 ) + "" );
+ double lng = Double.valueOf( poi.getCoordinates().get( 0 ) + "" );
+
+ float distance = MarkerDrawer.calculateLineDistance( lastLon, lastLat, lng, lat );
+ lastLon = lng;
+ lastLat = lat;
+ if ( distance < 0.2f ) {// 距离过短,认为静止不动
+ continue;
+ }
+
+ points.add( new MogoLatLng( lat, lng ) );
+ } catch ( Exception e ) {
+ }
+ }
+ if ( points.size() >= 1 ) {
+ iMogoMarker.startSmooth( points, SMOOTH_DURATION );
+ } else {
+ Logger.d( TAG, "静止小车,但是有相同的连续坐标" );
+ }
+ }
+
+ /**
+ * 有可能出现终点到起点跳跃的情况,需要用"500M"约束起点和终点
+ *
+ * @param poiList
+ */
+ private boolean filterErrorPoint( List< MarkerCarPois > poiList ) {
+ if ( poiList == null || poiList.size() < 2 ) {
+ return false;
+ }
+ MarkerCarPois start = poiList.get( 0 );
+ MarkerCarPois end = poiList.get( poiList.size() - 1 );
+
+ try {
+ double lat1 = Double.valueOf( start.getCoordinates().get( 1 ) + "" );
+ double lng1 = Double.valueOf( start.getCoordinates().get( 0 ) + "" );
+ double lat2 = Double.valueOf( end.getCoordinates().get( 1 ) + "" );
+ double lng2 = Double.valueOf( end.getCoordinates().get( 0 ) + "" );
+ if ( MarkerDrawer.calculateLineDistance( new MogoLatLng( lat1, lng1 ), new MogoLatLng( lat2, lng2 ) ) >= 500 ) {
+ Logger.d( TAG, "filter point" );
+ return true;
+ }
+ } catch ( Exception e ) {
+ }
+ return false;
+ }
+}
diff --git a/modules/mogo-module-common/src/main/java/com/mogo/module/common/drawer/RoadConditionDrawer.java b/modules/mogo-module-common/src/main/java/com/mogo/module/common/drawer/RoadConditionDrawer.java
new file mode 100644
index 0000000000..8fa79aaf08
--- /dev/null
+++ b/modules/mogo-module-common/src/main/java/com/mogo/module/common/drawer/RoadConditionDrawer.java
@@ -0,0 +1,128 @@
+package com.mogo.module.common.drawer;
+
+import android.view.animation.LinearInterpolator;
+
+import com.mogo.commons.AbsMogoApplication;
+import com.mogo.commons.debug.DebugConfig;
+import com.mogo.map.marker.IMogoMarker;
+import com.mogo.map.marker.IMogoMarkerClickListener;
+import com.mogo.map.marker.anim.OnMarkerAnimationListener;
+import com.mogo.module.common.ModuleNames;
+import com.mogo.module.common.MogoApisHandler;
+import com.mogo.module.common.entity.MarkerExploreWay;
+import com.mogo.module.common.entity.MarkerLocation;
+import com.mogo.module.common.entity.MarkerShowEntity;
+import com.mogo.utils.WorkThreadHandler;
+import com.mogo.utils.logger.Logger;
+
+import java.util.List;
+import java.util.Map;
+
+public
+/**
+ * @author congtaowang
+ * @since 2020/10/28
+ *
+ * 描述
+ */
+class RoadConditionDrawer {
+
+ private static final String TAG = "RoadConditionDrawer";
+
+ private static volatile RoadConditionDrawer sInstance;
+
+ private RoadConditionDrawer() {
+ }
+
+ public static RoadConditionDrawer getInstance() {
+ if ( sInstance == null ) {
+ synchronized ( RoadConditionDrawer.class ) {
+ if ( sInstance == null ) {
+ sInstance = new RoadConditionDrawer();
+ }
+ }
+ }
+ return sInstance;
+ }
+
+ public synchronized void release() {
+ sInstance = null;
+ }
+
+ private Object readResolve() {
+ // 阻止反序列化,必须实现 Serializable 接口
+ return sInstance;
+ }
+
+ /**
+ * 探路数据
+ *
+ * @param exploreWayList
+ */
+ public void drawRoadConditionMarker( List< MarkerExploreWay > exploreWayList, int maxAmount, IMogoMarkerClickListener listener ) {
+ // 将数据同步给探路,避免探路每次 perform 的时候去拉取,造成消耗
+ if ( exploreWayList == null || exploreWayList.isEmpty() ) {
+ MogoApisHandler.getInstance().getApis().getMapServiceApi().getMarkerManager( AbsMogoApplication.getApp() ).removeMarkers( ModuleNames.CARD_TYPE_ROAD_CONDITION );
+ return;
+ }
+ int size = MarkerDrawer.getInstance().getAppropriateSize( maxAmount, exploreWayList );
+ Map< String, IMogoMarker > existCarMap = MarkerDrawer.getInstance().purgeMarkerData( exploreWayList, ModuleNames.CARD_TYPE_ROAD_CONDITION );
+ Logger.i( TAG, "existCarMap: size = %d", existCarMap.size() );
+ for ( int i = 0; i < size; i++ ) {
+ MarkerExploreWay markerExploreWay = exploreWayList.get( i );
+ if ( !markerExploreWay.getCanLive() ) {
+ MarkerLocation markerLocation = markerExploreWay.getLocation();
+
+ MarkerShowEntity markerShowEntity = new MarkerShowEntity();
+ markerShowEntity.setBindObj( markerExploreWay );
+ markerShowEntity.setMarkerLocation( markerLocation );
+ markerShowEntity.setMarkerType( markerExploreWay.getType() );
+ markerShowEntity.setTextContent( markerExploreWay.getAddr() );
+
+ String sn = MarkerDrawer.getInstance().getPrimaryKeyFromEntity( markerExploreWay );
+ IMogoMarker mogoMarker = existCarMap.get( sn );
+ if ( mogoMarker == null || mogoMarker.isDestroyed() ) {
+ Logger.d( TAG, "draw road condition, sn = %s", sn );
+ try {
+ if ( DebugConfig.isRoadEventAnimated() ) {
+ post2AddAndStartAnimation( markerShowEntity, i * 100L, listener );
+ } else {
+ mogoMarker = MarkerDrawer.getInstance().drawMapMarkerImpl( markerShowEntity, MarkerDrawer.MARKER_Z_INDEX_HIGH, listener );
+ }
+ } catch ( Exception e ) {
+ e.printStackTrace();
+ }
+ }
+ }
+ }
+ }
+
+ private void post2AddAndStartAnimation( MarkerShowEntity entity, long delay, IMogoMarkerClickListener listener ) {
+ if ( entity == null ) {
+ return;
+ }
+ WorkThreadHandler.getInstance().postDelayed( () -> {
+ if ( entity == null ) {
+ return;
+ }
+ IMogoMarker marker = MarkerDrawer.getInstance().drawMapMarkerImpl( entity, MarkerDrawer.MARKER_Z_INDEX_HIGH, listener );
+ if ( marker == null ) {
+ return;
+ }
+ marker.startScaleAnimationWithAlpha( 0, 1.2f, 0, 1.2f, 0f, 1f, 300, new LinearInterpolator(), new OnMarkerAnimationListener() {
+ @Override
+ public void onAnimStart() {
+ Logger.d( TAG, " onAnimStart ---1----> " );
+ }
+
+ @Override
+ public void onAnimEnd() {
+ if ( marker == null || marker.isDestroyed() ) {
+ return;
+ }
+ marker.startScaleAnimation( 1.2f, 1, 1.2f, 1, 100, new LinearInterpolator(), null );
+ }
+ } );
+ }, delay );
+ }
+}
diff --git a/modules/mogo-module-common/src/main/java/com/mogo/module/common/drawer/SnapshotSetDataDrawer.java b/modules/mogo-module-common/src/main/java/com/mogo/module/common/drawer/SnapshotSetDataDrawer.java
index 3b5ca12e41..c45a635e18 100644
--- a/modules/mogo-module-common/src/main/java/com/mogo/module/common/drawer/SnapshotSetDataDrawer.java
+++ b/modules/mogo-module-common/src/main/java/com/mogo/module/common/drawer/SnapshotSetDataDrawer.java
@@ -108,7 +108,7 @@ class SnapshotSetDataDrawer {
points.add( new MogoLatLng( cloudRoadData.getLat(), cloudRoadData.getLon() ) );
}
if ( points.size() >= 1 ) {
- marker.startSmooth( points, 1000 );
+ marker.startSmooth( points, 1 );
}
}
}
@@ -160,7 +160,7 @@ class SnapshotSetDataDrawer {
}
MogoMarkerOptions options = new MogoMarkerOptions()
.owner( DataTypes.TYPE_MARKER_CLOUD_DATA )
- .icon( BitmapFactory.decodeResource( mContext.getResources(), R.drawable.map_custom_ic_current_location2 ) )
+ .icon( BitmapFactory.decodeResource( mContext.getResources(), R.drawable.module_common_online_car_vr_middle ) )
.position( new MogoLatLng( data.getLat(), data.getLon() ) );
return MogoApisHandler.getInstance().getApis().getMapServiceApi().getMarkerManager( mContext ).addMarker( ModuleNames.CARD_TYPE_ROAD_CONDITION, options );
}
diff --git a/modules/mogo-module-service/src/main/java/com/mogo/module/service/marker/IMarkerView.java b/modules/mogo-module-common/src/main/java/com/mogo/module/common/drawer/marker/IMarkerView.java
similarity index 77%
rename from modules/mogo-module-service/src/main/java/com/mogo/module/service/marker/IMarkerView.java
rename to modules/mogo-module-common/src/main/java/com/mogo/module/common/drawer/marker/IMarkerView.java
index 44388f2e8f..e4b0892d4e 100644
--- a/modules/mogo-module-service/src/main/java/com/mogo/module/service/marker/IMarkerView.java
+++ b/modules/mogo-module-common/src/main/java/com/mogo/module/common/drawer/marker/IMarkerView.java
@@ -1,4 +1,4 @@
-package com.mogo.module.service.marker;
+package com.mogo.module.common.drawer.marker;
import android.graphics.Bitmap;
import android.view.View;
@@ -15,7 +15,7 @@ public interface IMarkerView {
View getView();
- default Bitmap getBitmap(int type){
+ default Bitmap getBitmap( int type ){
return null;
}
diff --git a/modules/mogo-module-service/src/main/java/com/mogo/module/service/marker/MapMarkerAdapter.java b/modules/mogo-module-common/src/main/java/com/mogo/module/common/drawer/marker/MapMarkerAdapter.java
similarity index 81%
rename from modules/mogo-module-service/src/main/java/com/mogo/module/service/marker/MapMarkerAdapter.java
rename to modules/mogo-module-common/src/main/java/com/mogo/module/common/drawer/marker/MapMarkerAdapter.java
index a577317e48..94d682ca4a 100644
--- a/modules/mogo-module-service/src/main/java/com/mogo/module/service/marker/MapMarkerAdapter.java
+++ b/modules/mogo-module-common/src/main/java/com/mogo/module/common/drawer/marker/MapMarkerAdapter.java
@@ -1,17 +1,11 @@
-package com.mogo.module.service.marker;
+package com.mogo.module.common.drawer.marker;
import android.content.Context;
-import android.graphics.Bitmap;
-import android.graphics.BitmapFactory;
import android.text.TextUtils;
-import android.view.View;
-import com.mogo.commons.AbsMogoApplication;
-import com.mogo.map.marker.IMogoMarker;
import com.mogo.map.marker.MogoMarkerOptions;
import com.mogo.module.common.ModuleNames;
import com.mogo.module.common.entity.MarkerShowEntity;
-import com.mogo.module.service.R;
/**
* author : donghongyu
diff --git a/modules/mogo-module-service/src/main/java/com/mogo/module/service/marker/MapMarkerBaseView.java b/modules/mogo-module-common/src/main/java/com/mogo/module/common/drawer/marker/MapMarkerBaseView.java
similarity index 88%
rename from modules/mogo-module-service/src/main/java/com/mogo/module/service/marker/MapMarkerBaseView.java
rename to modules/mogo-module-common/src/main/java/com/mogo/module/common/drawer/marker/MapMarkerBaseView.java
index c790f05e65..ec5f0d8739 100644
--- a/modules/mogo-module-service/src/main/java/com/mogo/module/service/marker/MapMarkerBaseView.java
+++ b/modules/mogo-module-common/src/main/java/com/mogo/module/common/drawer/marker/MapMarkerBaseView.java
@@ -1,4 +1,4 @@
-package com.mogo.module.service.marker;
+package com.mogo.module.common.drawer.marker;
import android.content.Context;
import android.graphics.Bitmap;
@@ -7,19 +7,17 @@ import android.text.TextUtils;
import android.util.AttributeSet;
import android.view.View;
import android.view.ViewGroup;
-import android.widget.FrameLayout;
import android.widget.ImageView;
import android.widget.LinearLayout;
import android.widget.TextView;
import androidx.annotation.Nullable;
-import androidx.constraintlayout.widget.ConstraintLayout;
import com.mogo.map.marker.IMogoMarker;
import com.mogo.map.marker.MogoMarkerOptions;
+import com.mogo.module.common.MogoApisHandler;
+import com.mogo.module.common.R;
import com.mogo.module.common.entity.MarkerShowEntity;
-import com.mogo.module.service.MarkerServiceHandler;
-import com.mogo.module.service.R;
import com.mogo.service.imageloader.IMogoImageLoaderListener;
import com.mogo.service.imageloader.MogoImageView;
import com.mogo.utils.UiThreadHandler;
@@ -83,7 +81,7 @@ public abstract class MapMarkerBaseView extends LinearLayout implements IMarkerV
private void runOnUiThread(final MarkerShowEntity markerShowEntity){
if (!TextUtils.isEmpty(markerShowEntity.getIconUrl())) {
- MarkerServiceHandler.getImageloader().displayImage(markerShowEntity.getIconUrl(),
+ MogoApisHandler.getInstance().getApis().getImageLoaderApi().displayImage(markerShowEntity.getIconUrl(),
ivUserHead,
WindowUtils.dip2px(mContext, 50), WindowUtils.dip2px(mContext, 50),
new IMogoImageLoaderListener() {
@@ -108,7 +106,7 @@ public abstract class MapMarkerBaseView extends LinearLayout implements IMarkerV
});
} else {
- ivUserHead.setBackgroundResource(R.drawable.icon_default_user_head);
+ ivUserHead.setBackgroundResource( R.drawable.icon_default_user_head);
}
}
@@ -116,7 +114,7 @@ public abstract class MapMarkerBaseView extends LinearLayout implements IMarkerV
view.setDrawingCacheEnabled( true );
processChildView( view );
view.destroyDrawingCache();
- view.measure( View.MeasureSpec.makeMeasureSpec( 0, View.MeasureSpec.UNSPECIFIED ), View.MeasureSpec.makeMeasureSpec( 0, View.MeasureSpec.UNSPECIFIED ) );
+ view.measure( MeasureSpec.makeMeasureSpec( 0, MeasureSpec.UNSPECIFIED ), MeasureSpec.makeMeasureSpec( 0, MeasureSpec.UNSPECIFIED ) );
view.layout( 0, 0, view.getMeasuredWidth(), view.getMeasuredHeight() );
Bitmap bitmap = null;
return ( bitmap = view.getDrawingCache() ) != null ? bitmap.copy( Bitmap.Config.ARGB_8888, false ) : null;
diff --git a/modules/mogo-module-service/src/main/java/com/mogo/module/service/marker/MapMarkerInfoView.java b/modules/mogo-module-common/src/main/java/com/mogo/module/common/drawer/marker/MapMarkerInfoView.java
similarity index 95%
rename from modules/mogo-module-service/src/main/java/com/mogo/module/service/marker/MapMarkerInfoView.java
rename to modules/mogo-module-common/src/main/java/com/mogo/module/common/drawer/marker/MapMarkerInfoView.java
index 195bd75c83..5270818a0b 100644
--- a/modules/mogo-module-service/src/main/java/com/mogo/module/service/marker/MapMarkerInfoView.java
+++ b/modules/mogo-module-common/src/main/java/com/mogo/module/common/drawer/marker/MapMarkerInfoView.java
@@ -1,4 +1,4 @@
-package com.mogo.module.service.marker;
+package com.mogo.module.common.drawer.marker;
import android.content.Context;
import android.text.TextUtils;
@@ -12,12 +12,12 @@ import androidx.annotation.Nullable;
import androidx.constraintlayout.widget.ConstraintLayout;
import com.mogo.map.marker.MogoMarkerOptions;
+import com.mogo.module.common.ModuleNames;
+import com.mogo.module.common.R;
import com.mogo.module.common.entity.MarkerExploreWay;
import com.mogo.module.common.entity.MarkerPoiTypeEnum;
import com.mogo.module.common.entity.MarkerShareMusic;
import com.mogo.module.common.entity.MarkerShowEntity;
-import com.mogo.module.service.R;
-import com.mogo.module.service.ServiceConst;
/**
* author : donghongyu
@@ -70,8 +70,8 @@ public class MapMarkerInfoView extends MapMarkerBaseView {
clMarkerContent.setBackgroundResource( R.drawable.bg_map_marker_yellow_info );
ivReverseTriangle.setImageResource( R.drawable.bg_shape_reverse_yellow );
switch ( markerShowEntity.getMarkerType() ) {
- case ServiceConst.CARD_TYPE_CARS_CHATTING:
- case ServiceConst.CARD_TYPE_USER_DATA:
+ case ModuleNames.CARD_TYPE_CARS_CHATTING:
+ case ModuleNames.CARD_TYPE_USER_DATA:
ivUserHead.setVisibility( View.VISIBLE );
ivIcon.setVisibility( View.INVISIBLE );
loadImageWithMarker( markerShowEntity );
@@ -79,8 +79,8 @@ public class MapMarkerInfoView extends MapMarkerBaseView {
//ivCar.setRotation(new Random().nextInt(360));
ivCar.setRotation( ( float ) markerShowEntity.getMarkerLocation().getAngle() );
break;
- case ServiceConst.CARD_TYPE_ROAD_CONDITION:
- case ServiceConst.CARD_TYPE_NOVELTY:
+ case ModuleNames.CARD_TYPE_ROAD_CONDITION:
+ case ModuleNames.CARD_TYPE_NOVELTY:
ivUserHead.setVisibility( View.INVISIBLE );
ivIcon.setVisibility( View.VISIBLE );
@@ -143,7 +143,7 @@ public class MapMarkerInfoView extends MapMarkerBaseView {
}
}
break;
- case ServiceConst.CARD_TYPE_SHARE_MUSIC:
+ case ModuleNames.CARD_TYPE_SHARE_MUSIC:
ivUserHead.setVisibility( View.INVISIBLE );
ivIcon.setVisibility( View.VISIBLE );
diff --git a/modules/mogo-module-service/src/main/java/com/mogo/module/service/marker/MapMarkerView.java b/modules/mogo-module-common/src/main/java/com/mogo/module/common/drawer/marker/MapMarkerView.java
similarity index 92%
rename from modules/mogo-module-service/src/main/java/com/mogo/module/service/marker/MapMarkerView.java
rename to modules/mogo-module-common/src/main/java/com/mogo/module/common/drawer/marker/MapMarkerView.java
index 0912f537d6..d5a53835e0 100644
--- a/modules/mogo-module-service/src/main/java/com/mogo/module/service/marker/MapMarkerView.java
+++ b/modules/mogo-module-common/src/main/java/com/mogo/module/common/drawer/marker/MapMarkerView.java
@@ -1,4 +1,4 @@
-package com.mogo.module.service.marker;
+package com.mogo.module.common.drawer.marker;
import android.content.Context;
import android.util.AttributeSet;
@@ -7,12 +7,12 @@ import android.view.LayoutInflater;
import androidx.annotation.Nullable;
import com.mogo.map.marker.MogoMarkerOptions;
+import com.mogo.module.common.ModuleNames;
import com.mogo.module.common.MogoApisHandler;
+import com.mogo.module.common.R;
import com.mogo.module.common.entity.MarkerExploreWay;
import com.mogo.module.common.entity.MarkerPoiTypeEnum;
import com.mogo.module.common.entity.MarkerShowEntity;
-import com.mogo.module.service.R;
-import com.mogo.module.service.ServiceConst;
/**
* author : donghongyu
@@ -52,10 +52,13 @@ public class MapMarkerView extends MapMarkerBaseView {
try {
Object bindObj = markerShowEntity.getBindObj();
if ( MogoApisHandler.getInstance().getApis().getMapFrameControllerApi().isVrMode() ) {
+ ivCar.setImageResource( R.drawable.icon_map_marker_location_yellow_vr );
+ } else {
+ ivCar.setImageResource( R.drawable.icon_map_marker_location_yellow );
}
switch ( markerShowEntity.getMarkerType() ) {
- case ServiceConst.CARD_TYPE_ROAD_CONDITION:
- case ServiceConst.CARD_TYPE_NOVELTY:
+ case ModuleNames.CARD_TYPE_ROAD_CONDITION:
+ case ModuleNames.CARD_TYPE_NOVELTY:
if ( bindObj instanceof MarkerExploreWay && ( ( MarkerExploreWay ) bindObj ).getPoiType() != null ) {
switch ( ( ( MarkerExploreWay ) bindObj ).getPoiType() ) {
case MarkerPoiTypeEnum.GAS_STATION:
diff --git a/modules/mogo-module-service/src/main/java/com/mogo/module/service/marker/OnlineCarMarkerView.java b/modules/mogo-module-common/src/main/java/com/mogo/module/common/drawer/marker/OnlineCarMarkerView.java
similarity index 96%
rename from modules/mogo-module-service/src/main/java/com/mogo/module/service/marker/OnlineCarMarkerView.java
rename to modules/mogo-module-common/src/main/java/com/mogo/module/common/drawer/marker/OnlineCarMarkerView.java
index 33c9aea200..81459e5a74 100644
--- a/modules/mogo-module-service/src/main/java/com/mogo/module/service/marker/OnlineCarMarkerView.java
+++ b/modules/mogo-module-common/src/main/java/com/mogo/module/common/drawer/marker/OnlineCarMarkerView.java
@@ -1,4 +1,4 @@
-package com.mogo.module.service.marker;
+package com.mogo.module.common.drawer.marker;
import android.graphics.Bitmap;
import android.graphics.BitmapFactory;
@@ -6,8 +6,7 @@ import android.view.View;
import com.mogo.commons.AbsMogoApplication;
import com.mogo.map.marker.IMogoMarker;
-import com.mogo.module.common.ModuleNames;
-import com.mogo.module.service.R;
+import com.mogo.module.common.R;
import java.lang.ref.SoftReference;
import java.util.HashMap;
diff --git a/modules/mogo-module-common/src/main/res/drawable-xhdpi/icon_map_marker_4s.png b/modules/mogo-module-common/src/main/res/drawable-xhdpi/icon_map_marker_4s.png
new file mode 100644
index 0000000000..11c5c6ea7b
Binary files /dev/null and b/modules/mogo-module-common/src/main/res/drawable-xhdpi/icon_map_marker_4s.png differ
diff --git a/modules/mogo-module-common/src/main/res/drawable-xhdpi/icon_map_marker_book.png b/modules/mogo-module-common/src/main/res/drawable-xhdpi/icon_map_marker_book.png
new file mode 100644
index 0000000000..f846dcefc3
Binary files /dev/null and b/modules/mogo-module-common/src/main/res/drawable-xhdpi/icon_map_marker_book.png differ
diff --git a/modules/mogo-module-common/src/main/res/drawable-xhdpi/icon_map_marker_car_gray.png b/modules/mogo-module-common/src/main/res/drawable-xhdpi/icon_map_marker_car_gray.png
new file mode 100644
index 0000000000..d4266a6bc5
Binary files /dev/null and b/modules/mogo-module-common/src/main/res/drawable-xhdpi/icon_map_marker_car_gray.png differ
diff --git a/modules/mogo-module-common/src/main/res/drawable-xhdpi/icon_map_marker_car_gray_selected.png b/modules/mogo-module-common/src/main/res/drawable-xhdpi/icon_map_marker_car_gray_selected.png
new file mode 100644
index 0000000000..725a560b4f
Binary files /dev/null and b/modules/mogo-module-common/src/main/res/drawable-xhdpi/icon_map_marker_car_gray_selected.png differ
diff --git a/modules/mogo-module-common/src/main/res/drawable-xhdpi/icon_map_marker_car_type2.png b/modules/mogo-module-common/src/main/res/drawable-xhdpi/icon_map_marker_car_type2.png
new file mode 100644
index 0000000000..10221fcb01
Binary files /dev/null and b/modules/mogo-module-common/src/main/res/drawable-xhdpi/icon_map_marker_car_type2.png differ
diff --git a/modules/mogo-module-common/src/main/res/drawable-xhdpi/icon_map_marker_car_type_110.png b/modules/mogo-module-common/src/main/res/drawable-xhdpi/icon_map_marker_car_type_110.png
new file mode 100644
index 0000000000..74f12e781d
Binary files /dev/null and b/modules/mogo-module-common/src/main/res/drawable-xhdpi/icon_map_marker_car_type_110.png differ
diff --git a/modules/mogo-module-common/src/main/res/drawable-xhdpi/icon_map_marker_car_type_119.png b/modules/mogo-module-common/src/main/res/drawable-xhdpi/icon_map_marker_car_type_119.png
new file mode 100644
index 0000000000..db23ff7144
Binary files /dev/null and b/modules/mogo-module-common/src/main/res/drawable-xhdpi/icon_map_marker_car_type_119.png differ
diff --git a/modules/mogo-module-common/src/main/res/drawable-xhdpi/icon_map_marker_car_type_120.png b/modules/mogo-module-common/src/main/res/drawable-xhdpi/icon_map_marker_car_type_120.png
new file mode 100644
index 0000000000..1c929ca8a0
Binary files /dev/null and b/modules/mogo-module-common/src/main/res/drawable-xhdpi/icon_map_marker_car_type_120.png differ
diff --git a/modules/mogo-module-common/src/main/res/drawable-xhdpi/icon_map_marker_car_type_bus.png b/modules/mogo-module-common/src/main/res/drawable-xhdpi/icon_map_marker_car_type_bus.png
new file mode 100644
index 0000000000..afe1372cb9
Binary files /dev/null and b/modules/mogo-module-common/src/main/res/drawable-xhdpi/icon_map_marker_car_type_bus.png differ
diff --git a/modules/mogo-module-common/src/main/res/drawable-xhdpi/icon_map_marker_car_type_taxi.png b/modules/mogo-module-common/src/main/res/drawable-xhdpi/icon_map_marker_car_type_taxi.png
new file mode 100644
index 0000000000..0b363c6d61
Binary files /dev/null and b/modules/mogo-module-common/src/main/res/drawable-xhdpi/icon_map_marker_car_type_taxi.png differ
diff --git a/modules/mogo-module-common/src/main/res/drawable-xhdpi/icon_map_marker_living.png b/modules/mogo-module-common/src/main/res/drawable-xhdpi/icon_map_marker_living.png
new file mode 100644
index 0000000000..d6f1dea192
Binary files /dev/null and b/modules/mogo-module-common/src/main/res/drawable-xhdpi/icon_map_marker_living.png differ
diff --git a/modules/mogo-module-common/src/main/res/drawable-xhdpi/icon_map_marker_living_white.png b/modules/mogo-module-common/src/main/res/drawable-xhdpi/icon_map_marker_living_white.png
new file mode 100644
index 0000000000..1b87f0ce86
Binary files /dev/null and b/modules/mogo-module-common/src/main/res/drawable-xhdpi/icon_map_marker_living_white.png differ
diff --git a/modules/mogo-module-common/src/main/res/drawable-xhdpi/icon_map_marker_location_yellow.png b/modules/mogo-module-common/src/main/res/drawable-xhdpi/icon_map_marker_location_yellow.png
new file mode 100644
index 0000000000..f05356795e
Binary files /dev/null and b/modules/mogo-module-common/src/main/res/drawable-xhdpi/icon_map_marker_location_yellow.png differ
diff --git a/modules/mogo-module-common/src/main/res/drawable-xhdpi/icon_map_marker_location_yellow_vr.png b/modules/mogo-module-common/src/main/res/drawable-xhdpi/icon_map_marker_location_yellow_vr.png
new file mode 100644
index 0000000000..eca4f04cef
Binary files /dev/null and b/modules/mogo-module-common/src/main/res/drawable-xhdpi/icon_map_marker_location_yellow_vr.png differ
diff --git a/modules/mogo-module-common/src/main/res/drawable-xhdpi/icon_map_marker_misic.png b/modules/mogo-module-common/src/main/res/drawable-xhdpi/icon_map_marker_misic.png
new file mode 100644
index 0000000000..b0dc73d75a
Binary files /dev/null and b/modules/mogo-module-common/src/main/res/drawable-xhdpi/icon_map_marker_misic.png differ
diff --git a/modules/mogo-module-common/src/main/res/drawable-xhdpi/icon_map_marker_news.png b/modules/mogo-module-common/src/main/res/drawable-xhdpi/icon_map_marker_news.png
new file mode 100644
index 0000000000..26edaa7f7a
Binary files /dev/null and b/modules/mogo-module-common/src/main/res/drawable-xhdpi/icon_map_marker_news.png differ
diff --git a/modules/mogo-module-common/src/main/res/drawable-xhdpi/icon_map_marker_pondingl.png b/modules/mogo-module-common/src/main/res/drawable-xhdpi/icon_map_marker_pondingl.png
new file mode 100644
index 0000000000..fc3ff86372
Binary files /dev/null and b/modules/mogo-module-common/src/main/res/drawable-xhdpi/icon_map_marker_pondingl.png differ
diff --git a/modules/mogo-module-common/src/main/res/drawable-xhdpi/icon_map_marker_pondingl2.png b/modules/mogo-module-common/src/main/res/drawable-xhdpi/icon_map_marker_pondingl2.png
new file mode 100755
index 0000000000..478232ac79
Binary files /dev/null and b/modules/mogo-module-common/src/main/res/drawable-xhdpi/icon_map_marker_pondingl2.png differ
diff --git a/modules/mogo-module-common/src/main/res/drawable-xhdpi/icon_map_marker_pondingl2_white.png b/modules/mogo-module-common/src/main/res/drawable-xhdpi/icon_map_marker_pondingl2_white.png
new file mode 100755
index 0000000000..700226f150
Binary files /dev/null and b/modules/mogo-module-common/src/main/res/drawable-xhdpi/icon_map_marker_pondingl2_white.png differ
diff --git a/modules/mogo-module-common/src/main/res/drawable-xhdpi/icon_map_marker_refuel.png b/modules/mogo-module-common/src/main/res/drawable-xhdpi/icon_map_marker_refuel.png
new file mode 100644
index 0000000000..bac7ee2e40
Binary files /dev/null and b/modules/mogo-module-common/src/main/res/drawable-xhdpi/icon_map_marker_refuel.png differ
diff --git a/modules/mogo-module-common/src/main/res/drawable-xhdpi/icon_map_marker_road_block_off.png b/modules/mogo-module-common/src/main/res/drawable-xhdpi/icon_map_marker_road_block_off.png
new file mode 100644
index 0000000000..8c6b30842b
Binary files /dev/null and b/modules/mogo-module-common/src/main/res/drawable-xhdpi/icon_map_marker_road_block_off.png differ
diff --git a/modules/mogo-module-common/src/main/res/drawable-xhdpi/icon_map_marker_road_block_off2.png b/modules/mogo-module-common/src/main/res/drawable-xhdpi/icon_map_marker_road_block_off2.png
new file mode 100755
index 0000000000..2fb4ef553e
Binary files /dev/null and b/modules/mogo-module-common/src/main/res/drawable-xhdpi/icon_map_marker_road_block_off2.png differ
diff --git a/modules/mogo-module-common/src/main/res/drawable-xhdpi/icon_map_marker_road_block_off2_white.png b/modules/mogo-module-common/src/main/res/drawable-xhdpi/icon_map_marker_road_block_off2_white.png
new file mode 100755
index 0000000000..9b424494ee
Binary files /dev/null and b/modules/mogo-module-common/src/main/res/drawable-xhdpi/icon_map_marker_road_block_off2_white.png differ
diff --git a/modules/mogo-module-common/src/main/res/drawable-xhdpi/icon_map_marker_road_block_up.png b/modules/mogo-module-common/src/main/res/drawable-xhdpi/icon_map_marker_road_block_up.png
new file mode 100644
index 0000000000..29fd407dca
Binary files /dev/null and b/modules/mogo-module-common/src/main/res/drawable-xhdpi/icon_map_marker_road_block_up.png differ
diff --git a/modules/mogo-module-common/src/main/res/drawable-xhdpi/icon_map_marker_road_block_up2.png b/modules/mogo-module-common/src/main/res/drawable-xhdpi/icon_map_marker_road_block_up2.png
new file mode 100755
index 0000000000..e62fd5ec03
Binary files /dev/null and b/modules/mogo-module-common/src/main/res/drawable-xhdpi/icon_map_marker_road_block_up2.png differ
diff --git a/modules/mogo-module-common/src/main/res/drawable-xhdpi/icon_map_marker_road_block_up2_white.png b/modules/mogo-module-common/src/main/res/drawable-xhdpi/icon_map_marker_road_block_up2_white.png
new file mode 100755
index 0000000000..0ac89f4dec
Binary files /dev/null and b/modules/mogo-module-common/src/main/res/drawable-xhdpi/icon_map_marker_road_block_up2_white.png differ
diff --git a/modules/mogo-module-common/src/main/res/drawable-xhdpi/icon_map_marker_road_check.png b/modules/mogo-module-common/src/main/res/drawable-xhdpi/icon_map_marker_road_check.png
new file mode 100644
index 0000000000..7f8f80be69
Binary files /dev/null and b/modules/mogo-module-common/src/main/res/drawable-xhdpi/icon_map_marker_road_check.png differ
diff --git a/modules/mogo-module-common/src/main/res/drawable-xhdpi/icon_map_marker_road_check2.png b/modules/mogo-module-common/src/main/res/drawable-xhdpi/icon_map_marker_road_check2.png
new file mode 100755
index 0000000000..001974ba87
Binary files /dev/null and b/modules/mogo-module-common/src/main/res/drawable-xhdpi/icon_map_marker_road_check2.png differ
diff --git a/modules/mogo-module-common/src/main/res/drawable-xhdpi/icon_map_marker_road_check2_white.png b/modules/mogo-module-common/src/main/res/drawable-xhdpi/icon_map_marker_road_check2_white.png
new file mode 100755
index 0000000000..5baea2a41b
Binary files /dev/null and b/modules/mogo-module-common/src/main/res/drawable-xhdpi/icon_map_marker_road_check2_white.png differ
diff --git a/modules/mogo-module-common/src/main/res/drawable-xhdpi/icon_map_marker_road_work.png b/modules/mogo-module-common/src/main/res/drawable-xhdpi/icon_map_marker_road_work.png
new file mode 100644
index 0000000000..0b0d4bbab5
Binary files /dev/null and b/modules/mogo-module-common/src/main/res/drawable-xhdpi/icon_map_marker_road_work.png differ
diff --git a/modules/mogo-module-common/src/main/res/drawable-xhdpi/icon_map_marker_road_work2.png b/modules/mogo-module-common/src/main/res/drawable-xhdpi/icon_map_marker_road_work2.png
new file mode 100755
index 0000000000..c11e911f15
Binary files /dev/null and b/modules/mogo-module-common/src/main/res/drawable-xhdpi/icon_map_marker_road_work2.png differ
diff --git a/modules/mogo-module-common/src/main/res/drawable-xhdpi/icon_map_marker_road_work2_white.png b/modules/mogo-module-common/src/main/res/drawable-xhdpi/icon_map_marker_road_work2_white.png
new file mode 100755
index 0000000000..7875086c3e
Binary files /dev/null and b/modules/mogo-module-common/src/main/res/drawable-xhdpi/icon_map_marker_road_work2_white.png differ
diff --git a/modules/mogo-module-common/src/main/res/drawable-xhdpi/icon_map_marker_shear_news.png b/modules/mogo-module-common/src/main/res/drawable-xhdpi/icon_map_marker_shear_news.png
new file mode 100644
index 0000000000..f446cba155
Binary files /dev/null and b/modules/mogo-module-common/src/main/res/drawable-xhdpi/icon_map_marker_shear_news.png differ
diff --git a/modules/mogo-module-common/src/main/res/drawable-xhdpi/icon_map_marker_shop.png b/modules/mogo-module-common/src/main/res/drawable-xhdpi/icon_map_marker_shop.png
new file mode 100644
index 0000000000..d8be56fd47
Binary files /dev/null and b/modules/mogo-module-common/src/main/res/drawable-xhdpi/icon_map_marker_shop.png differ
diff --git a/modules/mogo-module-common/src/main/res/drawable-xhdpi/icon_map_marker_shop_discount.png b/modules/mogo-module-common/src/main/res/drawable-xhdpi/icon_map_marker_shop_discount.png
new file mode 100644
index 0000000000..97e8a4967b
Binary files /dev/null and b/modules/mogo-module-common/src/main/res/drawable-xhdpi/icon_map_marker_shop_discount.png differ
diff --git a/modules/mogo-module-common/src/main/res/drawable-xhdpi/module_common_online_car_vr_left.png b/modules/mogo-module-common/src/main/res/drawable-xhdpi/module_common_online_car_vr_left.png
new file mode 100644
index 0000000000..702a793d5a
Binary files /dev/null and b/modules/mogo-module-common/src/main/res/drawable-xhdpi/module_common_online_car_vr_left.png differ
diff --git a/modules/mogo-module-common/src/main/res/drawable-xhdpi/module_common_online_car_vr_middle.png b/modules/mogo-module-common/src/main/res/drawable-xhdpi/module_common_online_car_vr_middle.png
new file mode 100644
index 0000000000..3bfa172f98
Binary files /dev/null and b/modules/mogo-module-common/src/main/res/drawable-xhdpi/module_common_online_car_vr_middle.png differ
diff --git a/modules/mogo-module-common/src/main/res/drawable-xhdpi/module_common_online_car_vr_reverse.png b/modules/mogo-module-common/src/main/res/drawable-xhdpi/module_common_online_car_vr_reverse.png
new file mode 100644
index 0000000000..e034294816
Binary files /dev/null and b/modules/mogo-module-common/src/main/res/drawable-xhdpi/module_common_online_car_vr_reverse.png differ
diff --git a/modules/mogo-module-common/src/main/res/drawable-xhdpi/module_common_online_car_vr_right.png b/modules/mogo-module-common/src/main/res/drawable-xhdpi/module_common_online_car_vr_right.png
new file mode 100644
index 0000000000..43a86c955d
Binary files /dev/null and b/modules/mogo-module-common/src/main/res/drawable-xhdpi/module_common_online_car_vr_right.png differ
diff --git a/modules/mogo-module-common/src/main/res/drawable-xhdpi/module_service_ic_call.png b/modules/mogo-module-common/src/main/res/drawable-xhdpi/module_service_ic_call.png
new file mode 100644
index 0000000000..9a9321b3a6
Binary files /dev/null and b/modules/mogo-module-common/src/main/res/drawable-xhdpi/module_service_ic_call.png differ
diff --git a/modules/mogo-module-common/src/main/res/drawable-xhdpi/module_service_ic_rc_accident.png b/modules/mogo-module-common/src/main/res/drawable-xhdpi/module_service_ic_rc_accident.png
new file mode 100644
index 0000000000..8dd43b20a7
Binary files /dev/null and b/modules/mogo-module-common/src/main/res/drawable-xhdpi/module_service_ic_rc_accident.png differ
diff --git a/modules/mogo-module-common/src/main/res/drawable-xhdpi/module_service_ic_rc_accident2.png b/modules/mogo-module-common/src/main/res/drawable-xhdpi/module_service_ic_rc_accident2.png
new file mode 100644
index 0000000000..1e61298d35
Binary files /dev/null and b/modules/mogo-module-common/src/main/res/drawable-xhdpi/module_service_ic_rc_accident2.png differ
diff --git a/modules/mogo-module-common/src/main/res/drawable-xhdpi/module_service_ic_rc_accident3.png b/modules/mogo-module-common/src/main/res/drawable-xhdpi/module_service_ic_rc_accident3.png
new file mode 100755
index 0000000000..fe68bc7cba
Binary files /dev/null and b/modules/mogo-module-common/src/main/res/drawable-xhdpi/module_service_ic_rc_accident3.png differ
diff --git a/modules/mogo-module-common/src/main/res/drawable-xhdpi/module_service_ic_rc_accident3_white.png b/modules/mogo-module-common/src/main/res/drawable-xhdpi/module_service_ic_rc_accident3_white.png
new file mode 100755
index 0000000000..911bee2df4
Binary files /dev/null and b/modules/mogo-module-common/src/main/res/drawable-xhdpi/module_service_ic_rc_accident3_white.png differ
diff --git a/modules/mogo-module-common/src/main/res/drawable-xhdpi/module_service_ic_rc_dark_frog.png b/modules/mogo-module-common/src/main/res/drawable-xhdpi/module_service_ic_rc_dark_frog.png
new file mode 100644
index 0000000000..61296d59d2
Binary files /dev/null and b/modules/mogo-module-common/src/main/res/drawable-xhdpi/module_service_ic_rc_dark_frog.png differ
diff --git a/modules/mogo-module-common/src/main/res/drawable-xhdpi/module_service_ic_rc_dark_frog2.png b/modules/mogo-module-common/src/main/res/drawable-xhdpi/module_service_ic_rc_dark_frog2.png
new file mode 100755
index 0000000000..787101fbb1
Binary files /dev/null and b/modules/mogo-module-common/src/main/res/drawable-xhdpi/module_service_ic_rc_dark_frog2.png differ
diff --git a/modules/mogo-module-common/src/main/res/drawable-xhdpi/module_service_ic_rc_dark_frog2_white.png b/modules/mogo-module-common/src/main/res/drawable-xhdpi/module_service_ic_rc_dark_frog2_white.png
new file mode 100755
index 0000000000..b6164bcfdd
Binary files /dev/null and b/modules/mogo-module-common/src/main/res/drawable-xhdpi/module_service_ic_rc_dark_frog2_white.png differ
diff --git a/modules/mogo-module-common/src/main/res/drawable-xhdpi/module_service_ic_rc_freeze.png b/modules/mogo-module-common/src/main/res/drawable-xhdpi/module_service_ic_rc_freeze.png
new file mode 100644
index 0000000000..ea07251424
Binary files /dev/null and b/modules/mogo-module-common/src/main/res/drawable-xhdpi/module_service_ic_rc_freeze.png differ
diff --git a/modules/mogo-module-common/src/main/res/drawable-xhdpi/module_service_ic_rc_freeze2.png b/modules/mogo-module-common/src/main/res/drawable-xhdpi/module_service_ic_rc_freeze2.png
new file mode 100755
index 0000000000..d34779845e
Binary files /dev/null and b/modules/mogo-module-common/src/main/res/drawable-xhdpi/module_service_ic_rc_freeze2.png differ
diff --git a/modules/mogo-module-common/src/main/res/drawable-xhdpi/module_service_ic_rc_freeze2_white.png b/modules/mogo-module-common/src/main/res/drawable-xhdpi/module_service_ic_rc_freeze2_white.png
new file mode 100755
index 0000000000..353cfefec6
Binary files /dev/null and b/modules/mogo-module-common/src/main/res/drawable-xhdpi/module_service_ic_rc_freeze2_white.png differ
diff --git a/modules/mogo-module-common/src/main/res/drawable-xhdpi/module_service_ic_rc_illegal_park.png b/modules/mogo-module-common/src/main/res/drawable-xhdpi/module_service_ic_rc_illegal_park.png
new file mode 100644
index 0000000000..5923d114f6
Binary files /dev/null and b/modules/mogo-module-common/src/main/res/drawable-xhdpi/module_service_ic_rc_illegal_park.png differ
diff --git a/modules/mogo-module-common/src/main/res/drawable-xhdpi/module_service_ic_rc_illegal_park_white.png b/modules/mogo-module-common/src/main/res/drawable-xhdpi/module_service_ic_rc_illegal_park_white.png
new file mode 100644
index 0000000000..dbc420e8e6
Binary files /dev/null and b/modules/mogo-module-common/src/main/res/drawable-xhdpi/module_service_ic_rc_illegal_park_white.png differ
diff --git a/modules/mogo-module-common/src/main/res/drawable-xhdpi/module_service_ic_rc_parking.png b/modules/mogo-module-common/src/main/res/drawable-xhdpi/module_service_ic_rc_parking.png
new file mode 100644
index 0000000000..33cb8fd3ce
Binary files /dev/null and b/modules/mogo-module-common/src/main/res/drawable-xhdpi/module_service_ic_rc_parking.png differ
diff --git a/modules/mogo-module-common/src/main/res/drawable-xhdpi/module_service_ic_rc_parking2.png b/modules/mogo-module-common/src/main/res/drawable-xhdpi/module_service_ic_rc_parking2.png
new file mode 100644
index 0000000000..8026654bdf
Binary files /dev/null and b/modules/mogo-module-common/src/main/res/drawable-xhdpi/module_service_ic_rc_parking2.png differ
diff --git a/modules/mogo-module-common/src/main/res/drawable-xhdpi/module_service_ic_rc_road_slippery.png b/modules/mogo-module-common/src/main/res/drawable-xhdpi/module_service_ic_rc_road_slippery.png
new file mode 100644
index 0000000000..f11b4a4178
Binary files /dev/null and b/modules/mogo-module-common/src/main/res/drawable-xhdpi/module_service_ic_rc_road_slippery.png differ
diff --git a/modules/mogo-module-common/src/main/res/drawable-xhdpi/module_service_ic_rc_road_slippery_light.png b/modules/mogo-module-common/src/main/res/drawable-xhdpi/module_service_ic_rc_road_slippery_light.png
new file mode 100644
index 0000000000..e78307acd8
Binary files /dev/null and b/modules/mogo-module-common/src/main/res/drawable-xhdpi/module_service_ic_rc_road_slippery_light.png differ
diff --git a/modules/mogo-module-common/src/main/res/drawable-xhdpi/module_service_ic_seek_helping.png b/modules/mogo-module-common/src/main/res/drawable-xhdpi/module_service_ic_seek_helping.png
new file mode 100755
index 0000000000..aa6eb75043
Binary files /dev/null and b/modules/mogo-module-common/src/main/res/drawable-xhdpi/module_service_ic_seek_helping.png differ
diff --git a/modules/mogo-module-common/src/main/res/drawable/bg_map_marker_yellow_info.xml b/modules/mogo-module-common/src/main/res/drawable/bg_map_marker_yellow_info.xml
new file mode 100644
index 0000000000..b2be8e312e
--- /dev/null
+++ b/modules/mogo-module-common/src/main/res/drawable/bg_map_marker_yellow_info.xml
@@ -0,0 +1,15 @@
+
+
- * 在线车辆点击后弹出的info window 样式
- */
-public class UserDataMarkerInfoWindowAdapter implements IMogoInfoWindowAdapter {
-
- private static final String TAG = "UserDataMarkerInfoWindowAdapter";
-
- private static volatile UserDataMarkerInfoWindowAdapter sInstance;
- private final Context mContext;
- private static RefreshApiService sRefreshApiService;
-
- private View mInfoWindowView = null;
-
- private View mContentContainer;
- private MogoImageView mUserHeader;
- private TextView mContent;
- private TextView mTag;
- private ImageView mCall;
-
- private UserDataMarkerInfoWindowAdapter( Context context ) {
- this.mContext = context;
- IMogoNetwork network = MarkerServiceHandler.getApis().getNetworkApi();
- sRefreshApiService = network.create( RefreshApiService.class, RefreshModel.getNetHost() );
- }
-
- public static UserDataMarkerInfoWindowAdapter getInstance( Context context ) {
- if ( sInstance == null ) {
- synchronized ( UserDataMarkerInfoWindowAdapter.class ) {
- if ( sInstance == null ) {
- sInstance = new UserDataMarkerInfoWindowAdapter( context );
- }
- }
- }
- return sInstance;
- }
-
- public synchronized void release() {
- sInstance = null;
- }
-
- @Override
- public View getInfoWindow( IMogoMarker marker ) {
- return inflateView( marker );
- }
-
- private View inflateView( IMogoMarker marker ) {
- if ( marker == null ) {
- return null;
- }
-
- if ( mInfoWindowView == null ) {
- mInfoWindowView = LayoutInflater.from( mContext ).inflate( R.layout.modudle_services_marker_info_window_layout, null );
- mContentContainer = mInfoWindowView.findViewById( R.id.module_service_id_marker_content );
- mUserHeader = mInfoWindowView.findViewById( R.id.module_service_id_user_header );
- mContent = mInfoWindowView.findViewById( R.id.module_service_id_content );
- mTag = mInfoWindowView.findViewById( R.id.module_service_id_tag );
- mCall = mInfoWindowView.findViewById( R.id.module_service_id_call );
- }
-
- if ( DebugConfig.getCarMachineType() == DebugConfig.CAR_MACHINE_TYPE_BYD ) {
- mContentContainer.setPadding(
- mContentContainer.getPaddingLeft(),
- mContentContainer.getPaddingTop(),
- mContentContainer.getResources().getDimensionPixelSize( R.dimen.module_service_id_marker_content_paddingRight_widthoutCall ),
- mContentContainer.getPaddingBottom()
- );
- mCall.setVisibility( View.GONE );
- }
-
- try {
- MarkerShowEntity markerShowEntity = ( MarkerShowEntity ) marker.getObject();
- mContent.setText( markerShowEntity.getTextContent() );
- loadImageHeader( markerShowEntity );
- if ( markerShowEntity.getBindObj() instanceof MarkerOnlineCar ) {
- try {
- mTag.setText( ( ( MarkerOnlineCar ) markerShowEntity.getBindObj() ).getUserInfo().getSafeLabel() );
- } catch ( Exception e ) {
- e.printStackTrace();
- }
- }
- mCall.setOnClickListener( view -> {
- if ( markerShowEntity.getBindObj() instanceof MarkerOnlineCar ) {
- if ( DebugConfig.getNetMode() != DebugConfig.NET_MODE_DEMO ) {
- callToFactUser( markerShowEntity );
- return;
- }
- sRefreshApiService.getMockUsers().subscribeOn( Schedulers.io() )
- .observeOn( AndroidSchedulers.mainThread() )
- .subscribe( new SubscribeImpl< DemoUserInfoEntity >( RequestOptions.create( mContext ) ) {
- @Override
- public void onSuccess( DemoUserInfoEntity o ) {
- super.onSuccess( o );
- callToDemoUser( markerShowEntity, o );
- }
-
- @Override
- public void onError( String message, int code ) {
- super.onError( message, code );
- callToFactUser( markerShowEntity );
- }
- } );
- }
- } );
- } catch ( Exception e ) {
- Logger.e( TAG, e, "error." );
- }
-
- return mInfoWindowView;
- }
-
- private void callToDemoUser( MarkerShowEntity factUser, DemoUserInfoEntity demoUser ) {
- if ( demoUser == null
- || demoUser.getResult() == null
- || demoUser.getResult().getUserList() == null
- || demoUser.getResult().getUserList().isEmpty() ) {
- callToFactUser( factUser );
- return;
- }
- List< DemoUserInfoEntity.ResultBean.UserListBean > users = demoUser.getResult().getUserList();
- for ( DemoUserInfoEntity.ResultBean.UserListBean user : users ) {
- if ( user == null ) {
- continue;
- }
- if ( TextUtils.equals( "1", user.getSceneType() ) ) {
- try {
- ( ( MarkerOnlineCar ) factUser.getBindObj() ).getUserInfo().setSn( user.getUserInfo().getSn() );
- callToFactUser( factUser );
- return;
- } catch ( Exception e ) {
- }
- }
- }
- callToFactUser( factUser );
- }
-
- private void callToFactUser( MarkerShowEntity factUser ) {
- if ( factUser == null ) {
- return;
- }
- Map< String, String > params = new HashMap<>();
- MarkerUserInfo userInfo = ( ( MarkerOnlineCar ) factUser.getBindObj() ).getUserInfo();
- if ( userInfo != null ) {
- params.put( CallChattingProviderConstant.CCPROVIDER_SN, userInfo.getSn() );
- params.put( CallChattingProviderConstant.CCPROVIDER_USER_IMG, userInfo.getUserHead() );
- params.put( CallChattingProviderConstant.CCPROVIDER_USER_AGE, userInfo.getAgeNumber() + "" );
- params.put( CallChattingProviderConstant.CCPROVIDER_NICK_NAME, userInfo.getUserName() );
- params.put( CallChattingProviderConstant.CCPROVIDER_USER_SEX, userInfo.getGender() + "" );
- }
- MarkerLocation location = ( ( MarkerOnlineCar ) factUser.getBindObj() ).getLocation();
- if ( location != null ) {
- params.put( CallChattingProviderConstant.CCPROVIDER_ADDRESS, location.getAddress() );
- params.put( CallChattingProviderConstant.CCPROVIDER_LAT, location.getLat() + "" );
- params.put( CallChattingProviderConstant.CCPROVIDER_LON, location.getLon() + "" );
- }
- Logger.d( TAG, "call parameters: %s", params );
- if ( MarkerServiceHandler.getApis().getStatusManagerApi().isV2XShow() ) {
- MarkerServiceHandler.getCarChatting().callShowWindow( params );
- } else {
- MarkerServiceHandler.getCarChatting().call( params );
- }
- }
-
- protected void loadImageHeader( final MarkerShowEntity markerShowEntity ) {
-
- if ( Looper.myLooper() != Looper.getMainLooper() ) {
- UiThreadHandler.post( () -> {
- runOnUiThread( markerShowEntity );
- } );
- } else {
- runOnUiThread( markerShowEntity );
- }
- }
-
- private void runOnUiThread( final MarkerShowEntity markerShowEntity ) {
- if ( !TextUtils.isEmpty( markerShowEntity.getIconUrl() ) ) {
- MarkerServiceHandler.getImageloader().displayImage( markerShowEntity.getIconUrl(),
- mUserHeader,
- WindowUtils.dip2px( mContext, 50 ), WindowUtils.dip2px( mContext, 50 ), null );
-
- } else {
- mUserHeader.setBackgroundResource( R.drawable.icon_default_user_head );
- }
- }
-}
diff --git a/modules/mogo-module-service/src/main/res/drawable-xhdpi/icon_map_marker_location_yellow_vr.png b/modules/mogo-module-service/src/main/res/drawable-xhdpi/icon_map_marker_location_yellow_vr.png
new file mode 100644
index 0000000000..eca4f04cef
Binary files /dev/null and b/modules/mogo-module-service/src/main/res/drawable-xhdpi/icon_map_marker_location_yellow_vr.png differ
diff --git a/modules/mogo-module-v2x/src/main/java/com/mogo/module/v2x/listener/V2XMessageListener_401003.java b/modules/mogo-module-v2x/src/main/java/com/mogo/module/v2x/listener/V2XMessageListener_401003.java
index 17eca2d238..fcceadaf2e 100644
--- a/modules/mogo-module-v2x/src/main/java/com/mogo/module/v2x/listener/V2XMessageListener_401003.java
+++ b/modules/mogo-module-v2x/src/main/java/com/mogo/module/v2x/listener/V2XMessageListener_401003.java
@@ -101,10 +101,6 @@ public class V2XMessageListener_401003 implements IMogoOnMessageListener> v2XMessageEntity =
+ V2XMessageEntity
> getV2XScenarionVRReverseCarData() {
+ public static V2XMessageEntity
> v2xMessageEntity = new V2XMessageEntity<>();
+ V2XMessageEntity