From 9c528128e8ba49aac3518d9bc9544beb486b2db1 Mon Sep 17 00:00:00 2001 From: liujing Date: Mon, 21 Dec 2020 13:22:20 +0800 Subject: [PATCH] =?UTF-8?q?=E8=BF=9D=E7=AB=A0=E5=81=9C=E8=BD=A6=E8=87=AA?= =?UTF-8?q?=E7=A0=94=E5=9C=B0=E5=9B=BE=E8=BF=9D=E7=AB=A0=E5=81=9C=E8=BD=A6?= =?UTF-8?q?=E5=9B=BE=E6=A0=87-2d=20=20=E8=BF=98=E5=AD=98=E5=9C=A8=E9=97=AE?= =?UTF-8?q?=E9=A2=98:=E5=9B=BE=E6=A0=87=E7=89=B9=E5=88=AB=E5=B0=8F,?= =?UTF-8?q?=E4=BB=A5=E8=82=89=E7=9C=BC=E5=8F=AF=E8=A7=81=E9=80=9F=E5=BA=A6?= =?UTF-8?q?=E6=89=A9=E5=A4=A7=E4=B8=BA=E6=AD=A3=E5=B8=B8=E5=B0=BA=E5=AF=B8?= =?UTF-8?q?=E5=9B=BE=E6=A0=87?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../scenario/scene/park/V2XIllegalParkMarker.java | 13 ++++++++++++- .../src/main/res/raw/scenario_seek_help.json | 4 ++-- 2 files changed, 14 insertions(+), 3 deletions(-) diff --git a/modules/mogo-module-v2x/src/main/java/com/mogo/module/v2x/scenario/scene/park/V2XIllegalParkMarker.java b/modules/mogo-module-v2x/src/main/java/com/mogo/module/v2x/scenario/scene/park/V2XIllegalParkMarker.java index a0e383bb30..a0a548676b 100644 --- a/modules/mogo-module-v2x/src/main/java/com/mogo/module/v2x/scenario/scene/park/V2XIllegalParkMarker.java +++ b/modules/mogo-module-v2x/src/main/java/com/mogo/module/v2x/scenario/scene/park/V2XIllegalParkMarker.java @@ -1,5 +1,6 @@ package com.mogo.module.v2x.scenario.scene.park; +import android.content.Context; import android.graphics.Bitmap; import android.os.Handler; import android.view.animation.AccelerateInterpolator; @@ -15,15 +16,20 @@ import com.mogo.module.common.drawer.marker.MapMarkerAdapter; import com.mogo.module.common.drawer.marker.RoadConditionInfoWindow3DAdapter; import com.mogo.module.common.entity.MarkerExploreWay; import com.mogo.module.common.entity.MarkerShowEntity; +import com.mogo.module.common.entity.V2XRoadEventEntity; import com.mogo.module.service.ServiceConst; import com.mogo.module.v2x.V2XServiceManager; +import com.mogo.module.v2x.marker.V2XMarkerAdapter; import com.mogo.module.v2x.scenario.view.IV2XMarker; import com.mogo.module.v2x.utils.MarkerUtils; import com.mogo.utils.ViewUtils; import com.mogo.utils.WorkThreadHandler; + import java.util.ArrayList; import java.util.List; + import static com.mogo.module.v2x.V2XConst.MODULE_NAME; +import static com.mogo.module.v2x.V2XConst.V2X_EVENT_ALARM_POI; /** * author : donghongyu @@ -66,6 +72,11 @@ public class V2XIllegalParkMarker implements IV2XMarker> markerShowEntity.setMarkerLocation(markerExploreWay.getLocation()); markerShowEntity.setMarkerType(ServiceConst.CARD_TYPE_NOVELTY); + // 进行数据转换,用于Marker展示 + V2XRoadEventEntity roadEventEntity = new V2XRoadEventEntity(); + roadEventEntity.setLocation(markerExploreWay.getLocation()); + roadEventEntity.setBindObj(markerExploreWay); + WorkThreadHandler.getInstance().postDelayed(() -> { IMogoMarker mogoMarker; if (V2XServiceManager.getMoGoStatusManager().isVrMode()) { @@ -76,7 +87,7 @@ public class V2XIllegalParkMarker implements IV2XMarker> IMarkerView markerView = MapMarkerAdapter.getMarkerView(AbsMogoApplication.getApp(), markerShowEntity, optionsRipple); Bitmap bitmap = ViewUtils.fromView(markerView.getView()); optionsRipple.icon(bitmap); - mogoMarker = V2XServiceManager.getIMogoMarkerService().drawMarker(markerShowEntity); + mogoMarker = V2XServiceManager.getMarkerManager().addMarker(V2X_EVENT_ALARM_POI, optionsRipple); } // 点击监听,天际弹窗展示详情 if (mogoMarker != null) { diff --git a/modules/mogo-module-v2x/src/main/res/raw/scenario_seek_help.json b/modules/mogo-module-v2x/src/main/res/raw/scenario_seek_help.json index 1252a70ebf..29fad1e867 100644 --- a/modules/mogo-module-v2x/src/main/res/raw/scenario_seek_help.json +++ b/modules/mogo-module-v2x/src/main/res/raw/scenario_seek_help.json @@ -3,8 +3,8 @@ { "createTime": 1593678359872, "distance": 1100, - "lat": 39.969057, - "lon": 116.417831, + "lat":39.969055, + "lon":116.410811, "sn": "ZD801B1932L00041", "targetId": 20007, "targetName": "故障车",