diff --git a/.idea/misc.xml b/.idea/misc.xml
index 21e99e2dc0..cd77a1f062 100644
--- a/.idea/misc.xml
+++ b/.idea/misc.xml
@@ -4,7 +4,7 @@
-
+
\ No newline at end of file
diff --git a/app/src/main/res/values-xhdpi-1920x1000/strings.xml b/app/src/main/res/values-xhdpi-1920x1000/strings.xml
new file mode 100644
index 0000000000..4b537bbf4c
--- /dev/null
+++ b/app/src/main/res/values-xhdpi-1920x1000/strings.xml
@@ -0,0 +1,3 @@
+
+ 蘑菇知途
+
diff --git a/gradle.properties b/gradle.properties
index 3c4c014176..90669c17d7 100644
--- a/gradle.properties
+++ b/gradle.properties
@@ -60,7 +60,7 @@ MOGO_MODULE_V2X_VERSION=1.2.1.20
## 工程外部模块
# 探路
-MOGO_MODULE_TANLU_VERSION=1.3.0.19
+MOGO_MODULE_TANLU_VERSION=1.3.1.2
# 车聊聊
CARCHATTING_VERSION=1.4.6
# 车聊聊接口
@@ -78,7 +78,7 @@ MOGO_MODULE_PUSH_NOOP_VERSION=1.1.5.6
# 广告资源位
MOGO_MODULE_AD_CARD_VERSION=1.0.1
# 探路上报和分享模块
-TANLULIB_VERSION=1.3.0.19
+TANLULIB_VERSION=1.3.1.2
MOGO_MODULE_EVENT_PANEL_VERSION = 1.0.0-SNAPSHOT
MOGO_MODULE_EVENT_PANEL_NOOP_VERSION = 1.0.0-SNAPSHOT
#左侧面板模块
diff --git a/modules/mogo-module-common/src/main/java/com/mogo/module/common/wm/DialogImpl.java b/modules/mogo-module-common/src/main/java/com/mogo/module/common/wm/DialogImpl.java
new file mode 100644
index 0000000000..330249f65d
--- /dev/null
+++ b/modules/mogo-module-common/src/main/java/com/mogo/module/common/wm/DialogImpl.java
@@ -0,0 +1,36 @@
+package com.mogo.module.common.wm;
+
+
+import android.app.Dialog;
+import android.content.Context;
+
+import com.mogo.module.common.dialog.BaseFloatDialog;
+import com.mogo.utils.logger.Logger;
+
+/**
+ * 采用Dialog实现接口
+ */
+class DialogImpl implements IWindowManagerView {
+ private Dialog dialog;
+ @Override
+ public void init(WindowManagerView.WMViewParams params) {
+ Logger.d("DialogImpl", "init====");
+ dialog = new BaseFloatDialog(params.mContext);
+ dialog.setContentView(params.mContentView);
+ }
+
+ @Override
+ public boolean isShowing() {
+ return dialog.isShowing();
+ }
+
+ @Override
+ public void show() {
+ dialog.show();
+ }
+
+ @Override
+ public void hide() {
+ dialog.dismiss();
+ }
+}
diff --git a/modules/mogo-module-common/src/main/java/com/mogo/module/common/wm/IWindowManagerView.java b/modules/mogo-module-common/src/main/java/com/mogo/module/common/wm/IWindowManagerView.java
new file mode 100644
index 0000000000..d610cea67a
--- /dev/null
+++ b/modules/mogo-module-common/src/main/java/com/mogo/module/common/wm/IWindowManagerView.java
@@ -0,0 +1,25 @@
+package com.mogo.module.common.wm;
+
+interface IWindowManagerView {
+ /**
+ * 初始化
+ * @param params contentView包装类
+ */
+ void init(WindowManagerView.WMViewParams params);
+
+ /**
+ * 是否显示
+ * @return true - 显示中
+ */
+ boolean isShowing();
+
+ /**
+ * 显示
+ */
+ void show();
+
+ /**
+ * 隐藏
+ */
+ void hide();
+}
diff --git a/modules/mogo-module-common/src/main/java/com/mogo/module/common/wm/WindowManagerImpl.java b/modules/mogo-module-common/src/main/java/com/mogo/module/common/wm/WindowManagerImpl.java
new file mode 100644
index 0000000000..4821f6b0a2
--- /dev/null
+++ b/modules/mogo-module-common/src/main/java/com/mogo/module/common/wm/WindowManagerImpl.java
@@ -0,0 +1,67 @@
+package com.mogo.module.common.wm;
+
+import android.content.Context;
+import android.graphics.PixelFormat;
+import android.os.Build;
+import android.view.Gravity;
+import android.view.WindowManager;
+
+import com.mogo.module.common.utils.CarSeries;
+import com.mogo.utils.WindowUtils;
+
+/**
+ * 采用windowManager实现接口
+ */
+class WindowManagerImpl implements IWindowManagerView {
+ private WindowManager mWindowManager;
+ private WindowManager.LayoutParams mLayoutParams;
+ private WindowManagerView.WMViewParams mParams;
+ private boolean isShowing;
+ @Override
+ public void init(WindowManagerView.WMViewParams params) {
+ mParams = params;
+ mWindowManager = (WindowManager) mParams.mContext.getApplicationContext().getSystemService( Context.WINDOW_SERVICE );
+ mLayoutParams = new WindowManager.LayoutParams();
+ if ( Build.VERSION.SDK_INT >= Build.VERSION_CODES.O ) {
+ mLayoutParams.type = WindowManager.LayoutParams.TYPE_APPLICATION_OVERLAY;
+ } else {
+ mLayoutParams.type = WindowManager.LayoutParams.TYPE_SYSTEM_ALERT;
+ }
+ mLayoutParams.format = PixelFormat.TRANSLUCENT;
+ mLayoutParams.gravity = Gravity.CENTER;
+ mLayoutParams.flags = WindowManager.LayoutParams.FLAG_LAYOUT_IN_SCREEN | WindowManager.LayoutParams.FLAG_NOT_TOUCH_MODAL | WindowManager.LayoutParams.FLAG_WATCH_OUTSIDE_TOUCH | WindowManager.LayoutParams.FLAG_NOT_FOCUSABLE;
+
+ if ( CarSeries.getSeries() == CarSeries.CAR_SERIES_F80X ) {
+ mLayoutParams.width = 1920;
+ mLayoutParams.height = 1080;
+ } else {
+ mLayoutParams.width = WindowUtils.getScreenWidth( mParams.mContext );
+ mLayoutParams.height = WindowUtils.getScreenHeight( mParams.mContext );
+ }
+ mLayoutParams.dimAmount = 0.5f;
+ mLayoutParams.x = 0;
+ mLayoutParams.y = 0;
+ }
+
+ @Override
+ public boolean isShowing() {
+ return isShowing;
+ }
+
+ @Override
+ public void show() {
+ if(!isShowing){
+ isShowing = true;
+ mWindowManager.addView(mParams.mContentView,mLayoutParams);
+ }
+ }
+
+ @Override
+ public void hide() {
+ if (isShowing && mParams != null) {
+ mWindowManager.removeView(mParams.mContentView);
+ isShowing = false;
+ }
+
+ }
+}
diff --git a/modules/mogo-module-common/src/main/java/com/mogo/module/common/wm/WindowManagerView.java b/modules/mogo-module-common/src/main/java/com/mogo/module/common/wm/WindowManagerView.java
index 4c60022b5d..d3c054a2ca 100644
--- a/modules/mogo-module-common/src/main/java/com/mogo/module/common/wm/WindowManagerView.java
+++ b/modules/mogo-module-common/src/main/java/com/mogo/module/common/wm/WindowManagerView.java
@@ -11,6 +11,7 @@ import android.view.WindowManager;
import androidx.annotation.IdRes;
import androidx.annotation.LayoutRes;
+import com.mogo.commons.debug.DebugConfig;
import com.mogo.module.common.utils.CarSeries;
import com.mogo.utils.WindowUtils;
@@ -23,89 +24,57 @@ import com.mogo.utils.WindowUtils;
public class WindowManagerView {
private WMViewParams mParams;
- private boolean mIsShowing;
- private WindowManager mWindowManager;
- private WindowManager.LayoutParams mLayoutParams;
- private WindowManagerView( WMViewParams params ) {
+ private IWindowManagerView managerView;
+
+ private WindowManagerView(WMViewParams params) {
this.mParams = params;
- init();
- }
-
- private void init() {
- mWindowManager = ( WindowManager ) mParams.mContext.getApplicationContext().getSystemService( Context.WINDOW_SERVICE );
- mLayoutParams = new WindowManager.LayoutParams();
- if ( Build.VERSION.SDK_INT >= Build.VERSION_CODES.O ) {
- mLayoutParams.type = WindowManager.LayoutParams.TYPE_APPLICATION_OVERLAY;
- } else {
- mLayoutParams.type = WindowManager.LayoutParams.TYPE_SYSTEM_ALERT;
- }
- mLayoutParams.format = PixelFormat.TRANSLUCENT;
- mLayoutParams.gravity = Gravity.CENTER;
- mLayoutParams.flags = WindowManager.LayoutParams.FLAG_LAYOUT_IN_SCREEN | WindowManager.LayoutParams.FLAG_NOT_TOUCH_MODAL | WindowManager.LayoutParams.FLAG_WATCH_OUTSIDE_TOUCH | WindowManager.LayoutParams.FLAG_NOT_FOCUSABLE;
-
- if ( CarSeries.getSeries() == CarSeries.CAR_SERIES_F80X ) {
- mLayoutParams.width = 1920;
- mLayoutParams.height = 1080;
- } else {
- mLayoutParams.width = WindowUtils.getScreenWidth( mParams.mContext );
- mLayoutParams.height = WindowUtils.getScreenHeight( mParams.mContext );
- }
- mLayoutParams.dimAmount = 0.5f;
- mLayoutParams.x = 0;
- mLayoutParams.y = 0;
+ managerView = new DialogImpl();
+ managerView.init(params);
+// init();
}
public boolean isShowing() {
- return mIsShowing;
+ return managerView.isShowing();
}
- public < T extends View > T findViewById( @IdRes int id ) {
- return mParams.mContentView.findViewById( id );
+ public T findViewById(@IdRes int id) {
+ return mParams.mContentView.findViewById(id);
}
public void show() {
- if ( mIsShowing ) {
- return;
- }
- mIsShowing = true;
- mWindowManager.addView( mParams.mContentView, mLayoutParams );
+ managerView.show();
}
public void dismiss() {
- if ( !mIsShowing ) {
- return;
- }
- if ( mParams != null ) {
- mWindowManager.removeViewImmediate( mParams.mContentView );
- }
- mIsShowing = false;
+ managerView.hide();
}
public static class Builder {
private WMViewParams mParams = null;
- public Builder( Context context ) {
+ public Builder(Context context) {
mParams = new WMViewParams();
mParams.mContext = context;
}
- public Builder contentView( View contentView ) {
+ public Builder contentView(View contentView) {
mParams.mContentView = contentView;
return this;
}
- public Builder contentView( @LayoutRes int contentViewId ) {
- mParams.mContentView = LayoutInflater.from( mParams.mContext ).inflate( contentViewId, null );
+ public Builder contentView(@LayoutRes int contentViewId) {
+ mParams.mContentView = LayoutInflater.from(mParams.mContext).inflate(contentViewId,
+ null);
return this;
}
public WindowManagerView build() {
- if ( mParams.mContentView == null ) {
- throw new NullPointerException( "WMViewParams#mContentView must not be null." );
+ if (mParams.mContentView == null) {
+ throw new NullPointerException("WMViewParams#mContentView must not be null.");
}
- return new WindowManagerView( mParams );
+ return new WindowManagerView(mParams);
}
}
diff --git a/modules/mogo-module-splash/src/main/res/drawable-xhdpi-1920x1000/module_byd_splash.png b/modules/mogo-module-splash/src/main/res/drawable-xhdpi-1920x1000/module_byd_splash.png
index c58571da17..e322c3ccb2 100644
Binary files a/modules/mogo-module-splash/src/main/res/drawable-xhdpi-1920x1000/module_byd_splash.png and b/modules/mogo-module-splash/src/main/res/drawable-xhdpi-1920x1000/module_byd_splash.png differ
diff --git a/modules/mogo-module-splash/src/main/res/drawable/module_byd_splash.png b/modules/mogo-module-splash/src/main/res/drawable/module_byd_splash.png
index c58571da17..e322c3ccb2 100644
Binary files a/modules/mogo-module-splash/src/main/res/drawable/module_byd_splash.png and b/modules/mogo-module-splash/src/main/res/drawable/module_byd_splash.png differ
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 72aac3e4d9..bfb35e2cbc 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
@@ -64,6 +64,8 @@ public class MoGoV2XMarkerManager implements IMoGoV2XMarkerManager {
V2XServiceManager.getMoGoV2XPolylineManager().clearLine();
clearAlarmPOI();
clearSpecialCarPOI();
+ // 锁车
+ V2XServiceManager.getMapUIController().recoverLockMode();
// 开启主Launcher刷新
V2XServiceManager.getIMogoRefreshStrategyController().restartAutoRefreshAtTime(500);
}
@@ -220,7 +222,6 @@ public class MoGoV2XMarkerManager implements IMoGoV2XMarkerManager {
@Override
public void drawableSpecialCarPOI(Context context, V2XMarkerEntity v2XMarkerEntity, IMogoMarkerClickListener clickListener) {
try {
- MarkerUtils.resetMapZoom(15);
V2XServiceManager.getMapUIController().changeMapMode(EnumMapUI.NorthUP_2D);
V2XServiceManager.getMoGoV2XStatusManager().setOtherSeekHelpPOIShow(TAG, true);
@@ -256,11 +257,13 @@ public class MoGoV2XMarkerManager implements IMoGoV2XMarkerManager {
mAlarmInfoMarker = V2XServiceManager.getMarkerManager().addMarker(V2X_EVENT_ALARM_POI, optionsRipple);
// 当前Marker设置为最上面
mAlarmInfoMarker.setToTop();
-// if (clickListener != null) {
-// mAlarmInfoMarker.setOnMarkerClickListener(clickListener);
-// }
// 绘制连接线
V2XServiceManager.getMoGoV2XPolylineManager().drawablePolyline(context, roadEventEntity);
+ // 缩放地图
+ MarkerUtils.zoomMap(
+ new MogoLatLng(roadEventEntity.getLocation().getLat(),
+ roadEventEntity.getLocation().getLon()
+ ), context);
} else {
Logger.e(MODULE_NAME, "Location 必须进行初始化!!!!!");
}
@@ -512,7 +515,6 @@ public class MoGoV2XMarkerManager implements IMoGoV2XMarkerManager {
@Override
public void drawableAlarmPOI(Context context, V2XRoadEventEntity roadEventEntity, IMogoMarkerClickListener clickListener) {
try {
- MarkerUtils.resetMapZoom(15);
V2XServiceManager.getMapUIController().changeMapMode(EnumMapUI.NorthUP_2D);
V2XServiceManager.getMoGoV2XStatusManager().setRoadEventPOIShow(TAG, true);
//Logger.i(MODULE_NAME, "绘制道路事件====drawableAlarmPOI:");
@@ -532,11 +534,13 @@ public class MoGoV2XMarkerManager implements IMoGoV2XMarkerManager {
mAlarmInfoMarker = V2XServiceManager.getMarkerManager().addMarker(V2X_EVENT_ALARM_POI, optionsRipple);
// 当前Marker设置为最上面
mAlarmInfoMarker.setToTop();
-// if (clickListener != null) {
-// mAlarmInfoMarker.setOnMarkerClickListener(clickListener);
-// }
// 绘制连接线
V2XServiceManager.getMoGoV2XPolylineManager().drawablePolyline(context, roadEventEntity);
+ // 缩放地图
+ MarkerUtils.zoomMap(
+ new MogoLatLng(roadEventEntity.getLocation().getLat(),
+ roadEventEntity.getLocation().getLon()
+ ), context);
} else {
Logger.e(MODULE_NAME, "Location 必须进行初始化!!!!!");
}
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 2f30437784..801ee51a9f 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
@@ -8,8 +8,6 @@ import com.mogo.map.marker.IMogoMarker;
import com.mogo.map.marker.anim.OnMarkerAnimationListener;
import com.mogo.module.common.entity.MarkerExploreWay;
import com.mogo.module.common.entity.MarkerShowEntity;
-import com.mogo.module.common.map.MapCenterPointStrategy;
-import com.mogo.module.common.map.Scene;
import com.mogo.module.service.ServiceConst;
import com.mogo.module.v2x.V2XServiceManager;
import com.mogo.module.v2x.scenario.view.IV2XMarker;
@@ -83,16 +81,12 @@ public class V2XIllegalParkMarker implements IV2XMarker>
countDownV2XEvent();
} catch (Exception e) {
- // 锁车就是将地图视图移植中心点,因为行驶中的车和地图要相对的跟随
- MarkerUtils.resetMapZoom(16);
e.printStackTrace();
}
}
@Override
public void clearPOI() {
- // 移动回原来的中心点
- MapCenterPointStrategy.setMapCenterPointByScene(V2XServiceManager.getMapUIController(), Scene.AIMLESS);
// 锁车就是将地图视图移植中心点,因为行驶中的车和地图要相对的跟随
MarkerUtils.resetMapZoom(16);
// 移除违章停车点
diff --git a/modules/mogo-module-v2x/src/main/java/com/mogo/module/v2x/scenario/scene/push/V2XPushEventMarker.java b/modules/mogo-module-v2x/src/main/java/com/mogo/module/v2x/scenario/scene/push/V2XPushEventMarker.java
index 10e6fa9ac1..2504007fe6 100644
--- a/modules/mogo-module-v2x/src/main/java/com/mogo/module/v2x/scenario/scene/push/V2XPushEventMarker.java
+++ b/modules/mogo-module-v2x/src/main/java/com/mogo/module/v2x/scenario/scene/push/V2XPushEventMarker.java
@@ -3,12 +3,10 @@ package com.mogo.module.v2x.scenario.scene.push;
import com.mogo.module.common.entity.MarkerExploreWay;
import com.mogo.module.common.entity.MarkerExploreWayItem;
import com.mogo.module.common.entity.MarkerLocation;
-import com.mogo.module.common.map.MapCenterPointStrategy;
-import com.mogo.module.common.map.Scene;
-import com.mogo.module.v2x.V2XServiceManager;
import com.mogo.module.common.entity.V2XPoiTypeEnum;
import com.mogo.module.common.entity.V2XPushMessageEntity;
import com.mogo.module.common.entity.V2XRoadEventEntity;
+import com.mogo.module.v2x.V2XServiceManager;
import com.mogo.module.v2x.listener.V2XMarkerClickListener;
import com.mogo.module.v2x.scenario.view.IV2XMarker;
import com.mogo.module.v2x.utils.MarkerUtils;
@@ -62,16 +60,12 @@ public class V2XPushEventMarker implements IV2XMarker {
V2XMarkerClickListener.getInstance());
} catch (Exception e) {
- // 锁车就是将地图视图移植中心点,因为行驶中的车和地图要相对的跟随
- MarkerUtils.resetMapZoom(16);
e.printStackTrace();
}
}
@Override
public void clearPOI() {
- // 移动回原来的中心点
- MapCenterPointStrategy.setMapCenterPointByScene(V2XServiceManager.getMapUIController(), Scene.AIMLESS);
// 锁车就是将地图视图移植中心点,因为行驶中的车和地图要相对的跟随
MarkerUtils.resetMapZoom(16);
// 移除线
diff --git a/modules/mogo-module-v2x/src/main/java/com/mogo/module/v2x/scenario/scene/road/V2XRoadEventMarker.java b/modules/mogo-module-v2x/src/main/java/com/mogo/module/v2x/scenario/scene/road/V2XRoadEventMarker.java
index b3da065410..b92946c2f9 100644
--- a/modules/mogo-module-v2x/src/main/java/com/mogo/module/v2x/scenario/scene/road/V2XRoadEventMarker.java
+++ b/modules/mogo-module-v2x/src/main/java/com/mogo/module/v2x/scenario/scene/road/V2XRoadEventMarker.java
@@ -1,9 +1,7 @@
package com.mogo.module.v2x.scenario.scene.road;
-import com.mogo.module.common.map.MapCenterPointStrategy;
-import com.mogo.module.common.map.Scene;
-import com.mogo.module.v2x.V2XServiceManager;
import com.mogo.module.common.entity.V2XRoadEventEntity;
+import com.mogo.module.v2x.V2XServiceManager;
import com.mogo.module.v2x.scenario.view.IV2XMarker;
import com.mogo.module.v2x.utils.MarkerUtils;
@@ -31,16 +29,12 @@ public class V2XRoadEventMarker implements IV2XMarker {
.drawableAlarmPOI(V2XServiceManager.getContext(), entity, null);
}
} catch (Exception e) {
- // 锁车就是将地图视图移植中心点,因为行驶中的车和地图要相对的跟随
- MarkerUtils.resetMapZoom(16);
e.printStackTrace();
}
}
@Override
public void clearPOI() {
- // 移动回原来的中心点
- MapCenterPointStrategy.setMapCenterPointByScene(V2XServiceManager.getMapUIController(), Scene.AIMLESS);
// 锁车就是将地图视图移植中心点,因为行驶中的车和地图要相对的跟随
MarkerUtils.resetMapZoom(16);
// 移除线
diff --git a/modules/mogo-module-v2x/src/main/java/com/mogo/module/v2x/scenario/scene/road/V2XRoadEventScenario.java b/modules/mogo-module-v2x/src/main/java/com/mogo/module/v2x/scenario/scene/road/V2XRoadEventScenario.java
index 0d8fc7153b..26d88c9b55 100644
--- a/modules/mogo-module-v2x/src/main/java/com/mogo/module/v2x/scenario/scene/road/V2XRoadEventScenario.java
+++ b/modules/mogo-module-v2x/src/main/java/com/mogo/module/v2x/scenario/scene/road/V2XRoadEventScenario.java
@@ -92,7 +92,6 @@ public class V2XRoadEventScenario extends AbsV2XScenario imp
V2XServiceManager.getContext(),
mV2XMessageEntity.getContent());
if (V2XServiceManager.getMoGoStatusManager().isMainPageLaunched()) {
- drawPOI();
showWindow();
}
}
@@ -188,6 +187,9 @@ public class V2XRoadEventScenario extends AbsV2XScenario imp
@Override
public void onViewAdded(View view) {
Logger.d(MODULE_NAME, "展示 Window 动画结束");
+ if (V2XServiceManager.getMoGoStatusManager().isMainPageLaunched()) {
+ drawPOI();
+ }
}
@Override
diff --git a/modules/mogo-module-v2x/src/main/java/com/mogo/module/v2x/scenario/scene/seek/V2XSeekHelpScenario.java b/modules/mogo-module-v2x/src/main/java/com/mogo/module/v2x/scenario/scene/seek/V2XSeekHelpScenario.java
index 1e2a045211..ffdc49dcba 100644
--- a/modules/mogo-module-v2x/src/main/java/com/mogo/module/v2x/scenario/scene/seek/V2XSeekHelpScenario.java
+++ b/modules/mogo-module-v2x/src/main/java/com/mogo/module/v2x/scenario/scene/seek/V2XSeekHelpScenario.java
@@ -7,12 +7,12 @@ import android.view.ViewGroup;
import androidx.annotation.Nullable;
import com.mogo.commons.voice.AIAssist;
-import com.mogo.module.v2x.R;
-import com.mogo.module.v2x.V2XServiceManager;
-import com.mogo.module.v2x.entity.net.V2XSpecialCarRes.V2XMarkerEntity;
import com.mogo.module.common.entity.V2XMessageEntity;
import com.mogo.module.common.entity.V2XPoiTypeEnum;
import com.mogo.module.common.entity.V2XRoadEventEntity;
+import com.mogo.module.v2x.R;
+import com.mogo.module.v2x.V2XServiceManager;
+import com.mogo.module.v2x.entity.net.V2XSpecialCarRes.V2XMarkerEntity;
import com.mogo.module.v2x.scenario.impl.AbsV2XScenario;
import com.mogo.module.v2x.utils.ADASUtils;
import com.mogo.module.v2x.utils.V2XUtils;
@@ -79,7 +79,6 @@ public class V2XSeekHelpScenario extends AbsV2XScenario> i
@Override
public void show() {
showWindow();
- drawPOI();
}
@Override
@@ -145,7 +144,7 @@ public class V2XSeekHelpScenario extends AbsV2XScenario> i
(int) V2XUtils.getApp().getResources().getDimension(R.dimen.module_v2x_fatigue_driving_window_height_ground));
V2XServiceManager
.getMogoTopViewManager()
- .addView(mV2XWindow.getView(), layoutParams,this);
+ .addView(mV2XWindow.getView(), layoutParams, this);
mV2XWindow.show(mMarkerEntity);
} else {
blockingQueue.offer(mMarkerEntity);
@@ -197,6 +196,7 @@ public class V2XSeekHelpScenario extends AbsV2XScenario> i
@Override
public void onViewAdded(View view) {
Logger.d(MODULE_NAME, "展示 Window 动画结束");
+ drawPOI();
}
@Override
diff --git a/modules/mogo-module-v2x/src/main/java/com/mogo/module/v2x/utils/MarkerUtils.java b/modules/mogo-module-v2x/src/main/java/com/mogo/module/v2x/utils/MarkerUtils.java
index f31fb111d0..e87f24e788 100644
--- a/modules/mogo-module-v2x/src/main/java/com/mogo/module/v2x/utils/MarkerUtils.java
+++ b/modules/mogo-module-v2x/src/main/java/com/mogo/module/v2x/utils/MarkerUtils.java
@@ -7,14 +7,13 @@ import com.mogo.map.MogoLatLng;
import com.mogo.map.marker.IMogoMarkerClickListener;
import com.mogo.module.common.entity.MarkerLocation;
import com.mogo.module.common.entity.MarkerShowEntity;
+import com.mogo.module.common.entity.V2XPoiTypeEnum;
import com.mogo.module.common.utils.CarSeries;
import com.mogo.module.v2x.V2XConst;
import com.mogo.module.v2x.V2XServiceManager;
-import com.mogo.module.v2x.entity.net.V2XSpecialCarRes.V2XMarkerEntity;
import com.mogo.module.v2x.entity.net.V2XSpecialCarRes;
-import com.mogo.module.common.entity.V2XPoiTypeEnum;
+import com.mogo.module.v2x.entity.net.V2XSpecialCarRes.V2XMarkerEntity;
import com.mogo.utils.WindowUtils;
-import com.mogo.utils.logger.Logger;
import java.util.Collections;
@@ -75,12 +74,12 @@ public class MarkerUtils {
final int paddingRight;
final int paddingLeft;
if (CarSeries.getSeries() == CarSeries.CAR_SERIES_F80X) {
- paddingTop = WindowUtils.dip2px(context, 150);
+ paddingTop = WindowUtils.dip2px(context, 250);
paddingBottom = WindowUtils.dip2px(context, 100);
paddingRight = WindowUtils.dip2px(context, 100);
paddingLeft = WindowUtils.dip2px(context, 475);
} else {
- paddingTop = WindowUtils.dip2px(context, 170);
+ paddingTop = WindowUtils.dip2px(context, 370);
paddingBottom = WindowUtils.dip2px(context, 100);
paddingRight = WindowUtils.dip2px(context, 100);
paddingLeft = WindowUtils.dip2px(context, 575);
@@ -110,32 +109,10 @@ public class MarkerUtils {
* @param zoomScale 缩放级别
*/
public static void resetMapZoom(float zoomScale) {
- V2XServiceManager.getMapUIController().changeZoom(zoomScale);
- // 锁车就是将地图视图移植中心点,因为行驶中的车和地图要相对的跟随
- V2XServiceManager.getMapUIController().setLockZoom((int) zoomScale);
- V2XServiceManager.getMapUIController().recoverLockMode();
- }
-
- /**
- * 根据距离调整地图的缩放比例
- *
- * @param distance 距离
- */
- public static void changeMapZoomWithDistance(double distance) {
- Logger.d(V2XConst.MODULE_NAME, "根据距离调整地图的缩放比例:" + distance);
- if (distance <= 500 && distance > 400) {
- resetMapZoom(15);
- } else if (distance <= 400 && distance > 300) {
- resetMapZoom(16);
- } else if (distance <= 300 && distance > 200) {
- resetMapZoom(16.5f);
- } else if (distance <= 200 && distance > 100) {
- resetMapZoom(17f);
- } else if (distance <= 100 && distance >= 0) {
- resetMapZoom(17.5f);
- } else if (distance >= 500) {
- resetMapZoom(12);
- }
+// V2XServiceManager.getMapUIController().changeZoom(zoomScale);
+// // 锁车就是将地图视图移植中心点,因为行驶中的车和地图要相对的跟随
+// V2XServiceManager.getMapUIController().setLockZoom((int) zoomScale);
+ V2XServiceManager.getMapUIController().loseLockMode();
}
}
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 56f808085a..afd2eec4c8 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,7 +14,7 @@
"zoom": true,
"zoomScale": 15,
"location": {
- "lat": 39.9754100000,
+ "lat": 39.9554100000,
"lon": 116.4178276100
},
"userHead": "https://yycp-static-1255510688.cos.ap-beijing.myqcloud.com/defaultUserHeadImg/5.png",
diff --git a/modules/mogo-module-v2x/src/main/res/raw/scenario_push_event_data.json b/modules/mogo-module-v2x/src/main/res/raw/scenario_push_event_data.json
index 38a9ff9693..9c2a4b5e2a 100644
--- a/modules/mogo-module-v2x/src/main/res/raw/scenario_push_event_data.json
+++ b/modules/mogo-module-v2x/src/main/res/raw/scenario_push_event_data.json
@@ -13,8 +13,8 @@
"zoom": true,
"zoomScale": 15,
"location": {
- "lat": 39.9754100000,
- "lon": 116.4178276100
+ "lat": 39.971417,
+ "lon": 116.415853
},
"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"
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 395ffb1f11..f4a9966c64 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,7 +5,7 @@
"location":{
"address":"北五环(测试位置不准确)",
"angle":270,
- "lat":39.96155,
+ "lat":39.971417,
"lon":116.415853
},
"noveltyInfo":{
@@ -27,7 +27,7 @@
"location":{
"address":"北五环(测试位置不准确)",
"angle":270,
- "lat":39.968155,
+ "lat":39.971417,
"lon":116.415853
},
"poiType":"10002",
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 9a43486407..7b6d29ab3f 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
@@ -3,8 +3,8 @@
{
"createTime":1593678359872,
"distance":100,
- "lat":39.96911187,
- "lon":116.41777396,
+ "lat":39.968678,
+ "lon":116.405467,
"sn":"E841CC2018PZD20466",
"targetId":20007,
"targetName":"故障车",