修复了window遮盖事件展示的问题
This commit is contained in:
@@ -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 必须进行初始化!!!!!");
|
||||
}
|
||||
|
||||
@@ -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<List<MarkerExploreWay>>
|
||||
|
||||
countDownV2XEvent();
|
||||
} catch (Exception e) {
|
||||
// 锁车就是将地图视图移植中心点,因为行驶中的车和地图要相对的跟随
|
||||
MarkerUtils.resetMapZoom(16);
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void clearPOI() {
|
||||
// 移动回原来的中心点
|
||||
MapCenterPointStrategy.setMapCenterPointByScene(V2XServiceManager.getMapUIController(), Scene.AIMLESS);
|
||||
// 锁车就是将地图视图移植中心点,因为行驶中的车和地图要相对的跟随
|
||||
MarkerUtils.resetMapZoom(16);
|
||||
// 移除违章停车点
|
||||
|
||||
@@ -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<V2XPushMessageEntity> {
|
||||
V2XMarkerClickListener.getInstance());
|
||||
|
||||
} catch (Exception e) {
|
||||
// 锁车就是将地图视图移植中心点,因为行驶中的车和地图要相对的跟随
|
||||
MarkerUtils.resetMapZoom(16);
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void clearPOI() {
|
||||
// 移动回原来的中心点
|
||||
MapCenterPointStrategy.setMapCenterPointByScene(V2XServiceManager.getMapUIController(), Scene.AIMLESS);
|
||||
// 锁车就是将地图视图移植中心点,因为行驶中的车和地图要相对的跟随
|
||||
MarkerUtils.resetMapZoom(16);
|
||||
// 移除线
|
||||
|
||||
@@ -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<V2XRoadEventEntity> {
|
||||
.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);
|
||||
// 移除线
|
||||
|
||||
@@ -92,7 +92,6 @@ public class V2XRoadEventScenario extends AbsV2XScenario<V2XRoadEventEntity> imp
|
||||
V2XServiceManager.getContext(),
|
||||
mV2XMessageEntity.getContent());
|
||||
if (V2XServiceManager.getMoGoStatusManager().isMainPageLaunched()) {
|
||||
drawPOI();
|
||||
showWindow();
|
||||
}
|
||||
}
|
||||
@@ -188,6 +187,9 @@ public class V2XRoadEventScenario extends AbsV2XScenario<V2XRoadEventEntity> imp
|
||||
@Override
|
||||
public void onViewAdded(View view) {
|
||||
Logger.d(MODULE_NAME, "展示 Window 动画结束");
|
||||
if (V2XServiceManager.getMoGoStatusManager().isMainPageLaunched()) {
|
||||
drawPOI();
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -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<List<V2XMarkerEntity>> i
|
||||
@Override
|
||||
public void show() {
|
||||
showWindow();
|
||||
drawPOI();
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -145,7 +144,7 @@ public class V2XSeekHelpScenario extends AbsV2XScenario<List<V2XMarkerEntity>> 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<List<V2XMarkerEntity>> i
|
||||
@Override
|
||||
public void onViewAdded(View view) {
|
||||
Logger.d(MODULE_NAME, "展示 Window 动画结束");
|
||||
drawPOI();
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -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();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user