From f406171026e75165853506ed0c3a05ff5dd52eed Mon Sep 17 00:00:00 2001 From: liujing Date: Sun, 20 Dec 2020 11:39:19 +0800 Subject: [PATCH] =?UTF-8?q?=E8=BF=9D=E7=AB=A0=E5=81=9C=E8=BD=A6vr=E6=A8=A1?= =?UTF-8?q?=E5=BC=8F=E6=B7=BB=E5=8A=A0=E6=89=93=E7=82=B9,=E8=87=AA?= =?UTF-8?q?=E7=A0=942d=E6=A8=A1=E5=BC=8F=E5=9B=BE=E7=89=87=E6=98=BE?= =?UTF-8?q?=E7=A4=BA=E5=A4=AA=E5=B0=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../manager/impl/MoGoV2XMarkerManager.java | 2 ++ .../scene/park/V2XIllegalParkMarker.java | 25 +++++++++++++++- .../src/main/res/raw/illegal_park_data.json | 4 +-- .../raw/scenario_fatigue_driving_data.json | 8 ++--- .../res/raw/scenario_road_event_data.json | 8 ++--- .../src/main/res/raw/scenario_seek_help.json | 30 +++++++++---------- 6 files changed, 51 insertions(+), 26 deletions(-) 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 9e3b9b2ad7..e1156aeb49 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 @@ -9,6 +9,7 @@ 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.IMogoMarkerManager; import com.mogo.map.marker.MogoMarkerOptions; import com.mogo.map.uicontroller.EnumMapUI; import com.mogo.module.common.drawer.MarkerDrawer; @@ -554,6 +555,7 @@ public class MoGoV2XMarkerManager implements IMoGoV2XMarkerManager { mAlarmInfoMarker.setInfoWindowAdapter(new RoadConditionInfoWindow3DAdapter(markerShowEntity, AbsMogoApplication.getApp(), mAlarmInfoMarker.getMogoMarkerOptions())); mAlarmInfoMarker.showInfoWindow(); } else { + IMogoMarkerManager i = V2XServiceManager.getMarkerManager(); mAlarmInfoMarker = V2XServiceManager.getMarkerManager().addMarker(V2X_EVENT_ALARM_POI, optionsRipple); } // 当前Marker设置为最上面 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 cc940e252e..9d42604e53 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 @@ -4,12 +4,19 @@ import android.os.Handler; import android.view.animation.AccelerateInterpolator; import android.view.animation.LinearInterpolator; +import com.mogo.commons.AbsMogoApplication; import com.mogo.map.marker.IMogoMarker; +import com.mogo.map.marker.IMogoMarkerManager; +import com.mogo.map.marker.MogoMarkerOptions; import com.mogo.map.marker.anim.OnMarkerAnimationListener; +import com.mogo.module.common.drawer.MarkerDrawer; +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.utils.CarSeries; 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.WorkThreadHandler; @@ -19,6 +26,7 @@ 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 @@ -46,6 +54,14 @@ public class V2XIllegalParkMarker implements IV2XMarker> if (entityList != null) { for (int i = 0; i < entityList.size(); i++) { MarkerExploreWay markerExploreWay = entityList.get(i); + + // 道路事件,或者水波纹扩散效果 + MogoMarkerOptions optionsRipple = new MogoMarkerOptions() + .object(markerExploreWay) + .latitude(markerExploreWay.getLocation().getLat()) + .longitude(markerExploreWay.getLocation().getLon()); + optionsRipple.anchor(0.5f, 0.5f); + MarkerShowEntity markerShowEntity = new MarkerShowEntity(); markerShowEntity.setBindObj(markerExploreWay); markerShowEntity.setChecked(false); @@ -54,7 +70,14 @@ public class V2XIllegalParkMarker implements IV2XMarker> markerShowEntity.setMarkerType(ServiceConst.CARD_TYPE_NOVELTY); WorkThreadHandler.getInstance().postDelayed(() -> { - IMogoMarker mogoMarker = V2XServiceManager.getIMogoMarkerService().drawMarker(markerShowEntity); + IMogoMarker mogoMarker; + if (V2XServiceManager.getMoGoStatusManager().isVrMode()) { + mogoMarker = MarkerDrawer.getInstance().drawMapMarkerImpl(markerShowEntity, MarkerDrawer.MARKER_Z_INDEX_HIGH, null); + mogoMarker.setInfoWindowAdapter(new RoadConditionInfoWindow3DAdapter(markerShowEntity, AbsMogoApplication.getApp(), mogoMarker.getMogoMarkerOptions())); + mogoMarker.showInfoWindow(); + } else { + mogoMarker = V2XServiceManager.getIMogoMarkerService().drawMarker(markerShowEntity); + } // 点击监听,天际弹窗展示详情 if (mogoMarker != null) { mogoMarker.startScaleAnimation(0, 1.2f, 0, 1.2f, 300, new AccelerateInterpolator(), new OnMarkerAnimationListener() { diff --git a/modules/mogo-module-v2x/src/main/res/raw/illegal_park_data.json b/modules/mogo-module-v2x/src/main/res/raw/illegal_park_data.json index aa78a935f3..0bd143d281 100644 --- a/modules/mogo-module-v2x/src/main/res/raw/illegal_park_data.json +++ b/modules/mogo-module-v2x/src/main/res/raw/illegal_park_data.json @@ -18,8 +18,8 @@ "location":{ "address":"北三环麻家什字", "angle":0, - "lat":39.968598, - "lon":116.411121 + "lat":39.969057, + "lon":116.417831 }, "generateTime":0, "distance":0, diff --git a/modules/mogo-module-v2x/src/main/res/raw/scenario_fatigue_driving_data.json b/modules/mogo-module-v2x/src/main/res/raw/scenario_fatigue_driving_data.json index e6612d5f41..e825678c42 100644 --- a/modules/mogo-module-v2x/src/main/res/raw/scenario_fatigue_driving_data.json +++ b/modules/mogo-module-v2x/src/main/res/raw/scenario_fatigue_driving_data.json @@ -14,11 +14,11 @@ "zoom": true, "zoomScale": 15, "location": { - "lat":39.969088, - "lon":116.41808 + "lat":39.968738, + "lon":116.411288 }, - "lat":39.969088, - "lon":116.41808, + "lat":39.968738, + "lon":116.411288, "userHead": "https://yycp-static-1255510688.cos.ap-beijing.myqcloud.com/defaultUserHeadImg/5.png", "msgImgUrl": "https://upload.jianshu.io/users/upload_avatars/7663825/7c28763e-002b-4e89-8dea-5b8da210ef2c.jpg" } \ No newline at end of file diff --git a/modules/mogo-module-v2x/src/main/res/raw/scenario_road_event_data.json b/modules/mogo-module-v2x/src/main/res/raw/scenario_road_event_data.json index ce7f84f44f..e9ab6a1b79 100644 --- a/modules/mogo-module-v2x/src/main/res/raw/scenario_road_event_data.json +++ b/modules/mogo-module-v2x/src/main/res/raw/scenario_road_event_data.json @@ -5,8 +5,8 @@ "location":{ "address":"北三环环球贸易中心", "angle":270, - "lat":39.969088, - "lon":116.41808 + "lat":39.969057, + "lon":116.417831 }, "noveltyInfo":{ "addr":"北三环环球贸易中心", @@ -27,8 +27,8 @@ "location":{ "address":"北三环环球贸易中心", "angle":270, - "lat":39.969088, - "lon":116.41808 + "lat":39.969057, + "lon":116.417831 }, "poiType":"10003", "type":"CARD_TYPE_ROAD_CONDITION", 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 58853e2a6f..f7316d824e 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 @@ -1,20 +1,20 @@ { - "coordinates":[ + "coordinates": [ { - "createTime":1593678359872, - "distance":1100, - "lat":39.969088, - "lon":116.41808, - "sn":"ZD801B1932L00041", - "targetId":20007, - "targetName":"故障车", - "userInfo":{ - "age":33, - "displayName":"小叮当", - "headImgUrl":"http://img.zhidaohulian.com/fileServer/api/qa/user_info/1243669495923/7c476a0515aa51ae355d10d7f21c898e.jpg", - "sex":1, - "sn":"ZD801B1932L00041", - "userId":1243669495923 + "createTime": 1593678359872, + "distance": 1100, + "lat":39.969057, + "lon":116.417831, + "sn": "ZD801B1932L00041", + "targetId": 20007, + "targetName": "故障车", + "userInfo": { + "age": 33, + "displayName": "小叮当", + "headImgUrl": "http://img.zhidaohulian.com/fileServer/api/qa/user_info/1243669495923/7c476a0515aa51ae355d10d7f21c898e.jpg", + "sex": 1, + "sn": "ZD801B1932L00041", + "userId": 1243669495923 } } ]