diff --git a/modules/mogo-module-common/src/main/res/drawable-xhdpi/icon_heart_choose.png b/modules/mogo-module-common/src/main/res/drawable-xhdpi/icon_heart_choose.png
index d6c0f59110..2310d30095 100644
Binary files a/modules/mogo-module-common/src/main/res/drawable-xhdpi/icon_heart_choose.png and b/modules/mogo-module-common/src/main/res/drawable-xhdpi/icon_heart_choose.png differ
diff --git a/modules/mogo-module-common/src/main/res/drawable-xhdpi/icon_heart_second.png b/modules/mogo-module-common/src/main/res/drawable-xhdpi/icon_heart_second.png
index bb5cf70654..94112d4498 100644
Binary files a/modules/mogo-module-common/src/main/res/drawable-xhdpi/icon_heart_second.png and b/modules/mogo-module-common/src/main/res/drawable-xhdpi/icon_heart_second.png differ
diff --git a/modules/mogo-module-common/src/main/res/drawable-xhdpi/icon_heart_unchoose.png b/modules/mogo-module-common/src/main/res/drawable-xhdpi/icon_heart_unchoose.png
index 3a74a64a43..4700e20da9 100644
Binary files a/modules/mogo-module-common/src/main/res/drawable-xhdpi/icon_heart_unchoose.png and b/modules/mogo-module-common/src/main/res/drawable-xhdpi/icon_heart_unchoose.png differ
diff --git a/modules/mogo-module-common/src/main/res/values-xhdpi/dimens.xml b/modules/mogo-module-common/src/main/res/values-xhdpi/dimens.xml
index 9692e54e2a..7934f758bd 100644
--- a/modules/mogo-module-common/src/main/res/values-xhdpi/dimens.xml
+++ b/modules/mogo-module-common/src/main/res/values-xhdpi/dimens.xml
@@ -1054,8 +1054,8 @@
48px
-10px
10px
- 40px
- 43px
+ 33px
+ 30px
300px
281px
90px
diff --git a/modules/mogo-module-v2x/src/main/java/com/mogo/module/v2x/scenario/scene/pushVR/V2XPushVREventMarker.java b/modules/mogo-module-v2x/src/main/java/com/mogo/module/v2x/scenario/scene/pushVR/V2XPushVREventMarker.java
index ceac813627..9bef9c7a88 100644
--- a/modules/mogo-module-v2x/src/main/java/com/mogo/module/v2x/scenario/scene/pushVR/V2XPushVREventMarker.java
+++ b/modules/mogo-module-v2x/src/main/java/com/mogo/module/v2x/scenario/scene/pushVR/V2XPushVREventMarker.java
@@ -32,11 +32,8 @@ public class V2XPushVREventMarker implements IV2XMarker {
private final String TAG = "V2XPushVREventMarker";
private static IMogoPolyline mMogoPolyline;
-
- // 上次的道路事件的预警Marker
private static IMogoMarker mAlarmInfoMarker;
-
@Override
public void drawPOI(V2XPushMessageEntity entity) {
Logger.w(V2XConst.MODULE_NAME + "_" + TAG, "drawPOI 绘制VR Marker");
@@ -49,42 +46,46 @@ public class V2XPushVREventMarker implements IV2XMarker {
if (mMogoPolyline != null) {
mMogoPolyline.remove();
}
+ drawableEventMarker(entity);
- // 道路事件,或者水波纹扩散效果
- MogoMarkerOptions optionsRipple = new MogoMarkerOptions()
- .object(entity)
- .latitude(entity.getLat())
- .longitude(entity.getLon());
- optionsRipple.anchor(0.5f, 0.5f);
-
- optionsRipple.icon(V2XMarkerAdapter.getV2XVRRoadEventViewPng(entity));
- mAlarmInfoMarker = V2XServiceManager.getMarkerManager().addMarker(V2X_EVENT_ALARM_POI, optionsRipple);
- moveTrack(entity);
-// drawablePloyLine(entity);
+ // 绘制引导线
+ drawablePloyLine(entity);
+ drawableRecommendPolyline(entity);
} catch (Exception e) {
e.printStackTrace();
}
}
- /*
- 平滑移动
- * */
- void moveTrack(V2XPushMessageEntity entity) {
- List points = new ArrayList();
- List polylines = entity.getMoveTrack();
- for (int i = 0; i < polylines.size(); i++) {
- try {
- double[] latlonList = polylines.get(i);
- MogoLatLng latLng = new MogoLatLng(latlonList[1], latlonList[0]);
- points.add(latLng);
- } catch (Exception e) {
- e.printStackTrace();
- }
+ /**
+ * 绘制事件点
+ *
+ * @param entity
+ */
+ void drawableEventMarker(V2XPushMessageEntity entity) {
+ // 道路事件
+ MogoMarkerOptions optionsRipple = new MogoMarkerOptions()
+ .object(entity)
+ .latitude(entity.getLat())
+ .longitude(entity.getLon());
+ optionsRipple.anchor(0.5f, 0.5f);
+
+ optionsRipple.icon(V2XMarkerAdapter.getV2XVRRoadEventViewPng(entity));
+ mAlarmInfoMarker = V2XServiceManager.getMarkerManager().addMarker(V2X_EVENT_ALARM_POI, optionsRipple);
+
+ List points = new ArrayList<>();
+
+ for (double[] doubles : entity.getMoveTrack()) {
+ points.add(new MogoLatLng(doubles[1], doubles[0]));
}
- Log.d("平滑移动经纬度=====",points.toString());
- mAlarmInfoMarker.startSmooth(points, 1);
+
+ mAlarmInfoMarker.startSmooth(points, 10);
}
+ /**
+ * 绘制引导线
+ *
+ * @param entity
+ */
void drawablePloyLine(V2XPushMessageEntity entity) {
// 连接线参数
MogoPolylineOptions options = new MogoPolylineOptions();
@@ -96,7 +97,7 @@ public class V2XPushVREventMarker implements IV2XMarker {
colors.add(0xFFFA8C34);
// 线条粗细,渐变,渐变色值
- options.width(15).useGradient(true).colorValues(colors);
+ options.width(15).useGradient(true).color(0xFFFA8C34);
for (double[] doubles : entity.getPolyline()) {
options.add(doubles[0], doubles[1]);
@@ -106,6 +107,32 @@ public class V2XPushVREventMarker implements IV2XMarker {
mMogoPolyline = V2XServiceManager.getMogoOverlayManager().addPolyline(options);
}
+ /**
+ * 绘制推荐引导线
+ *
+ * @param entity
+ */
+ void drawableRecommendPolyline(V2XPushMessageEntity entity) {
+ // 连接线参数
+ MogoPolylineOptions options = new MogoPolylineOptions();
+
+ // 渐变色
+ List colors = new ArrayList<>();
+ colors.add(0xFFF95959);
+ colors.add(0xFF942B48);
+ colors.add(0xFFCB253A);
+
+ // 线条粗细,渐变,渐变色值
+ options.width(15).useGradient(true).color(0xFFCB253A);
+
+ for (double[] doubles : entity.getRecommendPolyline()) {
+ options.add(doubles[0], doubles[1]);
+ }
+
+ // 绘制线的对象
+ mMogoPolyline = V2XServiceManager.getMogoOverlayManager().addPolyline(options);
+ }
+
@Override
public void clearPOI() {
// 锁车就是将地图视图移植中心点,因为行驶中的车和地图要相对的跟随
diff --git a/modules/mogo-module-v2x/src/main/java/com/mogo/module/v2x/scenario/scene/pushVR/V2XPushVREventScenario.java b/modules/mogo-module-v2x/src/main/java/com/mogo/module/v2x/scenario/scene/pushVR/V2XPushVREventScenario.java
index 73bda859aa..17f63180d6 100644
--- a/modules/mogo-module-v2x/src/main/java/com/mogo/module/v2x/scenario/scene/pushVR/V2XPushVREventScenario.java
+++ b/modules/mogo-module-v2x/src/main/java/com/mogo/module/v2x/scenario/scene/pushVR/V2XPushVREventScenario.java
@@ -35,7 +35,7 @@ public class V2XPushVREventScenario
synchronized (V2XPushVREventScenario.class) {
if (mV2XPushEventScenario == null) {
mV2XPushEventScenario = new V2XPushVREventScenario();
- mV2XPushEventScenario.setV2XMarker(new V2XPushVRNiXiangEventMarker());
+ mV2XPushEventScenario.setV2XMarker(new V2XPushVREventMarker());
mV2XPushEventScenario.setV2XWindow(new V2XPushVREventWindow());
}
}
diff --git a/modules/mogo-module-v2x/src/main/java/com/mogo/module/v2x/scenario/scene/pushVR/V2XPushVRNiXiangEventMarker.java b/modules/mogo-module-v2x/src/main/java/com/mogo/module/v2x/scenario/scene/pushVR/V2XPushVRNiXiangEventMarker.java
deleted file mode 100644
index 3c7bc93e95..0000000000
--- a/modules/mogo-module-v2x/src/main/java/com/mogo/module/v2x/scenario/scene/pushVR/V2XPushVRNiXiangEventMarker.java
+++ /dev/null
@@ -1,159 +0,0 @@
-package com.mogo.module.v2x.scenario.scene.pushVR;
-
-import com.mogo.map.MogoLatLng;
-import com.mogo.map.marker.IMogoMarker;
-import com.mogo.map.marker.MogoMarkerOptions;
-import com.mogo.map.overlay.IMogoPolyline;
-import com.mogo.map.overlay.MogoPolylineOptions;
-import com.mogo.module.common.entity.V2XPushMessageEntity;
-import com.mogo.module.v2x.V2XConst;
-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.logger.Logger;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import static com.mogo.module.v2x.V2XConst.V2X_EVENT_ALARM_POI;
-
-/**
- * author : donghongyu
- * e-mail : 1358506549@qq.com
- * date : 2020/5/15 5:37 PM
- * desc : 逆向来车
- * version: 1.0
- */
-public class V2XPushVRNiXiangEventMarker implements IV2XMarker {
- private final String TAG = "V2XPushVREventMarker";
-
-
- private static IMogoPolyline mMogoPolyline;
- private static IMogoMarker mAlarmInfoMarker;
-
- @Override
- public void drawPOI(V2XPushMessageEntity entity) {
- Logger.w(V2XConst.MODULE_NAME + "_" + TAG, "drawPOI 绘制VR Marker");
-
- try {
- // 清除道路事件
- V2XServiceManager
- .getMoGoV2XMarkerManager().clearALLPOI();
-
- if (mMogoPolyline != null) {
- mMogoPolyline.remove();
- }
- drawableEventMarker(entity);
-
- // 绘制引导线
- drawablePloyLine(entity);
- drawableRecommendPolyline(entity);
- } catch (Exception e) {
- e.printStackTrace();
- }
- }
-
- /**
- * 绘制事件点
- *
- * @param entity
- */
- void drawableEventMarker(V2XPushMessageEntity entity) {
- // 道路事件
- MogoMarkerOptions optionsRipple = new MogoMarkerOptions()
- .object(entity)
- .latitude(entity.getLat())
- .longitude(entity.getLon());
- optionsRipple.anchor(0.5f, 0.5f);
-
- optionsRipple.icon(V2XMarkerAdapter.getV2XVRRoadEventViewPng(entity));
- mAlarmInfoMarker = V2XServiceManager.getMarkerManager().addMarker(V2X_EVENT_ALARM_POI, optionsRipple);
-
- List points = new ArrayList<>();
-
- for (double[] doubles : entity.getMoveTrack()) {
- points.add(new MogoLatLng(doubles[1], doubles[0]));
- }
-
- mAlarmInfoMarker.startSmooth(points, 10);
- }
-
- /**
- * 绘制引导线
- *
- * @param entity
- */
- void drawablePloyLine(V2XPushMessageEntity entity) {
- // 连接线参数
- MogoPolylineOptions options = new MogoPolylineOptions();
-
- // 渐变色
- List colors = new ArrayList<>();
- colors.add(0xFFFA8C34);
- colors.add(0xFFBD6D36);
- colors.add(0xFFFA8C34);
-
- // 线条粗细,渐变,渐变色值
- options.width(15).useGradient(true).color(0xFFFA8C34);
-
- for (double[] doubles : entity.getPolyline()) {
- options.add(doubles[0], doubles[1]);
- }
-
- // 绘制线的对象
- mMogoPolyline = V2XServiceManager.getMogoOverlayManager().addPolyline(options);
- }
-
- /**
- * 绘制推荐引导线
- *
- * @param entity
- */
- void drawableRecommendPolyline(V2XPushMessageEntity entity) {
- // 连接线参数
- MogoPolylineOptions options = new MogoPolylineOptions();
-
- // 渐变色
- List colors = new ArrayList<>();
- colors.add(0xFFF95959);
- colors.add(0xFF942B48);
- colors.add(0xFFCB253A);
-
- // 线条粗细,渐变,渐变色值
- options.width(15).useGradient(true).color(0xFFCB253A);
-
- for (double[] doubles : entity.getRecommendPolyline()) {
- options.add(doubles[0], doubles[1]);
- }
-
- // 绘制线的对象
- mMogoPolyline = V2XServiceManager.getMogoOverlayManager().addPolyline(options);
- }
-
- @Override
- public void clearPOI() {
- // 锁车就是将地图视图移植中心点,因为行驶中的车和地图要相对的跟随
- MarkerUtils.resetMapZoom(16);
- // 移除线
- clearLine();
- // 移除事件POI
- clearAlarmPOI();
- // 绘制上次的数据
- V2XServiceManager.getMoGoV2XMarkerManager().drawableLastAllPOI();
- }
-
- void clearAlarmPOI() {
- if (mAlarmInfoMarker != null) {
- mAlarmInfoMarker.remove();
- }
- }
-
- public void clearLine() {
- if (mMogoPolyline != null) {
- mMogoPolyline.remove();
- mMogoPolyline = null;
- V2XServiceManager.getV2XStatusManager().setAlarmInfo(null);
- }
- }
-}
diff --git a/skin/mogo-skin-light/src/main/module-common-res/drawable-xhdpi/icon_heart_choose_light.png b/skin/mogo-skin-light/src/main/module-common-res/drawable-xhdpi/icon_heart_choose_light.png
index d6c0f59110..2310d30095 100644
Binary files a/skin/mogo-skin-light/src/main/module-common-res/drawable-xhdpi/icon_heart_choose_light.png and b/skin/mogo-skin-light/src/main/module-common-res/drawable-xhdpi/icon_heart_choose_light.png differ
diff --git a/skin/mogo-skin-light/src/main/module-common-res/drawable-xhdpi/icon_heart_second_light.png b/skin/mogo-skin-light/src/main/module-common-res/drawable-xhdpi/icon_heart_second_light.png
index ba1562ec86..14281e2425 100644
Binary files a/skin/mogo-skin-light/src/main/module-common-res/drawable-xhdpi/icon_heart_second_light.png and b/skin/mogo-skin-light/src/main/module-common-res/drawable-xhdpi/icon_heart_second_light.png differ
diff --git a/skin/mogo-skin-light/src/main/module-common-res/drawable-xhdpi/icon_heart_unchoose_light.png b/skin/mogo-skin-light/src/main/module-common-res/drawable-xhdpi/icon_heart_unchoose_light.png
index 14f81ebe43..4700e20da9 100644
Binary files a/skin/mogo-skin-light/src/main/module-common-res/drawable-xhdpi/icon_heart_unchoose_light.png and b/skin/mogo-skin-light/src/main/module-common-res/drawable-xhdpi/icon_heart_unchoose_light.png differ