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底部的红色圆圈 * */