From 679e183859df900e7866212373d3bad6c9954d7e Mon Sep 17 00:00:00 2001 From: liujing Date: Thu, 15 Apr 2021 10:30:06 +0800 Subject: [PATCH] =?UTF-8?q?=E9=A2=84=E8=AD=A6=E8=AF=86=E5=88=AB=E7=89=A9?= =?UTF-8?q?=E4=B8=8B=E6=96=B9=E7=BA=A2=E8=89=B2=E5=9C=86=E5=9C=88=E4=BD=8D?= =?UTF-8?q?=E7=BD=AE=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../mogo/module/common/drawer/V2XWarnDataDrawer.java | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/modules/mogo-module-common/src/main/java/com/mogo/module/common/drawer/V2XWarnDataDrawer.java b/modules/mogo-module-common/src/main/java/com/mogo/module/common/drawer/V2XWarnDataDrawer.java index a38db88df2..71bbe6a00d 100644 --- a/modules/mogo-module-common/src/main/java/com/mogo/module/common/drawer/V2XWarnDataDrawer.java +++ b/modules/mogo-module-common/src/main/java/com/mogo/module/common/drawer/V2XWarnDataDrawer.java @@ -88,8 +88,9 @@ public class V2XWarnDataDrawer extends BaseDrawer implements IMogoStatusChangedL IMogoMarker bottomMarker = drawMarkerWith2Resource(markerShowEntity); - //2D资源图片位置调整 MogoLatLng mogoLatLng = new MogoLatLng(data.getCollisionLat(), data.getCollisionLon()); + //2D资源图片位置调整 + MogoLatLng stopLineNew = Trigonometric.getNewLocation(data.getStopLines().get(1), 8, 180); MogoLatLng newLocation = Trigonometric.getNewLocation(mogoLatLng, 8, 180); IMogoMarker marker = drawMarker(markerShowEntity); @@ -100,8 +101,8 @@ public class V2XWarnDataDrawer extends BaseDrawer implements IMogoStatusChangedL data.getDirection() == 1 ? data.getStopLines().get(1).lon : data.getCollisionLon()), (float) data.getHeading(), 5000); //识别物下方的红色圆圈 bottomMarker.addDynamicAnchorPosition(new MogoLatLng( - data.getDirection() == 1 ? data.getStopLines().get(1).lat : newLocation.getLat(), - data.getDirection() == 1 ? data.getStopLines().get(1).lon : newLocation.getLon()), (float) data.getHeading(), 5000); + data.getDirection() == 1 ? stopLineNew.lat : newLocation.getLat(), + data.getDirection() == 1 ? stopLineNew.lon : newLocation.getLon()), (float) data.getHeading(), 5000); //移动完成以后,3s后消失 UiThreadHandler.postDelayed(() -> { marker.remove(); @@ -127,7 +128,7 @@ public class V2XWarnDataDrawer extends BaseDrawer implements IMogoStatusChangedL return marker; } - public void drawerMarkerWithLocation(MarkerShowEntity markerShowEntity, MogoLatLng location){ + public void drawerMarkerWithLocation(MarkerShowEntity markerShowEntity, MogoLatLng location) { MogoMarkerOptions options = new MogoMarkerOptions() .object(markerShowEntity) .latitude(location.getLat()) @@ -140,6 +141,7 @@ public class V2XWarnDataDrawer extends BaseDrawer implements IMogoStatusChangedL iMarkerView.setMarker(marker); marker.setToTop(); } + /* * 2D资源绘制marker底部的红色圆圈 * */