[Upload]
删除冗余代码 MoGoEagleEye.modules.mogo-module-map MoGoEagleEye.modules.mogo-module-service MoGoEagleEye.modules.mogo-module-share MoGoEagleEye.services.mogo-service-api Signed-off-by: donghongyu <donghongyu@zhidaoauto.com>
This commit is contained in:
@@ -10,7 +10,6 @@ import androidx.recyclerview.widget.RecyclerView;
|
||||
|
||||
import com.alibaba.android.arouter.launcher.ARouter;
|
||||
import com.mogo.commons.voice.AIAssist;
|
||||
import com.mogo.eagle.core.data.map.MogoLatLng;
|
||||
import com.mogo.eagle.core.function.v2x.events.bridge.BridgeApi;
|
||||
import com.mogo.eagle.core.function.v2x.events.consts.V2XConst;
|
||||
import com.mogo.eagle.core.function.v2x.events.network.V2XRefreshModel;
|
||||
@@ -19,10 +18,10 @@ import com.mogo.eagle.core.function.v2x.events.utils.ChartingUtil;
|
||||
import com.mogo.eagle.core.function.v2x.events.utils.RoadConditionUtils;
|
||||
import com.mogo.eagle.core.function.v2x.events.utils.TrackUtils;
|
||||
import com.mogo.eagle.core.function.v2x.events.utils.V2XSQLiteUtils;
|
||||
import com.mogo.eagle.core.utilcode.mogo.logger.Logger;
|
||||
import com.mogo.eagle.core.utilcode.mogo.toast.TipToast;
|
||||
import com.mogo.eagle.core.utilcode.util.TimeUtils;
|
||||
import com.mogo.eagle.core.utilcode.util.Utils;
|
||||
import com.mogo.map.navi.IMogoNavi;
|
||||
import com.mogo.map.navi.IMogoNaviListener;
|
||||
import com.mogo.map.navi.MogoNaviInfo;
|
||||
import com.mogo.map.navi.MogoTraffic;
|
||||
@@ -30,7 +29,6 @@ import com.mogo.module.common.entity.MarkerExploreWay;
|
||||
import com.mogo.module.common.entity.MarkerLocation;
|
||||
import com.mogo.module.common.entity.V2XEventZanData;
|
||||
import com.mogo.service.module.IMogoRegisterCenter;
|
||||
import com.mogo.eagle.core.utilcode.mogo.logger.Logger;
|
||||
import com.zhidao.carchattingprovider.CallChattingProviderConstant;
|
||||
import com.zhidao.carchattingprovider.ICarsChattingProvider;
|
||||
import com.zhidao.carchattingprovider.MogoDriverInfo;
|
||||
@@ -193,34 +191,6 @@ public abstract class V2XBaseViewHolder<T>
|
||||
delayedCloseWindow();
|
||||
}
|
||||
|
||||
/**
|
||||
* 导航规划路线
|
||||
*/
|
||||
public void triggerStartNavi(MarkerExploreWay noveltyInfo) {
|
||||
try {
|
||||
IMogoRegisterCenter registerCenter = BridgeApi.INSTANCE.registerCenter();
|
||||
if (registerCenter != null) {
|
||||
registerCenter.registerMogoNaviListener(MODULE_NAME, this);
|
||||
}
|
||||
MogoLatLng endPoint = new MogoLatLng(
|
||||
noveltyInfo.getLocation().getLat(),
|
||||
noveltyInfo.getLocation().getLon());
|
||||
|
||||
IMogoNavi navi = BridgeApi.INSTANCE.navi();
|
||||
if (navi != null) {
|
||||
navi.naviTo(endPoint);
|
||||
}
|
||||
TrackUtils.trackV2xRoadEvent(
|
||||
noveltyInfo.getInfoId(),
|
||||
noveltyInfo.getSn(),
|
||||
V2XConst.V2X_ROAD_NAVI);
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
TipToast.tip("路况信息异常");
|
||||
}
|
||||
delayedCloseWindow();
|
||||
}
|
||||
|
||||
public void triggerCancel(){
|
||||
delayedCloseWindow();
|
||||
}
|
||||
@@ -263,11 +233,6 @@ public abstract class V2XBaseViewHolder<T>
|
||||
@Override
|
||||
public void onCalculateSuccess() {
|
||||
Logger.w(TAG, "onCalculateSuccess");
|
||||
|
||||
IMogoNavi navi = BridgeApi.INSTANCE.navi();
|
||||
if (navi != null) {
|
||||
navi.startNavi(true);
|
||||
}
|
||||
IMogoRegisterCenter registerCenter = BridgeApi.INSTANCE.registerCenter();
|
||||
|
||||
if (registerCenter != null) {
|
||||
|
||||
@@ -32,12 +32,11 @@ import com.mogo.module.v2x.voice.V2XVoiceManager;
|
||||
public class V2XFatigueDrivingVH extends V2XBaseViewHolder<V2XEventShowEntity> {
|
||||
|
||||
private TextView mTvAddress, mTvAddressDistance;
|
||||
private ImageView mIvToNav, mIvClose;
|
||||
private ImageView mIvClose;
|
||||
private MarkerExploreWay mNoveltyInfo;
|
||||
private V2XPushMessageEntity mV2XPushMessageEntity;
|
||||
|
||||
// 语音控制导航
|
||||
private V2XVoiceCallbackListener mNaviCb = (command, intent) -> triggerStartNavi(mNoveltyInfo);
|
||||
private V2XVoiceCallbackListener mNaviCancel = (command, intent) -> triggerCancel();
|
||||
|
||||
public V2XFatigueDrivingVH(ViewGroup viewGroup, IV2XWindow v2XWindow) {
|
||||
@@ -46,9 +45,7 @@ public class V2XFatigueDrivingVH extends V2XBaseViewHolder<V2XEventShowEntity> {
|
||||
, v2XWindow);
|
||||
mTvAddress = itemView.findViewById(R.id.tvAddress);
|
||||
mTvAddressDistance = itemView.findViewById(R.id.tvAddressDistance);
|
||||
mIvToNav = itemView.findViewById(R.id.ivToNav);
|
||||
mIvClose = itemView.findViewById(R.id.ivClose);
|
||||
mIvToNav.setOnClickListener(v -> triggerStartNavi(mNoveltyInfo));
|
||||
mIvClose.setOnClickListener(v -> delayedCloseWindow());
|
||||
|
||||
// 设置视图状态监听
|
||||
@@ -56,13 +53,6 @@ public class V2XFatigueDrivingVH extends V2XBaseViewHolder<V2XEventShowEntity> {
|
||||
@Override
|
||||
public void onViewAttachedToWindow(View v) {
|
||||
//Logger.w(MODULE_NAME, "列表View V2XPushEventDetailVH 触发 onViewAttachedToWindow");
|
||||
// 注册语音交互
|
||||
V2XVoiceManager.INSTANCE
|
||||
.registerWakeCmd(V2XVoiceConstants.COMMAND_ZHIDAO_V2X_NAVI,
|
||||
mNaviCb)
|
||||
.registerUnWakeVoice(V2XVoiceConstants.COMMAND_V2X_TO_NAVI_UN_WAKEUP,
|
||||
mNaviCb);
|
||||
|
||||
V2XVoiceManager.INSTANCE
|
||||
.registerUnWakeVoice(V2XVoiceConstants.COMMAND_V2X_CANCEL_NAVI_UN_WAKEUP,mNaviCancel);
|
||||
|
||||
|
||||
@@ -10,25 +10,23 @@ import androidx.recyclerview.widget.RecyclerView;
|
||||
|
||||
import com.alibaba.android.arouter.launcher.ARouter;
|
||||
import com.mogo.commons.voice.AIAssist;
|
||||
import com.mogo.eagle.core.data.map.MogoLatLng;
|
||||
import com.mogo.eagle.core.function.v2x.events.bridge.BridgeApi;
|
||||
import com.mogo.eagle.core.function.v2x.events.consts.V2XConst;
|
||||
import com.mogo.eagle.core.function.v2x.events.utils.ChartingUtil;
|
||||
import com.mogo.eagle.core.function.v2x.events.utils.RoadConditionUtils;
|
||||
import com.mogo.eagle.core.function.v2x.events.utils.TrackUtils;
|
||||
import com.mogo.eagle.core.function.v2x.events.utils.V2XSQLiteUtils;
|
||||
import com.mogo.eagle.core.utilcode.mogo.logger.Logger;
|
||||
import com.mogo.eagle.core.utilcode.mogo.toast.TipToast;
|
||||
import com.mogo.eagle.core.utilcode.util.TimeUtils;
|
||||
import com.mogo.eagle.core.utilcode.util.Utils;
|
||||
import com.mogo.map.navi.IMogoNavi;
|
||||
import com.mogo.map.navi.IMogoNaviListener;
|
||||
import com.mogo.map.navi.MogoNaviInfo;
|
||||
import com.mogo.map.navi.MogoTraffic;
|
||||
import com.mogo.module.common.entity.MarkerExploreWay;
|
||||
import com.mogo.module.common.entity.MarkerLocation;
|
||||
import com.mogo.module.common.entity.V2XEventZanData;
|
||||
import com.mogo.eagle.core.utilcode.mogo.toast.TipToast;
|
||||
import com.mogo.service.module.IMogoRegisterCenter;
|
||||
import com.mogo.eagle.core.utilcode.mogo.logger.Logger;
|
||||
import com.zhidao.carchattingprovider.CallChattingProviderConstant;
|
||||
import com.zhidao.carchattingprovider.ICarsChattingProvider;
|
||||
import com.zhidao.carchattingprovider.MogoDriverInfo;
|
||||
@@ -180,36 +178,6 @@ public abstract class V2XHistoryBaseViewHolder<T>
|
||||
delayedCloseWindow();
|
||||
}
|
||||
|
||||
/**
|
||||
* 导航规划路线
|
||||
*/
|
||||
public void triggerStartNavi(MarkerExploreWay noveltyInfo) {
|
||||
try {
|
||||
|
||||
IMogoRegisterCenter registerCenter = BridgeApi.INSTANCE.registerCenter();
|
||||
if (registerCenter != null) {
|
||||
registerCenter.registerMogoNaviListener(MODULE_NAME, this);
|
||||
}
|
||||
MogoLatLng endPoint = new MogoLatLng(
|
||||
noveltyInfo.getLocation().getLat(),
|
||||
noveltyInfo.getLocation().getLon());
|
||||
|
||||
IMogoNavi navi = BridgeApi.INSTANCE.navi();
|
||||
if (navi != null) {
|
||||
navi.naviTo(endPoint);
|
||||
}
|
||||
TrackUtils.trackV2xRoadEvent(
|
||||
noveltyInfo.getInfoId(),
|
||||
noveltyInfo.getSn(),
|
||||
V2XConst.V2X_ROAD_NAVI);
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
TipToast.tip("路况信息异常");
|
||||
}
|
||||
delayedCloseWindow();
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 显示自定义 Toast
|
||||
*
|
||||
@@ -247,10 +215,6 @@ public abstract class V2XHistoryBaseViewHolder<T>
|
||||
@Override
|
||||
public void onCalculateSuccess() {
|
||||
Logger.w(TAG, "onCalculateSuccess");
|
||||
IMogoNavi navi = BridgeApi.INSTANCE.navi();
|
||||
if (navi != null) {
|
||||
navi.startNavi(true);
|
||||
}
|
||||
IMogoRegisterCenter registerCenter = BridgeApi.INSTANCE.registerCenter();
|
||||
if (registerCenter != null) {
|
||||
registerCenter.unregisterMogoNaviListener(MODULE_NAME);
|
||||
|
||||
@@ -55,15 +55,12 @@ public class V2XOtherSeekHelpVH extends V2XBaseViewHolder<V2XEventShowEntity> {
|
||||
private TextView tvDistance;
|
||||
private TextView tvEventTime;
|
||||
private ImageView ivCall;
|
||||
private ImageView ivNavi;
|
||||
|
||||
private V2XPushMessageEntity mV2XPushMessageEntity;
|
||||
private MarkerExploreWay mNoveltyInfo;
|
||||
|
||||
// 上传事件的用户信息
|
||||
private MarkerUserInfo mUserInfo = new MarkerUserInfo();
|
||||
// 语音控制导航
|
||||
private V2XVoiceCallbackListener mNaviCb = (command, intent) -> triggerStartNavi(mNoveltyInfo);
|
||||
// 语音控制拨打电话
|
||||
private V2XVoiceCallbackListener mCallChartingCb = (command, intent) -> {
|
||||
try {
|
||||
@@ -88,14 +85,6 @@ public class V2XOtherSeekHelpVH extends V2XBaseViewHolder<V2XEventShowEntity> {
|
||||
tvDistance = itemView.findViewById(R.id.tvFaultHelpDistance);
|
||||
tvEventTime = itemView.findViewById(R.id.tvFaultHelpEventTime);
|
||||
ivCall = itemView.findViewById(R.id.ivFaultHelpEventCall);
|
||||
ivNavi = itemView.findViewById(R.id.ivFaultHelpEventNavi);
|
||||
ivNavi.setOnClickListener(v -> {
|
||||
triggerStartNavi(mNoveltyInfo);
|
||||
V2XRefreshModel v2XRefreshModel = BridgeApi.INSTANCE.refreshModel();
|
||||
if (v2XRefreshModel != null) {
|
||||
v2XRefreshModel.respondingToHelp(mUserInfo.getSn());
|
||||
}
|
||||
});
|
||||
|
||||
// 设置视图状态监听
|
||||
itemView.addOnAttachStateChangeListener(new View.OnAttachStateChangeListener() {
|
||||
@@ -104,10 +93,6 @@ public class V2XOtherSeekHelpVH extends V2XBaseViewHolder<V2XEventShowEntity> {
|
||||
//Logger.w(MODULE_NAME, "列表View V2XPushEventDetailVH 触发 onViewAttachedToWindow");
|
||||
// 注册语音交互
|
||||
V2XVoiceManager.INSTANCE
|
||||
.registerWakeCmd(V2XVoiceConstants.COMMAND_ZHIDAO_V2X_NAVI,
|
||||
mNaviCb)
|
||||
.registerUnWakeVoice(V2XVoiceConstants.COMMAND_V2X_TO_NAVI_UN_WAKEUP,
|
||||
mNaviCb)
|
||||
.registerWakeCmd(V2XVoiceConstants.COMMAND_ZHIDAO_V2X_CALL_CHATTING,
|
||||
mCallChartingCb)
|
||||
.registerUnWakeVoice(V2XVoiceConstants.COMMAND_V2X_TO_CHAT_MORE_UN_WAKEUP,
|
||||
@@ -121,8 +106,6 @@ public class V2XOtherSeekHelpVH extends V2XBaseViewHolder<V2XEventShowEntity> {
|
||||
//Logger.w(MODULE_NAME, "列表View V2XPushEventDetailVH 触发 onViewDetachedFromWindow");
|
||||
// 反注册语音交互
|
||||
V2XVoiceManager.INSTANCE
|
||||
.unRegisterWakeCmd(V2XVoiceConstants.COMMAND_ZHIDAO_V2X_NAVI)
|
||||
.unRegisterUnWakeVoice(V2XVoiceConstants.COMMAND_V2X_TO_NAVI_UN_WAKEUP)
|
||||
.unRegisterWakeCmd(V2XVoiceConstants.COMMAND_ZHIDAO_V2X_CALL_CHATTING)
|
||||
.unRegisterUnWakeVoice(V2XVoiceConstants.COMMAND_V2X_TO_CHAT_MORE_UN_WAKEUP)
|
||||
.unRegisterUnWakeVoice(V2XVoiceConstants.COMMAND_ZHIDAO_V2X_OPEN_CAR_INFO_UN_WAKEUP);
|
||||
|
||||
@@ -40,7 +40,6 @@ public class V2XPushEventVH extends V2XBaseViewHolder<V2XEventShowEntity> {
|
||||
private ImageView ivRoadReportTrue;
|
||||
private ImageView ivRoadReportErr;
|
||||
private ImageView ivRoadCallChart;
|
||||
private ImageView ivRoadEventNav;
|
||||
private ImageView ivRoadEventLike;
|
||||
|
||||
// 上传事件的用户信息
|
||||
@@ -49,8 +48,6 @@ public class V2XPushEventVH extends V2XBaseViewHolder<V2XEventShowEntity> {
|
||||
private V2XPushMessageEntity mV2XRoadEventEntity;
|
||||
private MarkerExploreWay mNoveltyInfo;
|
||||
|
||||
// 语音控制导航
|
||||
private V2XVoiceCallbackListener mNaviCb = (command, intent) -> triggerStartNavi(mNoveltyInfo);
|
||||
// 语音控制拨打电话
|
||||
private V2XVoiceCallbackListener mCallChartingCb = (command, intent) -> {
|
||||
try {
|
||||
@@ -78,11 +75,8 @@ public class V2XPushEventVH extends V2XBaseViewHolder<V2XEventShowEntity> {
|
||||
ivRoadReportTrue = itemView.findViewById(R.id.ivRoadReportTrue);
|
||||
ivRoadReportErr = itemView.findViewById(R.id.ivRoadReportErr);
|
||||
ivRoadCallChart = itemView.findViewById(R.id.ivRoadCallChart);
|
||||
ivRoadEventNav = itemView.findViewById(R.id.ivRoadEventNav);
|
||||
ivRoadEventLike = itemView.findViewById(R.id.ivRoadEventLike);
|
||||
|
||||
ivRoadEventNav.getParent().getParent().requestDisallowInterceptTouchEvent(true);
|
||||
ivRoadEventNav.setOnClickListener(v -> triggerStartNavi(mNoveltyInfo));
|
||||
ivRoadCallChart.setOnClickListener(v -> {
|
||||
try {
|
||||
mUserInfo.setSn(mV2XRoadEventEntity.getSn());
|
||||
@@ -105,10 +99,6 @@ public class V2XPushEventVH extends V2XBaseViewHolder<V2XEventShowEntity> {
|
||||
//Logger.w(MODULE_NAME, "列表View V2XPushEventDetailVH 触发 onViewAttachedToWindow");
|
||||
// 注册语音交互
|
||||
V2XVoiceManager.INSTANCE
|
||||
.registerWakeCmd(V2XVoiceConstants.COMMAND_ZHIDAO_V2X_NAVI,
|
||||
mNaviCb)
|
||||
.registerUnWakeVoice(V2XVoiceConstants.COMMAND_V2X_TO_NAVI_UN_WAKEUP,
|
||||
mNaviCb)
|
||||
.registerWakeCmd(V2XVoiceConstants.COMMAND_ZHIDAO_V2X_CALL_CHATTING,
|
||||
mCallChartingCb)
|
||||
.registerUnWakeVoice(V2XVoiceConstants.COMMAND_V2X_TO_CHAT_MORE_UN_WAKEUP,
|
||||
@@ -128,8 +118,6 @@ public class V2XPushEventVH extends V2XBaseViewHolder<V2XEventShowEntity> {
|
||||
}
|
||||
// 反注册语音交互
|
||||
V2XVoiceManager.INSTANCE
|
||||
.unRegisterWakeCmd(V2XVoiceConstants.COMMAND_ZHIDAO_V2X_NAVI)
|
||||
.unRegisterUnWakeVoice(V2XVoiceConstants.COMMAND_V2X_TO_NAVI_UN_WAKEUP)
|
||||
.unRegisterWakeCmd(V2XVoiceConstants.COMMAND_ZHIDAO_V2X_CLOSE_WINDOW)
|
||||
.unRegisterUnWakeVoice(V2XVoiceConstants.COMMAND_V2X_TO_CLOSE_WINDOW_UN_WAKEUP)
|
||||
.unRegisterWakeCmd(V2XVoiceConstants.COMMAND_ZHIDAO_V2X_CALL_CHATTING)
|
||||
@@ -171,7 +159,6 @@ public class V2XPushEventVH extends V2XBaseViewHolder<V2XEventShowEntity> {
|
||||
switch (mV2XRoadEventEntity.getSceneId()) {
|
||||
case "100015"://取快递
|
||||
case "100016"://顺风车
|
||||
ivRoadEventNav.setVisibility(View.VISIBLE);
|
||||
ivRoadCallChart.setVisibility(View.VISIBLE);
|
||||
ivRoadReportTrue.setVisibility(View.GONE);
|
||||
ivRoadReportErr.setVisibility(View.GONE);
|
||||
@@ -182,7 +169,6 @@ public class V2XPushEventVH extends V2XBaseViewHolder<V2XEventShowEntity> {
|
||||
case "100018"://故障车辆推送
|
||||
ivRoadEventLike.setVisibility(View.VISIBLE);
|
||||
ivRoadCallChart.setVisibility(View.GONE);
|
||||
ivRoadEventNav.setVisibility(View.GONE);
|
||||
ivRoadReportTrue.setVisibility(View.GONE);
|
||||
ivRoadReportErr.setVisibility(View.GONE);
|
||||
break;
|
||||
|
||||
@@ -31,16 +31,13 @@ import kotlinx.coroutines.launch
|
||||
class V2XRecommendRouteVH(viewGroup: ViewGroup, v2XWindow: IV2XWindow<*>) : V2XBaseViewHolder<V2XEventShowEntity>(
|
||||
LayoutInflater.from(viewGroup.context).inflate(R.layout.item_v2x_recommend_route, viewGroup, false), v2XWindow), V2XVoiceCallbackListener {
|
||||
private var mTvAddress: TextView? = null
|
||||
private var mIvToNav: ImageView? = null
|
||||
private var mIvClose: ImageView? = null
|
||||
private var mNoveltyInfo: MarkerExploreWay? = null
|
||||
private val mainScope = MainScope()
|
||||
|
||||
init {
|
||||
mTvAddress = itemView.findViewById<TextView>(R.id.tvAddress)
|
||||
mIvToNav = itemView.findViewById<ImageView>(R.id.ivToNav)
|
||||
mIvClose = itemView.findViewById<ImageView>(R.id.ivClose)
|
||||
mIvToNav?.setOnClickListener { triggerStartNavi(mNoveltyInfo) }
|
||||
mTvAddress = itemView.findViewById(R.id.tvAddress)
|
||||
mIvClose = itemView.findViewById(R.id.ivClose)
|
||||
mIvClose?.setOnClickListener { delayedCloseWindow() }
|
||||
itemView.addOnAttachStateChangeListener(object : View.OnAttachStateChangeListener {
|
||||
override fun onViewAttachedToWindow(view: View) {
|
||||
@@ -75,7 +72,6 @@ class V2XRecommendRouteVH(viewGroup: ViewGroup, v2XWindow: IV2XWindow<*>) : V2XB
|
||||
|
||||
override fun onCallback(command: String?, intent: Intent?) {
|
||||
when (command) {
|
||||
V2XVoiceConstants.V2X_CONFIRM_ACTION -> triggerStartNavi(mNoveltyInfo)
|
||||
V2XVoiceConstants.V2X_CANCLE_ACTION -> delayedCloseWindow()
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,5 +1,8 @@
|
||||
package com.mogo.eagle.core.function.v2x.events.adapter.holder;
|
||||
|
||||
import static android.view.View.GONE;
|
||||
import static android.view.View.VISIBLE;
|
||||
|
||||
import android.text.TextUtils;
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.View;
|
||||
@@ -28,9 +31,6 @@ import java.text.SimpleDateFormat;
|
||||
import java.util.Date;
|
||||
import java.util.Locale;
|
||||
|
||||
import static android.view.View.GONE;
|
||||
import static android.view.View.VISIBLE;
|
||||
|
||||
/**
|
||||
* 出行动态中的他人故障求助
|
||||
*
|
||||
@@ -45,7 +45,6 @@ public class V2XScenarioHistoryOtherSeekHelpVH extends V2XHistoryBaseViewHolder<
|
||||
private TextView mTvFaultHelpEventTime;
|
||||
private TextView mTvFaultHelpDistance;
|
||||
private ImageView mIvFaultHelpEventCall;
|
||||
private ImageView mIvFaultHelpEventNavi;
|
||||
|
||||
private MarkerExploreWay mNoveltyInfo;
|
||||
// 上传事件的用户信息
|
||||
@@ -63,7 +62,6 @@ public class V2XScenarioHistoryOtherSeekHelpVH extends V2XHistoryBaseViewHolder<
|
||||
mTvFaultHelpEventTime = itemView.findViewById(R.id.tvFaultHelpEventTime);
|
||||
mTvFaultHelpDistance = itemView.findViewById(R.id.tvFaultHelpDistance);
|
||||
mIvFaultHelpEventCall = itemView.findViewById(R.id.ivFaultHelpEventCall);
|
||||
mIvFaultHelpEventNavi = itemView.findViewById(R.id.ivFaultHelpEventNavi);
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -118,11 +116,6 @@ public class V2XScenarioHistoryOtherSeekHelpVH extends V2XHistoryBaseViewHolder<
|
||||
e.printStackTrace();
|
||||
}
|
||||
|
||||
mIvFaultHelpEventNavi.setOnClickListener(v -> {
|
||||
BridgeApi.INSTANCE.refreshModel().respondingToHelp(mUserInfo.getSn());
|
||||
triggerStartNavi(mNoveltyInfo);
|
||||
});
|
||||
|
||||
// M1低配车机限制
|
||||
// 不展示打电话按钮
|
||||
// 不能查看用户详情
|
||||
|
||||
@@ -80,8 +80,6 @@ internal object BridgeApi {
|
||||
|
||||
fun analytics() = apis?.analyticsApi
|
||||
|
||||
fun navi() = apis?.mapServiceApi?.getNavi(context())
|
||||
|
||||
fun overlay() = apis?.mapServiceApi?.getOverlayManager(context())
|
||||
|
||||
fun carChatProvider() = carChatProvider
|
||||
|
||||
@@ -63,19 +63,6 @@ public interface IMoGoV2XMarkerManager extends IProvider {
|
||||
*/
|
||||
void clearOnlineCarPOI();
|
||||
|
||||
/**
|
||||
* 绘制 特殊车辆
|
||||
*
|
||||
* @param context
|
||||
* @param v2XMarkerEntity
|
||||
* @param clickListener
|
||||
*/
|
||||
void drawableSpecialCarPOI(Context context, V2XSpecialCarRes.V2XMarkerEntity v2XMarkerEntity, IMogoMarkerClickListener clickListener);
|
||||
|
||||
/**
|
||||
* 清除 特殊车辆 POI
|
||||
*/
|
||||
void clearSpecialCarPOI();
|
||||
|
||||
/**
|
||||
* 绘制可以直播的在线车辆
|
||||
|
||||
@@ -2,20 +2,16 @@ package com.mogo.eagle.core.function.v2x.events.manager.impl;
|
||||
|
||||
import static com.mogo.eagle.core.function.v2x.events.consts.V2XConst.MODULE_NAME;
|
||||
import static com.mogo.eagle.core.function.v2x.events.consts.V2XConst.V2X_EVENT_ALARM_POI;
|
||||
import static com.mogo.module.service.strategy.CarIconDisplayStrategy.sFrameVr;
|
||||
|
||||
import android.content.Context;
|
||||
import android.graphics.Bitmap;
|
||||
import android.graphics.BitmapFactory;
|
||||
|
||||
import com.alibaba.android.arouter.facade.annotation.Route;
|
||||
import com.mogo.commons.AbsMogoApplication;
|
||||
import com.mogo.eagle.core.data.map.MogoLatLng;
|
||||
import com.mogo.eagle.core.data.map.MogoLocation;
|
||||
import com.mogo.eagle.core.function.v2x.R;
|
||||
import com.mogo.eagle.core.function.v2x.events.bridge.BridgeApi;
|
||||
import com.mogo.eagle.core.function.v2x.events.consts.MoGoV2XServicePaths;
|
||||
import com.mogo.eagle.core.function.v2x.events.consts.V2XConst;
|
||||
import com.mogo.eagle.core.function.v2x.events.entity.net.V2XSpecialCarRes;
|
||||
import com.mogo.eagle.core.function.v2x.events.listener.V2XMarkerClickListener;
|
||||
import com.mogo.eagle.core.function.v2x.events.manager.IMoGoV2XMarkerManager;
|
||||
import com.mogo.eagle.core.function.v2x.events.manager.IMoGoV2XPolylineManager;
|
||||
@@ -24,6 +20,7 @@ import com.mogo.eagle.core.function.v2x.events.manager.V2XStatusManager;
|
||||
import com.mogo.eagle.core.function.v2x.events.marker.V2XMarkerAdapter;
|
||||
import com.mogo.eagle.core.function.v2x.events.utils.EntityUtilsKt;
|
||||
import com.mogo.eagle.core.function.v2x.events.utils.MapUtils;
|
||||
import com.mogo.eagle.core.utilcode.mogo.logger.Logger;
|
||||
import com.mogo.eagle.core.utilcode.util.ViewUtils;
|
||||
import com.mogo.map.marker.IMogoMarker;
|
||||
import com.mogo.map.marker.IMogoMarkerClickListener;
|
||||
@@ -34,7 +31,6 @@ import com.mogo.map.uicontroller.IMogoMapUIController;
|
||||
import com.mogo.module.common.drawer.MarkerDrawer;
|
||||
import com.mogo.module.common.drawer.marker.IMarkerView;
|
||||
import com.mogo.module.common.drawer.marker.MapMarkerAdapter;
|
||||
import com.mogo.module.common.drawer.marker.RoadConditionInfoWindow3DAdapter;
|
||||
import com.mogo.module.common.entity.MarkerCardResult;
|
||||
import com.mogo.module.common.entity.MarkerExploreWay;
|
||||
import com.mogo.module.common.entity.MarkerLocation;
|
||||
@@ -47,13 +43,11 @@ import com.mogo.module.common.utils.CarSeries;
|
||||
import com.mogo.module.service.ServiceConst;
|
||||
import com.mogo.module.service.Utils;
|
||||
import com.mogo.service.statusmanager.IMogoStatusManager;
|
||||
import com.mogo.eagle.core.utilcode.mogo.logger.Logger;
|
||||
import com.mogo.v2x.V2XManager;
|
||||
import com.mogo.v2x.data.V2XMarkerCardResult;
|
||||
import com.mogo.v2x.data.V2XMarkerExploreWay;
|
||||
import com.mogo.v2x.data.V2XMarkerLocation;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.concurrent.CopyOnWriteArrayList;
|
||||
import java.util.concurrent.CopyOnWriteArraySet;
|
||||
@@ -84,7 +78,6 @@ public class MoGoV2XMarkerManager implements IMoGoV2XMarkerManager {
|
||||
polylineManager.clearLine();
|
||||
}
|
||||
clearAlarmPOI();
|
||||
clearSpecialCarPOI();
|
||||
// 锁车
|
||||
IMogoMapUIController mapUiController = BridgeApi.INSTANCE.mapUiController();
|
||||
if (mapUiController != null) {
|
||||
@@ -257,152 +250,6 @@ public class MoGoV2XMarkerManager implements IMoGoV2XMarkerManager {
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void drawableSpecialCarPOI(Context context, V2XSpecialCarRes.V2XMarkerEntity v2XMarkerEntity, IMogoMarkerClickListener clickListener) {
|
||||
try {
|
||||
IMogoMapUIController mapUiController = BridgeApi.INSTANCE.mapUiController();
|
||||
if (mapUiController != null) {
|
||||
mapUiController.changeMapMode(EnumMapUI.NorthUP_2D);
|
||||
}
|
||||
IMoGoV2XStatusManager v2xStatus = BridgeApi.INSTANCE.v2xStatus();
|
||||
if (v2xStatus != null) {
|
||||
v2xStatus.setOtherSeekHelpPOIShow(TAG, true);
|
||||
}
|
||||
|
||||
// 绘制特殊车辆
|
||||
if (v2XMarkerEntity == null) {
|
||||
return;
|
||||
}
|
||||
MarkerLocation markerLocation = new MarkerLocation();
|
||||
markerLocation.setLon(v2XMarkerEntity.getLon());
|
||||
markerLocation.setLat(v2XMarkerEntity.getLat());
|
||||
|
||||
// 进行数据转换,用于Marker展示
|
||||
V2XRoadEventEntity roadEventEntity = new V2XRoadEventEntity();
|
||||
roadEventEntity.setPoiType(v2XMarkerEntity.getTargetId() + "");
|
||||
roadEventEntity.setLocation(markerLocation);
|
||||
roadEventEntity.setBindObj(v2XMarkerEntity);
|
||||
|
||||
MarkerShowEntity markerShowEntity = new MarkerShowEntity();
|
||||
markerShowEntity.setBindObj(v2XMarkerEntity);
|
||||
markerShowEntity.setChecked(false);
|
||||
markerShowEntity.setMarkerLocation(markerLocation);
|
||||
|
||||
// 重置告警信息
|
||||
V2XStatusManager.getInstance().setAlarmInfo(roadEventEntity);
|
||||
|
||||
// 清除原来的大而全的新鲜事儿
|
||||
clearALLPOI();
|
||||
if (roadEventEntity.getLocation() != null) {
|
||||
// 道路事件,或者水波纹扩散效果
|
||||
MogoMarkerOptions optionsRipple = new MogoMarkerOptions()
|
||||
.data(roadEventEntity)
|
||||
.latitude(roadEventEntity.getLocation().getLat())
|
||||
.longitude(roadEventEntity.getLocation().getLon());
|
||||
optionsRipple.anchor(0.5f, 0.5f);
|
||||
|
||||
//由于性能问题,D车机不使用事件扩散动画
|
||||
//showInfoWindow只支持添加单个marker,不支持帧动画
|
||||
if (!CarSeries.isF8xxSeries()) {
|
||||
optionsRipple.icon(V2XMarkerAdapter.getV2XRoadEventViewPng(context, roadEventEntity));
|
||||
boolean isVrMode = false;
|
||||
IMogoStatusManager statusManager = BridgeApi.INSTANCE.statusManager();
|
||||
if (statusManager != null) {
|
||||
isVrMode = statusManager.isVrMode();
|
||||
}
|
||||
if (isVrMode) {
|
||||
mAlarmInfoMarker = MarkerDrawer.getInstance().drawMapMarkerImpl(markerShowEntity, MarkerDrawer.MARKER_Z_INDEX_HIGH, null);
|
||||
mAlarmInfoMarker.setInfoWindowAdapter(new RoadConditionInfoWindow3DAdapter(markerShowEntity, AbsMogoApplication.getApp(), mAlarmInfoMarker.getMogoMarkerOptions()));
|
||||
mAlarmInfoMarker.showInfoWindow();
|
||||
} else {
|
||||
IMogoMarkerManager marker = BridgeApi.INSTANCE.marker();
|
||||
if (marker != null) {
|
||||
mAlarmInfoMarker = marker.addMarker(V2X_EVENT_ALARM_POI, optionsRipple);
|
||||
}
|
||||
}
|
||||
// 当前Marker设置为最上面
|
||||
mAlarmInfoMarker.setToTop();
|
||||
} else {
|
||||
boolean isVrMode = false;
|
||||
IMogoStatusManager statusManager = BridgeApi.INSTANCE.statusManager();
|
||||
if (statusManager != null) {
|
||||
isVrMode = statusManager.isVrMode();
|
||||
}
|
||||
if (isVrMode) {
|
||||
ArrayList<Bitmap> mBitmapFrames = new ArrayList<>();
|
||||
for (int i : sFrameVr) {
|
||||
mBitmapFrames.add(BitmapFactory.decodeResource(AbsMogoApplication.getApp().getResources(), i));
|
||||
}
|
||||
optionsRipple.icons(mBitmapFrames);
|
||||
optionsRipple.period(20);
|
||||
optionsRipple.scale(0.4f);
|
||||
IMogoMarkerManager marker = BridgeApi.INSTANCE.marker();
|
||||
if (marker != null) {
|
||||
mAlarmInfoMarker = marker.addMarker(V2X_EVENT_ALARM_POI, optionsRipple);
|
||||
}
|
||||
|
||||
MogoMarkerOptions options = new MogoMarkerOptions().data(roadEventEntity)
|
||||
.latitude(roadEventEntity.getLocation().getLat()).longitude(roadEventEntity.getLocation().getLon());
|
||||
options.anchor(0.5f, 0.5f);
|
||||
options.icon3DRes(R.raw.special_vehicle);
|
||||
options.anchorColor("#FFBF29FF");
|
||||
if (marker != null) {
|
||||
m3DMarker = marker.addMarker(V2X_EVENT_ALARM_POI, options);
|
||||
}
|
||||
if (m3DMarker != null) {
|
||||
m3DMarker.setToTop();
|
||||
}
|
||||
} else {
|
||||
optionsRipple.icons(V2XMarkerAdapter.getV2XRoadEventViewGif(context, roadEventEntity));
|
||||
optionsRipple.period(100);
|
||||
IMogoMarkerManager marker = BridgeApi.INSTANCE.marker();
|
||||
if (marker != null) {
|
||||
mAlarmInfoMarker = marker.addMarker(V2X_EVENT_ALARM_POI, optionsRipple);
|
||||
}
|
||||
// 当前Marker设置为最上面
|
||||
if (mAlarmInfoMarker != null) {
|
||||
mAlarmInfoMarker.setToTop();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// 绘制连接线
|
||||
IMoGoV2XPolylineManager iMoGoV2XPolylineManager = BridgeApi.INSTANCE.v2xPolyline();
|
||||
if (iMoGoV2XPolylineManager != null) {
|
||||
iMoGoV2XPolylineManager.drawablePolyline(context, roadEventEntity);
|
||||
}
|
||||
// 缩放地图
|
||||
MapUtils.zoomMap(
|
||||
new MogoLatLng(roadEventEntity.getLocation().getLat(),
|
||||
roadEventEntity.getLocation().getLon()
|
||||
), context);
|
||||
} else {
|
||||
Logger.e(MODULE_NAME, "Location 必须进行初始化!!!!!");
|
||||
}
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void clearSpecialCarPOI() {
|
||||
boolean isOtherSeekHelpPOIShow = false;
|
||||
IMoGoV2XStatusManager iMoGoV2XStatusManager = BridgeApi.INSTANCE.v2xStatus();
|
||||
if (iMoGoV2XStatusManager != null) {
|
||||
isOtherSeekHelpPOIShow = iMoGoV2XStatusManager.isOtherSeekHelpPOIShow();
|
||||
}
|
||||
if (isOtherSeekHelpPOIShow) {
|
||||
iMoGoV2XStatusManager.setOtherSeekHelpPOIShow(TAG, false);
|
||||
// 重置告警信息
|
||||
V2XStatusManager.getInstance().setAlarmInfo(null);
|
||||
if (mAlarmInfoMarker != null) {
|
||||
mAlarmInfoMarker.remove();
|
||||
}
|
||||
if (m3DMarker != null) {
|
||||
m3DMarker.remove();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void drawableLiveCarPOI(List<MarkerOnlineCar> markerOnlineCars, IMogoMarkerClickListener clickListener) {
|
||||
|
||||
@@ -9,10 +9,10 @@ import com.mogo.eagle.core.function.v2x.events.consts.MoGoV2XServicePaths;
|
||||
import com.mogo.eagle.core.function.v2x.events.manager.IMoGoV2XPolylineManager;
|
||||
import com.mogo.eagle.core.function.v2x.events.manager.IMoGoV2XStatusManager;
|
||||
import com.mogo.eagle.core.function.v2x.events.manager.V2XStatusManager;
|
||||
import com.mogo.map.navi.IMogoNavi;
|
||||
import com.mogo.map.overlay.IMogoOverlayManager;
|
||||
import com.mogo.map.overlay.IMogoPolyline;
|
||||
import com.mogo.map.overlay.MogoPolylineOptions;
|
||||
import com.mogo.module.common.MogoApisHandler;
|
||||
import com.mogo.module.common.entity.V2XRoadEventEntity;
|
||||
import com.mogo.module.common.enums.EventTypeEnum;
|
||||
import com.mogo.service.statusmanager.IMogoStatusManager;
|
||||
@@ -76,11 +76,11 @@ public class MoGoV2XPolylineManager implements IMoGoV2XPolylineManager {
|
||||
options.width(10).useGradient(true).colorValues(colors);
|
||||
|
||||
// 当前车辆位置
|
||||
IMogoNavi navi = BridgeApi.INSTANCE.navi();
|
||||
MogoLatLng carLocation = null;
|
||||
if (navi != null) {
|
||||
carLocation = navi.getCarLocation();
|
||||
}
|
||||
MogoLatLng carLocation = new MogoLatLng(
|
||||
MogoApisHandler.getInstance().getApis().getAdasControllerApi().getLastLat(),
|
||||
MogoApisHandler.getInstance().getApis().getAdasControllerApi().getLastLon()
|
||||
);
|
||||
|
||||
if (carLocation != null) {
|
||||
options.add(carLocation);
|
||||
} else {
|
||||
|
||||
@@ -6,22 +6,18 @@ import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
|
||||
import androidx.annotation.Nullable;
|
||||
import com.mogo.eagle.core.data.map.MogoLatLng;
|
||||
|
||||
import com.mogo.eagle.core.function.v2x.R;
|
||||
import com.mogo.eagle.core.function.v2x.events.bridge.BridgeApi;
|
||||
import com.mogo.eagle.core.function.v2x.events.manager.IMoGoV2XStatusManager;
|
||||
import com.mogo.eagle.core.function.v2x.events.scenario.impl.AbsV2XScenario;
|
||||
import com.mogo.eagle.core.function.v2x.events.voice.V2XVoiceCallbackListener;
|
||||
import com.mogo.eagle.core.function.v2x.events.voice.V2XVoiceConstants;
|
||||
import com.mogo.eagle.core.utilcode.mogo.logger.Logger;
|
||||
import com.mogo.eagle.core.utilcode.util.Utils;
|
||||
import com.mogo.map.navi.IMogoNavi;
|
||||
import com.mogo.module.common.entity.V2XMessageEntity;
|
||||
import com.mogo.module.common.entity.V2XPushMessageEntity;
|
||||
import com.mogo.module.v2x.voice.V2XVoiceManager;
|
||||
import com.mogo.service.statusmanager.IMogoStatusManager;
|
||||
import com.mogo.service.windowview.IMogoTopViewManager;
|
||||
import com.mogo.service.windowview.IMogoTopViewStatusListener;
|
||||
import com.mogo.eagle.core.utilcode.mogo.logger.Logger;
|
||||
|
||||
|
||||
/**
|
||||
@@ -34,9 +30,6 @@ import com.mogo.eagle.core.utilcode.mogo.logger.Logger;
|
||||
*/
|
||||
public class V2XFatigueDrivingScenario extends AbsV2XScenario<V2XPushMessageEntity> implements IMogoTopViewStatusListener {
|
||||
|
||||
// 语音控制导航
|
||||
private V2XVoiceCallbackListener mNaviCb = (command, intent) -> startNavi();
|
||||
|
||||
public V2XFatigueDrivingScenario() {
|
||||
setV2XWindow(new V2XFatigueDrivingWindow());
|
||||
}
|
||||
@@ -56,10 +49,6 @@ public class V2XFatigueDrivingScenario extends AbsV2XScenario<V2XPushMessageEnti
|
||||
if (!isSameScenario(v2XMessageEntity)) {
|
||||
setV2XMessageEntity(v2XMessageEntity);
|
||||
if (v2XMessageEntity != null) {
|
||||
// 注册语音交互
|
||||
V2XVoiceManager.INSTANCE
|
||||
.registerWakeCmd(V2XVoiceConstants.COMMAND_ZHIDAO_V2X_NAVI, mNaviCb)
|
||||
.registerUnWakeVoice(V2XVoiceConstants.COMMAND_V2X_TO_NAVI_UN_WAKEUP, mNaviCb);
|
||||
if (v2XMessageEntity.isShowState()
|
||||
&& isMainPageOnResume) {
|
||||
show();
|
||||
@@ -146,27 +135,4 @@ public class V2XFatigueDrivingScenario extends AbsV2XScenario<V2XPushMessageEnti
|
||||
v2xStatus.setFatigueDrivingWindowShow(TAG, false);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 导航规划路线
|
||||
*/
|
||||
private void startNavi() {
|
||||
if (getV2XMessageEntity().getContent() != null) {
|
||||
// 反注册语音交互
|
||||
V2XVoiceManager.INSTANCE
|
||||
.unRegisterWakeCmd(
|
||||
V2XVoiceConstants.COMMAND_ZHIDAO_V2X_NAVI)
|
||||
.unRegisterUnWakeVoice(
|
||||
V2XVoiceConstants.COMMAND_V2X_TO_NAVI_UN_WAKEUP);
|
||||
MogoLatLng endPoint = new MogoLatLng(getV2XMessageEntity().getContent().getLat(),
|
||||
getV2XMessageEntity().getContent().getLon());
|
||||
IMogoNavi navi = BridgeApi.INSTANCE.navi();
|
||||
if (navi != null) {
|
||||
navi.naviTo(endPoint);
|
||||
}
|
||||
close();
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -132,8 +132,6 @@ public class V2XCarForHelpScenario extends AbsV2XScenario<Boolean> implements IM
|
||||
|
||||
IMoGoV2XMarkerManager v2xMarker = BridgeApi.INSTANCE.v2xMarker();
|
||||
if (v2xMarker != null) {
|
||||
// 移除事件POI
|
||||
v2xMarker.clearSpecialCarPOI();
|
||||
// 绘制上次的数据
|
||||
v2xMarker.drawableLastAllPOI();
|
||||
}
|
||||
|
||||
@@ -1,14 +1,13 @@
|
||||
package com.mogo.eagle.core.function.v2x.events.utils;
|
||||
|
||||
import android.location.Location;
|
||||
import android.util.Log;
|
||||
|
||||
import com.mogo.eagle.core.data.map.MogoLatLng;
|
||||
import com.mogo.eagle.core.data.map.MogoLocation;
|
||||
import com.mogo.eagle.core.function.v2x.events.bridge.BridgeApi;
|
||||
import com.mogo.map.location.IMogoLocationClient;
|
||||
import com.mogo.map.navi.IMogoNavi;
|
||||
import com.mogo.map.uicontroller.IMogoMapUIController;
|
||||
import com.mogo.module.common.MogoApisHandler;
|
||||
|
||||
/**
|
||||
* author : donghongyu
|
||||
@@ -26,31 +25,21 @@ public class LocationUtils {
|
||||
* @return 当前位置
|
||||
*/
|
||||
public static MogoLatLng getCurrentLatLon() {
|
||||
IMogoNavi navi = BridgeApi.INSTANCE.navi();
|
||||
MogoLatLng latLon = null;
|
||||
if (navi != null) {
|
||||
latLon = navi.getCarLocation();
|
||||
if (latLon == null) {
|
||||
Location location = navi.getCarLocation2();
|
||||
if (location != null) {
|
||||
latLon = new MogoLatLng(location.getLatitude(), location.getLongitude());
|
||||
}
|
||||
// 当前车辆位置
|
||||
MogoLatLng latLon = new MogoLatLng(
|
||||
MogoApisHandler.getInstance().getApis().getAdasControllerApi().getLastLat(),
|
||||
MogoApisHandler.getInstance().getApis().getAdasControllerApi().getLastLon()
|
||||
);
|
||||
IMogoLocationClient locationClient = BridgeApi.INSTANCE.locationClient();
|
||||
if (locationClient != null) {
|
||||
MogoLocation location = locationClient.getLastKnowLocation();
|
||||
if (location != null) {
|
||||
latLon = new MogoLatLng(location.getLatitude(), location.getLongitude());
|
||||
}
|
||||
}
|
||||
if (latLon == null) {
|
||||
IMogoLocationClient locationClient = BridgeApi.INSTANCE.locationClient();
|
||||
if (locationClient != null) {
|
||||
MogoLocation location = locationClient.getLastKnowLocation();
|
||||
if (location != null) {
|
||||
latLon = new MogoLatLng(location.getLatitude(), location.getLongitude());
|
||||
}
|
||||
}
|
||||
}
|
||||
if (latLon == null) {
|
||||
IMogoMapUIController mapUiController = BridgeApi.INSTANCE.mapUiController();
|
||||
if (mapUiController != null) {
|
||||
latLon = mapUiController.getWindowCenterLocation();
|
||||
}
|
||||
IMogoMapUIController mapUiController = BridgeApi.INSTANCE.mapUiController();
|
||||
if (mapUiController != null) {
|
||||
latLon = mapUiController.getWindowCenterLocation();
|
||||
}
|
||||
return latLon;
|
||||
}
|
||||
|
||||
@@ -5,6 +5,7 @@ import android.graphics.Rect
|
||||
import com.mogo.eagle.core.data.map.MogoLatLng
|
||||
import com.mogo.eagle.core.function.v2x.events.bridge.BridgeApi
|
||||
import com.mogo.eagle.core.utilcode.util.WindowUtils
|
||||
import com.mogo.module.common.MogoApisHandler
|
||||
import com.mogo.module.common.utils.CarSeries
|
||||
import java.lang.Exception
|
||||
|
||||
@@ -18,8 +19,6 @@ class MapUtils {
|
||||
if (latLng == null) {
|
||||
return
|
||||
}
|
||||
// 当前车辆位置
|
||||
val navi = BridgeApi.navi() ?: return
|
||||
//Logger.d(V2XConst.MODULE_NAME, "重新调整地图缩放比:" + latLng);
|
||||
val mBoundRect = Rect()
|
||||
val paddingTop: Int
|
||||
@@ -41,7 +40,11 @@ class MapUtils {
|
||||
mBoundRect.top = paddingTop
|
||||
mBoundRect.left = paddingLeft
|
||||
mBoundRect.right = paddingRight
|
||||
val carLocation = navi.carLocation
|
||||
// 当前车辆位置
|
||||
val carLocation = MogoLatLng(
|
||||
MogoApisHandler.getInstance().apis.adasControllerApi.lastLat,
|
||||
MogoApisHandler.getInstance().apis.adasControllerApi.lastLon
|
||||
)
|
||||
// 调整自适应的地图镜头
|
||||
carLocation?.let {
|
||||
BridgeApi.mapUiController()?.showBounds("MapUtils", it, listOf(latLng), mBoundRect, true)
|
||||
|
||||
@@ -71,6 +71,7 @@
|
||||
<ImageView
|
||||
android:id="@+id/ivToNav"
|
||||
android:layout_width="@dimen/module_v2x_event_button_size"
|
||||
android:visibility="invisible"
|
||||
android:layout_height="@dimen/module_v2x_event_button_size"
|
||||
android:layout_marginEnd="@dimen/dp_40"
|
||||
android:src="@drawable/selector_nav_btn"
|
||||
|
||||
@@ -112,6 +112,7 @@
|
||||
android:id="@+id/ivFaultHelpEventNavi"
|
||||
android:layout_width="@dimen/module_v2x_event_button_size"
|
||||
android:layout_height="@dimen/module_v2x_event_button_size"
|
||||
android:visibility="gone"
|
||||
android:src="@drawable/selector_nav_btn"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
|
||||
@@ -107,9 +107,9 @@
|
||||
android:layout_height="@dimen/module_v2x_fault_help_event_call_width"
|
||||
android:layout_marginRight="@dimen/module_v2x_fault_help_event_navi_margin_right"
|
||||
android:src="@drawable/v2x_event_icon_daohang_vr"
|
||||
android:visibility="gone"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
tools:visibility="visible" />
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
@@ -110,7 +110,7 @@
|
||||
android:visibility="gone"
|
||||
app:layout_constraintStart_toEndOf="@+id/ivRoadCallChart"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
tools:visibility="visible" />
|
||||
/>
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/ivRoadEventLike"
|
||||
|
||||
@@ -57,6 +57,7 @@
|
||||
android:layout_height="@dimen/module_v2x_event_button_size"
|
||||
android:layout_marginEnd="@dimen/dp_40"
|
||||
android:src="@drawable/v2x_to_nav"
|
||||
android:visibility="gone"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toStartOf="@+id/ivClose"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
@@ -123,6 +123,7 @@
|
||||
android:layout_height="@dimen/module_v2x_event_button_size"
|
||||
android:layout_marginRight="@dimen/dp_40"
|
||||
android:src="@drawable/selector_nav_history"
|
||||
android:visibility="gone"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
Reference in New Issue
Block a user