From e47736afd9a4d4c16066c4ef51e6f423fd19b092 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=91=A3=E5=AE=8F=E5=AE=87?= Date: Thu, 1 Apr 2021 18:39:42 +0800 Subject: [PATCH] =?UTF-8?q?=E5=AE=8C=E6=88=90=E5=9F=BA=E7=A1=80=E7=9A=84?= =?UTF-8?q?=E5=BC=B9=E7=AA=97=E7=BB=98=E5=88=B6=E7=BA=BF=E7=9A=84=E5=8A=9F?= =?UTF-8?q?=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .idea/gradle.xml | 1 + .../res/layout/module_main_activity_main.xml | 21 +++--- .../v2x/scenario/impl/V2XScenarioManager.java | 6 +- .../scene/road/V2XRoadEventButton.java | 11 +--- .../scene/road/V2XRoadEventMarker.java | 11 +--- .../V2XOptimalRouteVREventMarker.java} | 6 +- .../V2XOptimalRouteVREventScenario.java} | 13 ++-- .../V2XOptimalRouteVREventWindow.java} | 16 ++--- .../v2x_optimal_route_warning.png | Bin 0 -> 4010 bytes .../main/res/layout/vr_window_top_tips.xml | 38 +++++++++++ .../main/res/layout/window_test_console.xml | 2 +- ...ario_push_vr_event_data_yongdu_gongsi.json | 60 ++++-------------- 12 files changed, 88 insertions(+), 97 deletions(-) rename modules/mogo-module-v2x/src/main/java/com/mogo/module/v2x/scenario/scene/{pushVR/V2XPushVREventMarker.java => route/V2XOptimalRouteVREventMarker.java} (92%) rename modules/mogo-module-v2x/src/main/java/com/mogo/module/v2x/scenario/scene/{pushVR/V2XPushVREventScenario.java => route/V2XOptimalRouteVREventScenario.java} (92%) rename modules/mogo-module-v2x/src/main/java/com/mogo/module/v2x/scenario/scene/{pushVR/V2XPushVREventWindow.java => route/V2XOptimalRouteVREventWindow.java} (81%) create mode 100644 modules/mogo-module-v2x/src/main/res/drawable-xhdpi/v2x_optimal_route_warning.png create mode 100644 modules/mogo-module-v2x/src/main/res/layout/vr_window_top_tips.xml diff --git a/.idea/gradle.xml b/.idea/gradle.xml index 83405b8de1..4ff10f68a5 100644 --- a/.idea/gradle.xml +++ b/.idea/gradle.xml @@ -91,6 +91,7 @@ diff --git a/modules/mogo-module-main/src/main/res/layout/module_main_activity_main.xml b/modules/mogo-module-main/src/main/res/layout/module_main_activity_main.xml index d3e106ad3c..4a05e4e99e 100644 --- a/modules/mogo-module-main/src/main/res/layout/module_main_activity_main.xml +++ b/modules/mogo-module-main/src/main/res/layout/module_main_activity_main.xml @@ -1,20 +1,21 @@ - + + @@ -23,20 +24,21 @@ android:id="@+id/iv_wu1" android:layout_width="wrap_content" android:layout_height="match_parent" - android:src="@drawable/wu1" android:alpha="0" + android:src="@drawable/wu1" app:layout_constraintStart_toStartOf="parent" /> + + - + - + - + + + { @Override 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/route/V2XOptimalRouteVREventMarker.java similarity index 92% rename from modules/mogo-module-v2x/src/main/java/com/mogo/module/v2x/scenario/scene/pushVR/V2XPushVREventMarker.java rename to modules/mogo-module-v2x/src/main/java/com/mogo/module/v2x/scenario/scene/route/V2XOptimalRouteVREventMarker.java index 120088508a..0702296ea3 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/route/V2XOptimalRouteVREventMarker.java @@ -1,4 +1,4 @@ -package com.mogo.module.v2x.scenario.scene.pushVR; +package com.mogo.module.v2x.scenario.scene.route; import com.mogo.map.overlay.IMogoPolyline; import com.mogo.map.overlay.MogoPolylineOptions; @@ -19,7 +19,7 @@ import java.util.List; * desc : 推送VR场景 * version: 1.0 */ -public class V2XPushVREventMarker implements IV2XMarker { +public class V2XOptimalRouteVREventMarker implements IV2XMarker { private final String TAG = "V2XPushVREventMarker"; private static IMogoPolyline mMogoPolyline; @@ -59,7 +59,7 @@ public class V2XPushVREventMarker implements IV2XMarker { colors.add(0xFFCB253A); // 线条粗细,渐变,渐变色值 - options.width(15).useGradient(true).color(0xFFF95959); + options.width(30).useGradient(true).colorValues(colors); for (double[] doubles : entity.getRecommendPolyline()) { options.add(doubles[0], doubles[1]); 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/route/V2XOptimalRouteVREventScenario.java similarity index 92% rename from modules/mogo-module-v2x/src/main/java/com/mogo/module/v2x/scenario/scene/pushVR/V2XPushVREventScenario.java rename to modules/mogo-module-v2x/src/main/java/com/mogo/module/v2x/scenario/scene/route/V2XOptimalRouteVREventScenario.java index 59c29c99ff..ac5971f613 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/route/V2XOptimalRouteVREventScenario.java @@ -1,4 +1,4 @@ -package com.mogo.module.v2x.scenario.scene.pushVR; +package com.mogo.module.v2x.scenario.scene.route; import android.view.View; import android.view.ViewGroup; @@ -20,17 +20,18 @@ import com.mogo.utils.network.utils.GsonUtil; * author : donghongyu * e-mail : 1358506549@qq.com * date : 2020/5/15 5:37 PM - * desc : 推送VR场景控制 + * desc : 最优车道选择 * version: 1.0 + * wiki : http://wiki.zhidaohulian.com/pages/viewpage.action?pageId=52829799 */ -public class V2XPushVREventScenario +public class V2XOptimalRouteVREventScenario extends AbsV2XScenario implements IMogoTopViewStatusListener { private String TAG = "V2XPushVREventWindow"; - public V2XPushVREventScenario() { - setV2XMarker(new V2XPushVREventMarker()); - setV2XWindow(new V2XPushVREventWindow()); + public V2XOptimalRouteVREventScenario() { + setV2XMarker(new V2XOptimalRouteVREventMarker()); + setV2XWindow(new V2XOptimalRouteVREventWindow()); } @Override diff --git a/modules/mogo-module-v2x/src/main/java/com/mogo/module/v2x/scenario/scene/pushVR/V2XPushVREventWindow.java b/modules/mogo-module-v2x/src/main/java/com/mogo/module/v2x/scenario/scene/route/V2XOptimalRouteVREventWindow.java similarity index 81% rename from modules/mogo-module-v2x/src/main/java/com/mogo/module/v2x/scenario/scene/pushVR/V2XPushVREventWindow.java rename to modules/mogo-module-v2x/src/main/java/com/mogo/module/v2x/scenario/scene/route/V2XOptimalRouteVREventWindow.java index d41e60a714..e63b0d96ae 100644 --- a/modules/mogo-module-v2x/src/main/java/com/mogo/module/v2x/scenario/scene/pushVR/V2XPushVREventWindow.java +++ b/modules/mogo-module-v2x/src/main/java/com/mogo/module/v2x/scenario/scene/route/V2XOptimalRouteVREventWindow.java @@ -1,4 +1,4 @@ -package com.mogo.module.v2x.scenario.scene.pushVR; +package com.mogo.module.v2x.scenario.scene.route; import android.content.Context; import android.os.Handler; @@ -24,7 +24,7 @@ import static com.mogo.module.v2x.V2XConst.MODULE_NAME; * TODO 只有VR演示场景使用 * version: 1.0 */ -public class V2XPushVREventWindow extends V2XBasWindow implements IV2XWindow { +public class V2XOptimalRouteVREventWindow extends V2XBasWindow implements IV2XWindow { private String TAG = "V2XPushVREventWindow"; // 处理道路事件,30秒倒计时 @@ -32,24 +32,22 @@ public class V2XPushVREventWindow extends V2XBasWindow implements IV2XWindowPx#L}ge>W=%~1DgXcg2mk?xX#fNO00031000^Q000001E2u_0{{R30RRC20H6W@ z1ONa40RR91WS|281ONa40RR91WB>pF057}VK>z>`6iGxuRCodHU3+j;)fxZJ&5MLA z0UBEjhDpKp%ai&;1 zb{rnIJ}Lr=R)iH0!XvzekdPP2-hRKk-EepJoV$DXK6XR)n@RTG^Z3p=-*?YB-}%mW z&L=3tVZeK@oTqm-SBJW(Iz&`0_)jMqCUgquf&#`bQ2@>0xMmJ(=CJTD(P2&-)bN)> zL6IK_p1N}GmzmsTZbN24(L42JqFv0;g+7CcIh}O9!qplIv43KCTK6S`>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spO9*nJ87p*5kLQ*?Qbm9p4{ubo-GMEgnI0vm==vhM*O2W|B&4 z7W299LJO0eRB-mTJl|u*BetmRLM+Xrws7HDrmIC?YWE~AECH?d66{tI=?{0bS!QFo zJ)^*|c;rK*-`Vod1U{GG<|jH?_RVbyfW|WaR&fkL!SK1ny`*KV{gpDLi5+0E(eJXe$+AywQUJ6Cjb%8c3_(ITz~UMIpe$21EOiQirl73~ zgOVY*6ObeCR%OhFr$zzLRCV7XFvf|!vBj{`aSg9aX2ynR-&3FfI}>Z0Su@Kjr?Q7c zGQk@eFYhzUG$c~FUi1qZf|iM@oRA^LP0T`DkO)yWJ^=-ohKX*q28M(TK_c8)&XU2? zc+P@-3V?RW-1`p9NihTo;Tn#Y`summ02Sz^0Gfez$yPsUhQLoBT*I*#AeEn!EwE3e zV_Jb`c6=Nr%@7b0o?_q{jwdKj?San)rg6_W1X|hgu7h^lVhA$8PoL0ou7l$%yk{Yv z0)|sCcAuAuPea=bLGkcDmP6Y0S*FOD0otVEp$*s)E)3&~JR6dAEP0j|c)~E{)Ul)^ zhM*Ez*Q=lcgG;VgQyQ|uH3eHtIUcfN5oaCT$5O=JyDL4!TqINkd}e9_&v0wa;pfydw+(GfRvlue z?XLF_bK!7+6(V|y&(4i7hxgWJCe}gzg70pbRr|76ZE(GZm@A5k!vR)!Zt2Z?^r9PW zKwG?I259GL4>2EZfs!vim}~#XrAFEz;CAjd{~CH*RSG8fY}P&Tt7dbGlC)J2E$7LE~dv_ z=sc|Po%Al>y3Hq!xzX#4bCrCIEOK(mT!(Z%XBnk!t*J!v@q z7UPaWT#LtyGfvBJSTing!L2$R*1})@A^r`rC>g||e4GO}j)BJ(l0onP1N{mR9Mj{x Q=>Px#07*qoM6N<$f>=0#vH$=8 literal 0 HcmV?d00001 diff --git a/modules/mogo-module-v2x/src/main/res/layout/vr_window_top_tips.xml b/modules/mogo-module-v2x/src/main/res/layout/vr_window_top_tips.xml new file mode 100644 index 0000000000..c4c5b9f5a3 --- /dev/null +++ b/modules/mogo-module-v2x/src/main/res/layout/vr_window_top_tips.xml @@ -0,0 +1,38 @@ + + + + + + + + + \ No newline at end of file diff --git a/modules/mogo-module-v2x/src/main/res/layout/window_test_console.xml b/modules/mogo-module-v2x/src/main/res/layout/window_test_console.xml index 8f79dc7c1e..98db0c3e37 100644 --- a/modules/mogo-module-v2x/src/main/res/layout/window_test_console.xml +++ b/modules/mogo-module-v2x/src/main/res/layout/window_test_console.xml @@ -455,7 +455,7 @@ android:layout_marginBottom="@dimen/dp_10" android:background="#4CAF50" android:padding="@dimen/dp_10" - android:text="拥堵路线推荐" + android:text="最优车道推荐" android:textColor="#FFFFFF" android:textSize="@dimen/dp_22" app:layout_constraintBottom_toBottomOf="parent" diff --git a/modules/mogo-module-v2x/src/main/res/raw/scenario_push_vr_event_data_yongdu_gongsi.json b/modules/mogo-module-v2x/src/main/res/raw/scenario_push_vr_event_data_yongdu_gongsi.json index b466e96184..7eac88ddd5 100644 --- a/modules/mogo-module-v2x/src/main/res/raw/scenario_push_vr_event_data_yongdu_gongsi.json +++ b/modules/mogo-module-v2x/src/main/res/raw/scenario_push_vr_event_data_yongdu_gongsi.json @@ -18,78 +18,42 @@ "lon":116.41808, "polyline": [ [ - 116.408012,39.968598 + 116.417437,39.983323 ], [ - 116.408784,39.968688 + 116.41924,39.983364 ], [ - 116.409632,39.968688 + 116.421396,39.983397 ], [ - 116.410168,39.968688 + 116.422984,39.983421 ], [ - 116.410898,39.968795 + 116.423016,39.983405 ], [ - 116.412143,39.968812 - ], - [ - 116.414481,39.968919 - ], - [ - 116.41681,39.969025 - ], - [ - 116.417947,39.96905 - ], - [ - 116.418011,39.968179 - ], - [ - 116.418033,39.967644 - ], - [ - 116.417947,39.967225 + 116.424272,39.983397 ] ], "recommendPolyline": [ [ - 116.408012,39.968598 + 116.417437,39.983323 ], [ - 116.408784,39.968688 + 116.41924,39.983364 ], [ - 116.409632,39.968688 + 116.421396,39.983397 ], [ - 116.410168,39.968688 + 116.422984,39.983421 ], [ - 116.410898,39.968795 + 116.423016,39.983405 ], [ - 116.412143,39.968812 - ], - [ - 116.414481,39.968919 - ], - [ - 116.41681,39.969025 - ], - [ - 116.417947,39.96905 - ], - [ - 116.418011,39.968179 - ], - [ - 116.418033,39.967644 - ], - [ - 116.417947,39.967225 + 116.424272,39.983397 ] ] } \ No newline at end of file