From 2ed6b944c4a658ed8f1051e9495550d2fec9b88a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=91=A3=E5=AE=8F=E5=AE=87?= Date: Thu, 9 Jan 2020 18:17:11 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E4=BA=86=E5=9B=A0=E4=B8=BA?= =?UTF-8?q?=E5=85=B6=E4=BB=96=E6=A8=A1=E5=9D=97=E6=B2=A1=E6=9C=89=E8=AE=BE?= =?UTF-8?q?=E7=BD=AEmoduleName=E5=AF=BC=E8=87=B4Marker=E5=9B=9E=E8=B0=83?= =?UTF-8?q?=E5=BC=82=E5=B8=B8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../module/main/cards/MogoModulesManager.java | 2 +- .../module/service/MarkerServiceHandler.java | 21 +++++-------------- 2 files changed, 6 insertions(+), 17 deletions(-) diff --git a/modules/mogo-module-main/src/main/java/com/mogo/module/main/cards/MogoModulesManager.java b/modules/mogo-module-main/src/main/java/com/mogo/module/main/cards/MogoModulesManager.java index 25104639c8..f5408062a9 100644 --- a/modules/mogo-module-main/src/main/java/com/mogo/module/main/cards/MogoModulesManager.java +++ b/modules/mogo-module-main/src/main/java/com/mogo/module/main/cards/MogoModulesManager.java @@ -475,7 +475,7 @@ public class MogoModulesManager implements MogoModulesHandler, @Override public void onMarkerReceive(IMogoMarker marker) { for (IMogoModuleProvider value : mModuleProviders.values()) { - if (value.getModuleName().equals(marker.getOwner())) { + if (value.getModuleName()!=null && value.getModuleName().equals(marker.getOwner())) { if (value.getMarkerClickListener() != null) { value.getMarkerClickListener().onMarkerClicked(marker); } diff --git a/modules/mogo-module-service/src/main/java/com/mogo/module/service/MarkerServiceHandler.java b/modules/mogo-module-service/src/main/java/com/mogo/module/service/MarkerServiceHandler.java index bc4c063be6..36bc7852a3 100644 --- a/modules/mogo-module-service/src/main/java/com/mogo/module/service/MarkerServiceHandler.java +++ b/modules/mogo-module-service/src/main/java/com/mogo/module/service/MarkerServiceHandler.java @@ -26,7 +26,6 @@ import com.mogo.service.map.IMogoMapService; import com.mogo.utils.TipToast; import com.mogo.utils.logger.Logger; -import java.util.ArrayList; import java.util.List; import java.util.Random; @@ -88,16 +87,13 @@ public class MarkerServiceHandler { List exploreWay = markerCardResult.getExploreWay(); List shareMusic = markerCardResult.getShareMusic(); - ArrayList optionsList = new ArrayList<>(); - if (carChat != null) { for (MarkerCarChat markerCarChat : carChat) { MarkerLocation markerLocation = markerCarChat.getLocation(); drawMapMarker( markerCarChat.getType(), markerCarChat, - markerLocation, - optionsList); + markerLocation); } } @@ -107,8 +103,7 @@ public class MarkerServiceHandler { drawMapMarker( markerOnlineCar.getType(), markerOnlineCar, - markerLocation, - optionsList); + markerLocation); } } @@ -118,8 +113,7 @@ public class MarkerServiceHandler { drawMapMarker( markerExploreWay.getType(), markerExploreWay, - markerLocation, - optionsList); + markerLocation); } } @@ -129,8 +123,7 @@ public class MarkerServiceHandler { drawMapMarker( markerShareMusic.getType(), markerShareMusic, - markerLocation, - optionsList); + markerLocation); } } @@ -186,12 +179,10 @@ public class MarkerServiceHandler { * @param markerTag Marker类型 * http://gitlab.zhidaoauto.com/ecos/yycp-service/CarLauncher-Docs/blob/master/%E5%8D%A1%E7%89%87%E7%B1%BB%E5%9E%8B%E5%AE%9A%E4%B9%89.md * @param markerLocation 要绘制Marker的位置信息 - * @param optionsList 要加入的Marker集合 */ public static void drawMapMarker(String markerTag, Object bindObject, - MarkerLocation markerLocation, - ArrayList optionsList) { + MarkerLocation markerLocation) { Logger.e(TAG, "绘制Marker====markerTag:" + markerTag); MapMarkerView mapMarkerView = new MapMarkerView(mContext); @@ -214,7 +205,6 @@ public class MarkerServiceHandler { public static void drawMapMarker() { Logger.e(TAG, "=====绘制Marker===="); - MapMarkerView mapMarkerView = new MapMarkerView(mContext); MogoMarkerOptions options = new MogoMarkerOptions() @@ -228,6 +218,5 @@ public class MarkerServiceHandler { marker.setObject("我是Marker上面绑定的数据"); getMapUIController().changeZoom(10); - } }