diff --git a/modules/mogo-module-v2x/src/main/java/com/mogo/module/v2x/manager/impl/MoGoV2XMarkerManager.java b/modules/mogo-module-v2x/src/main/java/com/mogo/module/v2x/manager/impl/MoGoV2XMarkerManager.java index 21e184ed1f..9e3b9b2ad7 100644 --- a/modules/mogo-module-v2x/src/main/java/com/mogo/module/v2x/manager/impl/MoGoV2XMarkerManager.java +++ b/modules/mogo-module-v2x/src/main/java/com/mogo/module/v2x/manager/impl/MoGoV2XMarkerManager.java @@ -4,14 +4,17 @@ import android.content.Context; import android.graphics.Bitmap; import com.alibaba.android.arouter.facade.annotation.Route; +import com.mogo.commons.AbsMogoApplication; import com.mogo.map.MogoLatLng; import com.mogo.map.location.MogoLocation; import com.mogo.map.marker.IMogoMarker; import com.mogo.map.marker.IMogoMarkerClickListener; import com.mogo.map.marker.MogoMarkerOptions; import com.mogo.map.uicontroller.EnumMapUI; +import com.mogo.module.common.drawer.MarkerDrawer; import com.mogo.module.common.drawer.marker.IMarkerView; import com.mogo.module.common.drawer.marker.MapMarkerAdapter; +import com.mogo.module.common.drawer.marker.RoadConditionInfoWindow3DAdapter; import com.mogo.module.common.entity.MarkerCardResult; import com.mogo.module.common.entity.MarkerExploreWay; import com.mogo.module.common.entity.MarkerLocation; @@ -532,6 +535,13 @@ public class MoGoV2XMarkerManager implements IMoGoV2XMarkerManager { .longitude(roadEventEntity.getLocation().getLon()); optionsRipple.anchor(0.5f, 0.5f); + MarkerShowEntity markerShowEntity = new MarkerShowEntity(); + MarkerExploreWay markerExploreWay = roadEventEntity.getNoveltyInfo(); + markerShowEntity.setBindObj(markerExploreWay); + markerShowEntity.setMarkerLocation(markerExploreWay.getLocation()); + markerShowEntity.setMarkerType(markerExploreWay.getPoiType()); + markerShowEntity.setTextContent(markerExploreWay.getPoiType()); + // 由于性能问题,D车机不使用事件扩散动画 if (!CarSeries.isF8xxSeries()) { optionsRipple.icon(V2XMarkerAdapter.getV2XRoadEventViewPng(context, roadEventEntity)); @@ -539,8 +549,13 @@ public class MoGoV2XMarkerManager implements IMoGoV2XMarkerManager { optionsRipple.icons(V2XMarkerAdapter.getV2XRoadEventViewGif(context, roadEventEntity)); optionsRipple.period(1); } - - mAlarmInfoMarker = V2XServiceManager.getMarkerManager().addMarker(V2X_EVENT_ALARM_POI, optionsRipple); + if (V2XServiceManager.getMoGoStatusManager().isVrMode()) { + mAlarmInfoMarker = MarkerDrawer.getInstance().drawMapMarkerImpl(markerShowEntity, MarkerDrawer.MARKER_Z_INDEX_HIGH, clickListener); + mAlarmInfoMarker.setInfoWindowAdapter(new RoadConditionInfoWindow3DAdapter(markerShowEntity, AbsMogoApplication.getApp(), mAlarmInfoMarker.getMogoMarkerOptions())); + mAlarmInfoMarker.showInfoWindow(); + } else { + mAlarmInfoMarker = V2XServiceManager.getMarkerManager().addMarker(V2X_EVENT_ALARM_POI, optionsRipple); + } // 当前Marker设置为最上面 mAlarmInfoMarker.setToTop(); // 绘制连接线