[2.13.0-merge]yakun and code style

This commit is contained in:
zhongchao
2022-11-21 18:07:52 +08:00
844 changed files with 3197 additions and 29173 deletions

View File

@@ -8,12 +8,23 @@ import androidx.core.util.Pair
import androidx.localbroadcastmanager.content.*
import com.mogo.cloud.commons.utils.*
import com.mogo.cloud.passport.*
import com.mogo.commons.AbsMogoApplication
import com.mogo.commons.module.ServiceConst.CARD_TYPE_ROAD_CONDITION
import com.mogo.commons.module.status.IMogoStatusChangedListener
import com.mogo.commons.module.status.MogoStatusManager
import com.mogo.commons.module.status.StatusDescriptor
import com.mogo.eagle.core.data.enums.EventTypeEnum
import com.mogo.eagle.core.data.enums.EventTypeHelper
import com.mogo.commons.network.*
import com.mogo.eagle.core.data.deva.chain.ChainConstant.Companion.CHAIN_ALIAS_CODE_CLOUD_V2N
import com.mogo.eagle.core.data.deva.chain.ChainConstant.Companion.CHAIN_LINK_CLOUD_SHOW
import com.mogo.eagle.core.data.deva.chain.ChainConstant.Companion.CHAIN_LINK_LOG_CLOUD_V2N
import com.mogo.eagle.core.data.enums.*
import com.mogo.eagle.core.data.map.*
import com.mogo.eagle.core.data.map.entity.MarkerExploreWay
import com.mogo.eagle.core.data.map.entity.MarkerShowEntity
import com.mogo.eagle.core.data.map.entity.V2XMessageEntity
import com.mogo.eagle.core.data.map.entity.V2XRoadEventEntity
import com.mogo.eagle.core.data.traffic.*
import com.mogo.eagle.core.function.api.hmi.warning.*
import com.mogo.eagle.core.function.api.map.listener.*
@@ -34,7 +45,6 @@ import com.mogo.eagle.core.function.v2x.events.receiver.*
import com.mogo.eagle.core.function.v2x.events.scenario.impl.*
import com.mogo.eagle.core.function.v2x.events.scenario.scene.airoad.*
import com.mogo.eagle.core.function.v2x.events.scenario.scene.airoad.AiRoadMarker.Marker
import com.mogo.eagle.core.function.v2x.events.scenario.scene.road.*
import com.mogo.eagle.core.function.v2x.events.utils.*
import com.mogo.eagle.core.function.v2x.events.utils.MapUtils
import com.mogo.eagle.core.function.v2x.events.voice.*
@@ -45,16 +55,9 @@ import com.mogo.eagle.core.utilcode.mogo.storage.*
import com.mogo.eagle.core.utilcode.util.*
import com.mogo.eagle.core.utilcode.util.TimeUtils
import com.mogo.eagle.core.utilcode.util.Utils
import com.mogo.map.MogoMarkerManager
import com.mogo.map.listener.*
import com.mogo.map.marker.*
import com.mogo.module.common.*
import com.mogo.module.common.drawer.*
import com.mogo.module.common.entity.*
import com.mogo.module.common.entity.V2XMessageEntity.V2XTypeEnum
import com.mogo.module.common.enums.*
import com.mogo.service.statusmanager.*
import com.mogo.service.statusmanager.StatusDescriptor.ACC_STATUS
import com.mogo.service.statusmanager.StatusDescriptor.SEEK_HELPING
import com.mogo.v2x.*
import com.mogo.v2x.callback.*
import com.mogo.v2x.config.*
@@ -127,7 +130,7 @@ object V2XEventManager : IMoGoMapLocationListener, IMoGoTokenCallback, IV2XCallb
BridgeApi.registerCenter()?.let {
it.registerMogoMapListener(MODULE_NAME, this)
it.registerMogoMarkerClickListener(
ModuleNames.CARD_TYPE_ROAD_CONDITION,
CARD_TYPE_ROAD_CONDITION,
object : IMogoMarkerClickListener {
override fun onMarkerClicked(marker: IMogoMarker?): Boolean {
handleRoadConditionMarkerClick(marker)
@@ -135,10 +138,9 @@ object V2XEventManager : IMoGoMapLocationListener, IMoGoTokenCallback, IV2XCallb
}
})
}
BridgeApi.statusManager()?.let {
it.registerStatusChangedListener(MODULE_NAME, ACC_STATUS, this)
it.registerStatusChangedListener(MODULE_NAME, SEEK_HELPING, this)
}
MogoStatusManager.getInstance().registerStatusChangedListener(MODULE_NAME, StatusDescriptor.ACC_STATUS, this)
MogoStatusManager.getInstance().registerStatusChangedListener(MODULE_NAME, StatusDescriptor.SEEK_HELPING, this)
}
private fun unRegisterListener() {
@@ -146,12 +148,11 @@ object V2XEventManager : IMoGoMapLocationListener, IMoGoTokenCallback, IV2XCallb
CallerMapLocationListenerManager.removeListener(TAG, false)
BridgeApi.registerCenter()?.let {
it.unregisterMogoMapListener(MODULE_NAME)
it.unregisterMogoMarkerClickListener(ModuleNames.CARD_TYPE_ROAD_CONDITION)
}
BridgeApi.statusManager()?.let {
it.unregisterStatusChangedListener(MODULE_NAME, ACC_STATUS, this)
it.unregisterStatusChangedListener(MODULE_NAME, SEEK_HELPING, this)
it.unregisterMogoMarkerClickListener(CARD_TYPE_ROAD_CONDITION)
}
MogoStatusManager.getInstance().unregisterStatusChangedListener(MODULE_NAME, StatusDescriptor.ACC_STATUS, this)
MogoStatusManager.getInstance().unregisterStatusChangedListener(MODULE_NAME, StatusDescriptor.SEEK_HELPING, this)
}
private fun initData() {
@@ -201,7 +202,7 @@ object V2XEventManager : IMoGoMapLocationListener, IMoGoTokenCallback, IV2XCallb
val v2XMessageEntity: V2XMessageEntity<V2XRoadEventEntity> =
V2XMessageEntity<V2XRoadEventEntity>()
v2XMessageEntity.type = V2XTypeEnum.ALERT_ROAD_WARNING
v2XMessageEntity.type = V2XMessageEntity.V2XTypeEnum.ALERT_ROAD_WARNING
v2XMessageEntity.isShowState = true
v2XMessageEntity.isOnlyShow = true
v2XMessageEntity.isNeedAddLine = false
@@ -242,20 +243,18 @@ object V2XEventManager : IMoGoMapLocationListener, IMoGoTokenCallback, IV2XCallb
CallerLogger.d("$M_V2X$TAG", "状态发生改变\ndescriptor:$descriptor\nisTrue:$isTrue") // 记录状态更改
// 记录状态更改
SharedPrefsMgr.getInstance(Utils.getApp()).putBoolean("descriptor_$descriptor", isTrue)
if (descriptor == ACC_STATUS) {
if (descriptor == StatusDescriptor.ACC_STATUS) {
if (isTrue) { // 刷新配置文件
refreshStrategyConfig()
// 记录开机时间
FatigueDrivingUtils.refreshAccOnTime()
initCarForHelpStatus()
BridgeApi.statusManager()?.let {
V2XManager.forceRefresh()
}
V2XManager.forceRefresh()
} else { // 记录关机时间
SharedPrefsMgr.getInstance(Utils.getApp())
.putString(V2X_ACC_OFF_TIME_STR, TimeUtils.getNowString())
}
} else if (descriptor == SEEK_HELPING) {
} else if (descriptor == StatusDescriptor.SEEK_HELPING) {
refreshMeSeekHelp(isTrue)
}
}
@@ -267,7 +266,7 @@ object V2XEventManager : IMoGoMapLocationListener, IMoGoTokenCallback, IV2XCallb
*/
private fun refreshMeSeekHelp(isTrue: Boolean) {
val entity = V2XMessageEntity<Boolean>()
entity.type = V2XTypeEnum.ALERT_CAR_FOR_HELP
entity.type = V2XMessageEntity.V2XTypeEnum.ALERT_CAR_FOR_HELP
entity.content = isTrue
V2XScenarioManager.getInstance().handlerMessage(entity)
}
@@ -286,10 +285,10 @@ object V2XEventManager : IMoGoMapLocationListener, IMoGoTokenCallback, IV2XCallb
val vehicleType: Int = resultBean.vehicleType //故障车
if (vehicleType == 4) {
refreshMeSeekHelp(true)
BridgeApi.statusManager()?.setSeekHelping(MODULE_NAME, true)
MogoStatusManager.getInstance().setSeekHelping(MODULE_NAME, true)
} else {
refreshMeSeekHelp(false)
BridgeApi.statusManager()?.setSeekHelping(MODULE_NAME, false)
MogoStatusManager.getInstance().setSeekHelping(MODULE_NAME, false)
}
}
}
@@ -360,7 +359,7 @@ object V2XEventManager : IMoGoMapLocationListener, IMoGoTokenCallback, IV2XCallb
Logger.d(TAG, "--- trigger show ---:poiType:" + v2XRoadEventEntity.poiType)
TrackUtils.trackV2xRoadProduceEvent(1)
val v2XMessageEntity = V2XMessageEntity<V2XRoadEventEntity>()
v2XMessageEntity.type = V2XTypeEnum.ALERT_ROAD_WARNING
v2XMessageEntity.type = V2XMessageEntity.V2XTypeEnum.ALERT_ROAD_WARNING
v2XMessageEntity.content = v2XRoadEventEntity
v2XMessageEntity.isShowState = true
V2XScenarioManager.getInstance().handlerMessage(v2XMessageEntity)
@@ -470,7 +469,7 @@ object V2XEventManager : IMoGoMapLocationListener, IMoGoTokenCallback, IV2XCallb
private fun handleWarningTargetEvent(data: V2XWarningTarget) {
val v2xMessageEntity = V2XMessageEntity<V2XWarningTarget>()
v2xMessageEntity.type = V2XTypeEnum.ALERT_THE_FRONT_WEAKNESS
v2xMessageEntity.type = V2XMessageEntity.V2XTypeEnum.ALERT_THE_FRONT_WEAKNESS
// 设置数据
v2xMessageEntity.content = data
val intent = Intent(BROADCAST_SCENE_HANDLER_ACTION)
@@ -491,7 +490,7 @@ object V2XEventManager : IMoGoMapLocationListener, IMoGoTokenCallback, IV2XCallb
private fun handleOptimalRouteEvent(event: V2XEvent.OptimalRoute) {
val v2xMessageEntity: V2XMessageEntity<V2XOptimalRoute> =
V2XMessageEntity<V2XOptimalRoute>() // 控制类型
v2xMessageEntity.type = V2XTypeEnum.ALERT_PUSH_VR_SHOW // 设置数据
v2xMessageEntity.type = V2XMessageEntity.V2XTypeEnum.ALERT_PUSH_VR_SHOW // 设置数据
v2xMessageEntity.content = event.data // 控制展示状态
v2xMessageEntity.isShowState = true
val intent = Intent(BROADCAST_SCENE_HANDLER_ACTION)
@@ -595,14 +594,14 @@ object V2XEventManager : IMoGoMapLocationListener, IMoGoTokenCallback, IV2XCallb
true,
5000L
)
TrafficMarkerDrawer.updateITrafficInfo(trafficData)
CallerMapUIServiceManager.getMarkerService()?.updateITrafficInfo(trafficData)
}
2 -> {
TrafficMarkerDrawer.updateITrafficInfo(trafficData)
CallerMapUIServiceManager.getMarkerService()?.updateITrafficInfo(trafficData)
}
3 -> {
trafficData.uuid?.let {
TrafficMarkerDrawer.removeCvxRvInfoIndInfo(it)
CallerMapUIServiceManager.getMarkerService()?.removeCvxRvInfoIndInfo(it)
}
}
}

View File

@@ -1,10 +1,10 @@
package com.mogo.eagle.core.function.v2x.events.alarm;
import com.mogo.eagle.core.data.map.MogoLocation;
import com.mogo.eagle.core.data.map.entity.MarkerLocation;
import com.mogo.eagle.core.data.map.entity.V2XRoadEventEntity;
import com.mogo.eagle.core.function.v2x.events.utils.DrivingDirectionUtils;
import com.mogo.module.common.entity.MarkerLocation;
import com.mogo.module.common.entity.V2XRoadEventEntity;
import com.mogo.module.common.enums.EventTypeEnum;
import com.mogo.eagle.core.data.enums.EventTypeEnum;
import java.util.Iterator;
import java.util.concurrent.CopyOnWriteArrayList;
import io.netty.util.internal.ConcurrentSet;

View File

@@ -8,7 +8,6 @@ import com.mogo.eagle.core.function.v2x.events.manager.*
import com.mogo.eagle.core.function.v2x.events.network.V2XRefreshModel
import com.mogo.eagle.core.utilcode.util.Utils
import com.mogo.module.common.MogoApisHandler
import com.mogo.service.statusmanager.IMogoStatusManager
import java.lang.ref.WeakReference
import java.util.concurrent.atomic.AtomicReference
@@ -60,10 +59,6 @@ internal object BridgeApi {
fun context(): Context = this.context.get()?.get() ?: Utils.getApp()
fun statusManager(): IMogoStatusManager? = apis?.statusManagerApi
fun analytics() = apis?.analyticsApi
fun v2xMarker() = v2xMarker
fun v2xPolyline() = v2xPolyline
@@ -80,12 +75,4 @@ internal object BridgeApi {
fun registerCenter() = apis?.registerCenterApi
fun imageLoader() = apis?.imageLoaderApi
fun windowManager() = apis?.windowManagerApi
fun displayEffects() = apis?.displayEffectsManager
fun intentManager() = apis?.intentManagerApi
}

View File

@@ -6,8 +6,8 @@ import android.text.TextUtils;
import com.google.gson.annotations.Expose;
import com.google.gson.annotations.SerializedName;
import com.mogo.eagle.core.data.BaseData;
import com.mogo.module.common.entity.MarkerLocation;
import com.mogo.module.common.entity.MarkerOnlineCar;
import com.mogo.eagle.core.data.map.entity.MarkerLocation;
import com.mogo.eagle.core.data.map.entity.MarkerOnlineCar;
import java.io.Serializable;
import java.util.ArrayList;

View File

@@ -2,7 +2,7 @@ package com.mogo.eagle.core.function.v2x.events.entity.net;
import com.google.gson.annotations.Expose;
import com.mogo.eagle.core.data.BaseData;
import com.mogo.module.common.entity.V2XLiveCarInfoEntity;
import com.mogo.eagle.core.data.map.entity.V2XLiveCarInfoEntity;
import java.io.Serializable;
import java.util.List;

View File

@@ -1,7 +1,7 @@
package com.mogo.eagle.core.function.v2x.events.entity.panel;
import com.mogo.module.common.entity.MarkerExploreWay;
import com.mogo.module.common.enums.EventTypeEnum;
import com.mogo.eagle.core.data.map.entity.MarkerExploreWay;
import com.mogo.eagle.core.data.enums.EventTypeEnum;
import java.io.Serializable;
import java.util.ArrayList;

View File

@@ -1,7 +1,7 @@
package com.mogo.eagle.core.function.v2x.events.entity.panel;
import com.mogo.eagle.core.data.BaseData;
import com.mogo.module.common.entity.MarkerExploreWay;
import com.mogo.eagle.core.data.map.entity.MarkerExploreWay;
import java.util.List;

View File

@@ -3,18 +3,10 @@ package com.mogo.eagle.core.function.v2x.events.manager;
import android.content.Context;
import com.alibaba.android.arouter.facade.template.IProvider;
import com.mogo.eagle.core.function.v2x.events.entity.net.V2XSpecialCarRes;
import com.mogo.map.marker.IMogoMarker;
import com.mogo.eagle.core.data.map.entity.V2XRoadEventEntity;
import com.mogo.map.marker.IMogoMarkerClickListener;
import com.mogo.module.common.entity.MarkerCardResult;
import com.mogo.module.common.entity.MarkerExploreWay;
import com.mogo.module.common.entity.MarkerNoveltyInfo;
import com.mogo.module.common.entity.MarkerOnlineCar;
import com.mogo.module.common.entity.MarkerShowEntity;
import com.mogo.module.common.entity.V2XRoadEventEntity;
import com.mogo.v2x.data.V2XMarkerCardResult;
import java.util.List;
import java.util.concurrent.CopyOnWriteArrayList;
/**
@@ -43,23 +35,6 @@ public interface IMoGoV2XMarkerManager extends IProvider {
*/
void analysisV2XRoadEvent(V2XMarkerCardResult markerCardResult);
/**
* 展开气泡
*
* @param context
* @param currentMarker
*/
IMogoMarker openMarker(Context context, IMogoMarker currentMarker);
/**
* 关闭气泡
*
* @param context
* @param currentMarker
*/
void closeMarker(Context context, IMogoMarker currentMarker);
/**
* 绘制正在预警的道路事件的POI点
*

View File

@@ -3,8 +3,8 @@ package com.mogo.eagle.core.function.v2x.events.manager;
import android.content.Context;
import com.alibaba.android.arouter.facade.template.IProvider;
import com.mogo.eagle.core.data.map.entity.V2XRoadEventEntity;
import com.mogo.map.overlay.IMogoPolyline;
import com.mogo.module.common.entity.V2XRoadEventEntity;
/**
* author : donghongyu

View File

@@ -2,7 +2,7 @@ package com.mogo.eagle.core.function.v2x.events.manager;
import com.mogo.eagle.core.data.map.MogoLatLng;
import com.mogo.eagle.core.data.map.MogoLocation;
import com.mogo.module.common.entity.V2XRoadEventEntity;
import com.mogo.eagle.core.data.map.entity.V2XRoadEventEntity;
/**
* author : donghongyu

View File

@@ -1,18 +1,24 @@
package com.mogo.eagle.core.function.v2x.events.manager.impl;
import static com.mogo.commons.module.ServiceConst.CARD_TYPE_NOVELTY;
import static com.mogo.eagle.core.function.v2x.events.consts.V2XConst.V2X_EVENT_ALARM_POI;
import static com.mogo.eagle.core.utilcode.mogo.logger.scene.SceneConstant.M_V2X;
import android.content.Context;
import android.graphics.Bitmap;
import com.alibaba.android.arouter.facade.annotation.Route;
import com.mogo.cloud.commons.utils.CoordinateUtils;
import com.mogo.commons.AbsMogoApplication;
import com.mogo.commons.module.status.MogoStatusManager;
import com.mogo.eagle.core.data.map.MogoLatLng;
import com.mogo.eagle.core.data.map.MogoLocation;
import com.mogo.eagle.core.data.map.entity.MarkerExploreWay;
import com.mogo.eagle.core.data.map.entity.MarkerLocation;
import com.mogo.eagle.core.data.map.entity.MarkerShowEntity;
import com.mogo.eagle.core.data.map.entity.V2XRoadEventEntity;
import com.mogo.eagle.core.function.call.map.CallerMapUIServiceManager;
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.manager.IMoGoV2XMarkerManager;
import com.mogo.eagle.core.function.v2x.events.manager.IMoGoV2XPolylineManager;
import com.mogo.eagle.core.function.v2x.events.manager.IMoGoV2XStatusManager;
@@ -21,30 +27,19 @@ 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.CallerLogger;
import com.mogo.eagle.core.utilcode.util.ViewUtils;
import com.mogo.map.MogoMarkerManager;
import com.mogo.map.marker.IMogoMarker;
import com.mogo.map.marker.IMogoMarkerClickListener;
import com.mogo.map.marker.IMogoMarkerManager;
import com.mogo.map.marker.MogoMarkerOptions;
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.entity.MarkerExploreWay;
import com.mogo.module.common.entity.MarkerLocation;
import com.mogo.module.common.entity.MarkerShowEntity;
import com.mogo.module.common.entity.V2XRoadEventEntity;
import com.mogo.module.common.enums.EventTypeEnum;
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.data.enums.EventTypeEnum;
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.List;
import java.util.Objects;
import java.util.concurrent.CopyOnWriteArrayList;
import java.util.concurrent.CopyOnWriteArraySet;
@@ -86,10 +81,8 @@ public class MoGoV2XMarkerManager implements IMoGoV2XMarkerManager {
// 事件位置
MarkerLocation location = v2XRoadEventEntity.getLocation();
if (location != null) {
float calculateDistance = Utils.calculateLineDistance(
new MogoLatLng(location.getLat(), location.getLon()),
new MogoLatLng(currentLocation.getLatitude(), currentLocation.getLongitude())
);
float calculateDistance = CoordinateUtils.calculateLineDistance(location.getLat(), location.getLon(),
currentLocation.getLatitude(), currentLocation.getLongitude());
v2XRoadEventEntity.setDistance(calculateDistance);
}
roadEventEntities.add(v2XRoadEventEntity);
@@ -127,7 +120,7 @@ public class MoGoV2XMarkerManager implements IMoGoV2XMarkerManager {
// 探路目前只有上报拥堵
String poi = markerExploreWay.getPoiType();
v2XRoadEventEntity.setPoiType(poi);
v2XRoadEventEntity.setNoveltyInfo(EntityUtilsKt.toMarkExploreWay(markerExploreWay,markerCardResult.getExtras()));
v2XRoadEventEntity.setNoveltyInfo(EntityUtilsKt.toMarkExploreWay(markerExploreWay, markerCardResult.getExtras()));
v2XRoadEventEntity.setExpireTime(20000);
mV2XRoadEventEntityArrayList.add(v2XRoadEventEntity);
}
@@ -139,67 +132,6 @@ public class MoGoV2XMarkerManager implements IMoGoV2XMarkerManager {
}
}
@Override
public IMogoMarker openMarker(Context context, IMogoMarker currentMarker) {
try {
if (currentMarker != null) {
Object object = currentMarker.getObject();
if (object != null) {
// 修改数据
MarkerShowEntity showEntity = (MarkerShowEntity) object;
showEntity.setChecked(true);
// 获取数据对应的View
IMarkerView markerView = MapMarkerAdapter.getMarkerView(context,
showEntity,
currentMarker.getMogoMarkerOptions());
Bitmap bitmap;
if (showEntity.getMarkerType().equals(ServiceConst.CARD_TYPE_USER_DATA)
|| showEntity.getMarkerType().equals(V2XConst.V2X_MARKER_SPECIAL_CAR)) {
bitmap = V2XMarkerAdapter.getV2XCarMarkerView(context, showEntity);
} else {
bitmap = ViewUtils.fromView(markerView.getView());
}
currentMarker.setIcon(bitmap);
currentMarker.setToTop();
}
}
} catch (Exception e) {
e.printStackTrace();
}
return currentMarker;
}
@Override
public void closeMarker(Context context, IMogoMarker currentMarker) {
try {
if (currentMarker != null) {
Object object = currentMarker.getObject();
if (object != null) {
MarkerShowEntity showEntity = (MarkerShowEntity) object;
showEntity.setChecked(false);
IMarkerView markerView = MapMarkerAdapter.getMarkerView(context,
showEntity,
currentMarker.getMogoMarkerOptions());
Bitmap bitmap;
if (showEntity.getMarkerType().equals(ServiceConst.CARD_TYPE_USER_DATA)
|| showEntity.getMarkerType().equals(V2XConst.V2X_MARKER_SPECIAL_CAR)) {
bitmap = V2XMarkerAdapter.getV2XCarMarkerView(context, showEntity);
} else {
bitmap = ViewUtils.fromView(markerView.getView());
}
currentMarker.setIcon(bitmap);
}
}
} catch (Exception e) {
e.printStackTrace();
}
}
@Override
public void drawableAlarmPOI(Context context, V2XRoadEventEntity roadEventEntity, IMogoMarkerClickListener clickListener) {
try {
@@ -223,22 +155,13 @@ public class MoGoV2XMarkerManager implements IMoGoV2XMarkerManager {
markerShowEntity.setChecked(false);
markerShowEntity.setTextContent(markerExploreWay.getAddr());
markerShowEntity.setMarkerLocation(markerExploreWay.getLocation());
markerShowEntity.setMarkerType(ServiceConst.CARD_TYPE_NOVELTY);
markerShowEntity.setMarkerType(CARD_TYPE_NOVELTY);
// 由于性能问题D车机不使用事件扩散动画
if (!CarSeries.isF8xxSeries()) {
optionsRipple.icon(V2XMarkerAdapter.getV2XRoadEventViewPng(context, roadEventEntity));
} else {
optionsRipple.icons(V2XMarkerAdapter.getV2XRoadEventViewGif(context, roadEventEntity));
optionsRipple.period(1);
}
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, clickListener);
optionsRipple.icons(V2XMarkerAdapter.getV2XRoadEventViewGif(context, roadEventEntity));
optionsRipple.period(1);
if (MogoStatusManager.getInstance().isVrMode()) {
mAlarmInfoMarker = Objects.requireNonNull(CallerMapUIServiceManager.INSTANCE.getMarkerService()).drawMarker(markerShowEntity);
} else {
optionsRipple.icon(V2XMarkerAdapter.getV2XRoadEventViewPng(context, roadEventEntity));
IMogoMarkerManager marker = MogoMarkerManager.getInstance(context);

View File

@@ -3,23 +3,11 @@ package com.mogo.eagle.core.function.v2x.events.manager.impl;
import android.content.Context;
import com.alibaba.android.arouter.facade.annotation.Route;
import com.mogo.eagle.core.data.map.MogoLatLng;
import com.mogo.eagle.core.function.call.autopilot.CallerAutoPilotStatusListenerManager;
import com.mogo.eagle.core.function.v2x.events.bridge.BridgeApi;
import com.mogo.eagle.core.data.map.entity.V2XRoadEventEntity;
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.MogoOverlayManager;
import com.mogo.map.overlay.IMogoOverlayManager;
import com.mogo.map.overlay.IMogoPolyline;
import com.mogo.map.overlay.MogoPolylineOptions;
import com.mogo.module.common.entity.V2XRoadEventEntity;
import com.mogo.module.common.enums.EventTypeEnum;
import com.mogo.service.statusmanager.IMogoStatusManager;
import java.util.ArrayList;
import java.util.List;
/**
* author : donghongyu

View File

@@ -3,13 +3,12 @@ package com.mogo.eagle.core.function.v2x.events.manager.impl;
import android.content.Context;
import com.alibaba.android.arouter.facade.annotation.Route;
import com.mogo.eagle.core.function.v2x.events.bridge.BridgeApi;
import com.mogo.commons.module.status.MogoStatusManager;
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.manager.IMoGoV2XStatusChangedListener;
import com.mogo.eagle.core.function.v2x.events.manager.IMoGoV2XStatusManager;
import com.mogo.eagle.core.function.v2x.events.manager.V2XStatusDescriptor;
import com.mogo.service.statusmanager.IMogoStatusManager;
import java.util.List;
import java.util.Map;
@@ -54,10 +53,7 @@ public class MoGoV2XStatusManager implements IMoGoV2XStatusManager {
@Override
public void setRoadEventPOIShow(String tag, boolean show) {
IMogoStatusManager statusManager = BridgeApi.INSTANCE.statusManager();
if (statusManager != null) {
statusManager.setV2XUIShow(V2XConst.MODULE_NAME, show);
}
MogoStatusManager.getInstance().setV2XUIShow(V2XConst.MODULE_NAME, show);
mStatus.put(V2XStatusDescriptor.RoadEventPOI_UI, show);
invokeStatusChangedListener(V2XStatusDescriptor.RoadEventPOI_UI, show);
recordStatusModifier(tag, V2XStatusDescriptor.RoadEventPOI_UI);

View File

@@ -3,10 +3,9 @@ package com.mogo.eagle.core.function.v2x.events.marker;
import android.content.Context;
import android.graphics.Bitmap;
import com.mogo.eagle.core.data.map.entity.V2XRoadEventEntity;
import com.mogo.eagle.core.function.v2x.R;
import com.mogo.module.common.entity.MarkerShowEntity;
import com.mogo.module.common.entity.V2XRoadEventEntity;
import com.mogo.module.common.enums.EventTypeEnum;
import com.mogo.eagle.core.data.enums.EventTypeEnum;
import java.util.ArrayList;
@@ -27,7 +26,7 @@ public class V2XMarkerAdapter {
}
/**
* 返回道路事件静态的图,因为D车机性能不行,会卡顿
* 返回道路事件静态的图,因为车机性能不行,会卡顿
*/
public static Bitmap getV2XRoadEventViewPng(Context context, V2XRoadEventEntity alarmInfo) {
Bitmap bitmap;
@@ -156,17 +155,4 @@ public class V2XMarkerAdapter {
return icons;
}
/**
* 获取模拟点
*
* @param context 上下文
* @return MarkerView
*/
public static Bitmap getV2XCarMarkerView(Context context, MarkerShowEntity showEntity) {
if (showEntity.isChecked()) {
return new V2XMarkerCarInfoView(context, showEntity).getView();
} else {
return new V2XMarkerCarView(context, showEntity).getView();
}
}
}

View File

@@ -1,144 +0,0 @@
package com.mogo.eagle.core.function.v2x.events.marker
import android.content.Context
import android.graphics.Bitmap
import android.text.TextUtils
import android.view.LayoutInflater
import android.view.View
import androidx.constraintlayout.widget.ConstraintLayout
import com.mogo.eagle.core.function.v2x.R
import com.mogo.eagle.core.function.v2x.events.entity.net.V2XSpecialCarRes.V2XMarkerEntity
import com.mogo.eagle.core.utilcode.util.ViewUtils
import com.mogo.module.common.entity.MarkerOnlineCar
import com.mogo.module.common.entity.MarkerShowEntity
import kotlinx.android.synthetic.main.view_marker_car.view.*
import kotlinx.android.synthetic.main.view_marker_car_info.view.*
import kotlinx.android.synthetic.main.view_marker_car_info.view.ivCar
/**
* author : donghongyu
* e-mail : 1358506549@qq.com
* date : 2020-01-0619:55
* desc : 绘制在线车辆,特殊车辆
* version: 1.0
*/
class V2XMarkerCarInfoView(context: Context, showEntity: MarkerShowEntity) :
ConstraintLayout(context) {
init {
initView(context, showEntity)
}
private fun initView(context: Context, showEntity: MarkerShowEntity) {
val bindObj: Any = showEntity.bindObj
if (bindObj is MarkerOnlineCar) {
//1 老司机 2 安全驾驶 3 危险驾驶 4 可直播车辆
when (bindObj.userInfo.safeLabelType) {
// 可直播车机
4 -> {
LayoutInflater.from(context)
.inflate(R.layout.view_marker_car, this)
ivMarkerTip.setImageResource(R.drawable.v_to_x_marker_car_live_vedio)
}
else -> {
LayoutInflater.from(context)
.inflate(R.layout.view_marker_car_info, this)
}
}
}
if (bindObj is V2XMarkerEntity) {
LayoutInflater.from(context)
.inflate(R.layout.view_marker_car, this)
}
updateUI(showEntity)
}
fun updateUI(showEntity: MarkerShowEntity) {
ivCar.rotation = showEntity.markerLocation.angle.toFloat()
// ivCar.rotation = 90f
tvUserMarker.text = if (TextUtils.isEmpty(showEntity.textContent)) {
""
} else {
showEntity.textContent
}
val bindObj: Any = showEntity.bindObj
if (bindObj is MarkerOnlineCar) {
tvMarkerContent.text =
if (bindObj.userInfo == null && TextUtils.isEmpty(bindObj.userInfo.userName)) {
"蘑菇车主"
} else {
bindObj.userInfo.userName
}
//车辆类型,0-普通车辆1-警车2-救护车3-道路救援车辆',
when (bindObj.carInfo.vehicleType) {
// 普通车
0 -> {
clMarkerContent.visibility = View.VISIBLE
ivReverseTriangle.visibility = View.VISIBLE
ivCar.setImageResource(R.drawable.icon_car_gray)
}
// 警车
1 -> {
clMarkerContent.visibility = View.GONE
ivReverseTriangle.visibility = View.GONE
ivCar.setImageResource(R.drawable.icon_car_police)
}
// 救护车
2 -> {
clMarkerContent.visibility = View.GONE
ivReverseTriangle.visibility = View.GONE
ivCar.setImageResource(R.drawable.icon_car_ambulance)
}
// 道路救援车辆
3 -> {
clMarkerContent.visibility = View.GONE
ivReverseTriangle.visibility = View.GONE
ivCar.setImageResource(R.drawable.v_to_x_warning_car_red)
}
else -> {
clMarkerContent.visibility = View.GONE
ivReverseTriangle.visibility = View.GONE
ivCar.setImageResource(R.drawable.icon_car_gray)
}
}
}
if (bindObj is V2XMarkerEntity) {
when (bindObj.targetId) {
10001 -> {
clMarkerContent.visibility = View.GONE
ivReverseTriangle.visibility = View.GONE
ivCar.setImageResource(R.drawable.icon_car_gray)
}
10002 -> {
clMarkerContent.visibility = View.GONE
ivReverseTriangle.visibility = View.GONE
ivCar.setImageResource(R.drawable.icon_car_ambulance)
}
10003 -> {
clMarkerContent.visibility = View.GONE
ivReverseTriangle.visibility = View.GONE
ivCar.setImageResource(R.drawable.icon_car_police)
}
//失控车
10004 -> {
clMarkerContent.visibility = View.GONE
ivReverseTriangle.visibility = View.GONE
ivCar.setImageResource(R.drawable.v_to_x_warning_car_red)
}
// 故障车
20007 -> {
clMarkerContent.visibility = View.GONE
ivReverseTriangle.visibility = View.GONE
ivCar.setImageResource(R.drawable.v_to_x_warning_car_red)
}
}
}
}
fun getView(): Bitmap {
return ViewUtils.fromView(this)
}
}

View File

@@ -1,114 +0,0 @@
package com.mogo.eagle.core.function.v2x.events.marker
import android.content.Context
import android.graphics.Bitmap
import android.view.LayoutInflater
import android.view.View
import androidx.constraintlayout.widget.ConstraintLayout
import com.mogo.eagle.core.function.v2x.R
import com.mogo.eagle.core.function.v2x.events.entity.net.V2XSpecialCarRes.V2XMarkerEntity
import com.mogo.eagle.core.utilcode.util.ViewUtils
import com.mogo.module.common.entity.MarkerOnlineCar
import com.mogo.module.common.entity.MarkerShowEntity
import kotlinx.android.synthetic.main.view_marker_car.view.*
/**
* author : donghongyu
* e-mail : 1358506549@qq.com
* date : 2020-01-0619:55
* desc : 绘制在线车辆,特殊车辆
* version: 1.0
*/
class V2XMarkerCarView(context: Context, showEntity: MarkerShowEntity) :
ConstraintLayout(context) {
init {
initView(context, showEntity)
}
private fun initView(context: Context, showEntity: MarkerShowEntity) {
LayoutInflater.from(context)
.inflate(R.layout.view_marker_car, this)
updateUI(showEntity)
}
fun updateUI(showEntity: MarkerShowEntity) {
ivCar.rotation = showEntity.markerLocation.angle.toFloat()
val bindObj: Any = showEntity.bindObj
if (bindObj is MarkerOnlineCar) {
//1 老司机 2 安全驾驶 3 危险驾驶 4 可直播车辆
when (bindObj.userInfo.safeLabelType) {
1 -> {
ivMarkerTip.setImageResource(R.drawable.v_to_x_marker_car_blue)
}
2 -> {
ivMarkerTip.setImageResource(R.drawable.v_to_x_marker_car_green)
}
3 -> {
ivMarkerTip.setImageResource(R.drawable.v_to_x_marker_car_red)
}
4 -> {
ivMarkerTip.setImageResource(R.drawable.v_to_x_marker_car_live_vedio)
}
}
//车辆类型,0-普通车辆1-警车2-救护车3-道路救援车辆',
when (bindObj.carInfo.vehicleType) {
// 普通车
0 -> {
ivMarkerTip.visibility = View.VISIBLE
ivCar.setImageResource(R.drawable.icon_car_gray)
}
// 警车
1 -> {
ivMarkerTip.visibility = View.GONE
ivCar.setImageResource(R.drawable.icon_car_police)
}
// 救护车
2 -> {
ivMarkerTip.visibility = View.GONE
ivCar.setImageResource(R.drawable.icon_car_ambulance)
}
// 道路救援车辆
3 -> {
ivMarkerTip.visibility = View.GONE
ivCar.setImageResource(R.drawable.v_to_x_warning_car_red)
}
else -> {
ivMarkerTip.visibility = View.GONE
ivCar.setImageResource(R.drawable.icon_car_gray)
}
}
}
if (bindObj is V2XMarkerEntity) {
when (bindObj.targetId) {
10001 -> {
ivMarkerTip.visibility = View.GONE
ivCar.setImageResource(R.drawable.icon_car_gray)
}
10002 -> {
ivMarkerTip.visibility = View.GONE
ivCar.setImageResource(R.drawable.icon_car_ambulance)
}
10003 -> {
ivMarkerTip.visibility = View.GONE
ivCar.setImageResource(R.drawable.icon_car_police)
}
10004 -> {
ivMarkerTip.visibility = View.GONE
ivCar.setImageResource(R.drawable.v_to_x_warning_car_red)
}
// 故障车
20007 -> {
ivMarkerTip.visibility = View.GONE
ivCar.setImageResource(R.drawable.v_to_x_warning_car_red)
}
}
}
}
fun getView(): Bitmap {
return ViewUtils.fromView(this)
}
}

View File

@@ -5,10 +5,10 @@ import android.content.Context
import android.graphics.Bitmap
import android.view.LayoutInflater
import androidx.constraintlayout.widget.ConstraintLayout
import com.mogo.eagle.core.data.map.entity.V2XRoadEventEntity
import com.mogo.eagle.core.function.v2x.R
import com.mogo.eagle.core.utilcode.util.ViewUtils
import com.mogo.module.common.entity.V2XRoadEventEntity
import com.mogo.module.common.enums.EventTypeEnum
import com.mogo.eagle.core.data.enums.EventTypeEnum
import kotlinx.android.synthetic.main.view_marker_event_car.view.*
/**

View File

@@ -1,7 +1,7 @@
package com.mogo.eagle.core.function.v2x.events.network;
import com.mogo.eagle.core.network.MoGoRetrofitFactory;
import com.mogo.module.common.constants.HostConst;
import com.mogo.eagle.core.data.constants.HostConst;
/**
* 应对不同接口对应不同服务域名的工厂累

View File

@@ -3,9 +3,9 @@ package com.mogo.eagle.core.function.v2x.events.receiver
import android.content.BroadcastReceiver
import android.content.Context
import android.content.Intent
import com.mogo.eagle.core.data.map.entity.V2XMessageEntity
import com.mogo.eagle.core.function.v2x.events.consts.V2XConst
import com.mogo.eagle.core.function.v2x.events.scenario.impl.V2XScenarioManager
import com.mogo.module.common.entity.V2XMessageEntity
import java.lang.Exception
class SceneBroadcastReceiver: BroadcastReceiver() {

View File

@@ -6,20 +6,19 @@ import android.content.Intent;
import androidx.localbroadcastmanager.content.LocalBroadcastManager;
import com.mogo.commons.module.status.MogoStatusManager;
import com.mogo.eagle.core.data.map.MogoLatLng;
import com.mogo.eagle.core.data.map.entity.MarkerExploreWay;
import com.mogo.eagle.core.data.map.entity.V2XMessageEntity;
import com.mogo.eagle.core.data.map.entity.V2XRoadEventEntity;
import com.mogo.eagle.core.function.call.chat.CallerChatManager;
import com.mogo.eagle.core.function.call.map.CallerSmpManager;
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.entity.net.V2XOptimalRouteDataRes;
import com.mogo.eagle.core.function.v2x.events.entity.net.V2XSpecialCarRes;
import com.mogo.eagle.core.function.v2x.events.utils.TestOnLineCarUtils;
import com.mogo.eagle.core.function.v2x.events.utils.V2XSQLiteUtils;
import com.mogo.eagle.core.utilcode.util.Utils;
import com.mogo.module.common.entity.MarkerExploreWay;
import com.mogo.module.common.entity.V2XMessageEntity;
import com.mogo.module.common.entity.V2XRoadEventEntity;
import com.mogo.service.statusmanager.IMogoStatusManager;
import java.util.List;
@@ -66,7 +65,8 @@ public class TestPanelBroadcastReceiver extends BroadcastReceiver {
// 存储本地,出行动态作展示
saveLocalStory(V2XMessageEntity.V2XTypeEnum.ALERT_ROAD_WARNING,
v2XMessageEntity.getContent().getNoveltyInfo());
} if (sceneType == 2) {// 触发AI道路施工事件
}
if (sceneType == 2) {// 触发AI道路施工事件
V2XMessageEntity<V2XRoadEventEntity> v2XMessageEntity =
TestOnLineCarUtils.getV2XScenarioAIRoadEventData();
Intent intent = new Intent(V2XConst.BROADCAST_SCENE_HANDLER_ACTION);
@@ -129,10 +129,7 @@ public class TestPanelBroadcastReceiver extends BroadcastReceiver {
Intent intent = new Intent(V2XConst.BROADCAST_SCENE_HANDLER_ACTION);
intent.putExtra(V2XConst.BROADCAST_SCENE_EXTRA_KEY, v2XMessageEntity);
LocalBroadcastManager.getInstance(mContext).sendBroadcast(intent);
IMogoStatusManager statusManager = BridgeApi.INSTANCE.statusManager();
if (statusManager != null) {
statusManager.setSeekHelping(V2XConst.MODULE_NAME, true);
}
MogoStatusManager.getInstance().setSeekHelping(V2XConst.MODULE_NAME, true);
} else if (sceneType == 20) {// 小地图绘制线
List<MogoLatLng> coordinates = TestOnLineCarUtils.getTestCoordinates();
CallerSmpManager.drawablePolyline(coordinates);

View File

@@ -1,6 +1,6 @@
package com.mogo.eagle.core.function.v2x.events.scenario;
import com.mogo.module.common.entity.V2XMessageEntity;
import com.mogo.eagle.core.data.map.entity.V2XMessageEntity;
/**
* author : donghongyu

View File

@@ -1,6 +1,7 @@
package com.mogo.eagle.core.function.v2x.events.scenario;
import com.mogo.module.common.entity.V2XMessageEntity;
import com.mogo.eagle.core.data.map.entity.V2XMessageEntity;
/**
* author : donghongyu

View File

@@ -2,9 +2,10 @@ package com.mogo.eagle.core.function.v2x.events.scenario.impl;
import androidx.annotation.Nullable;
import com.mogo.eagle.core.data.map.entity.V2XMessageEntity;
import com.mogo.eagle.core.function.v2x.events.scenario.IV2XScenario;
import com.mogo.eagle.core.function.v2x.events.scenario.view.IV2XMarker;
import com.mogo.module.common.entity.V2XMessageEntity;
/**
* author : donghongyu

View File

@@ -6,22 +6,19 @@ import android.content.Intent;
import androidx.localbroadcastmanager.content.LocalBroadcastManager;
import com.mogo.eagle.core.function.v2x.events.scenario.scene.airoad.AiRoadMarker;
import com.mogo.eagle.core.utilcode.mogo.logger.CallerLogger;
import com.mogo.eagle.core.function.v2x.events.bridge.BridgeApi;
import com.mogo.commons.module.status.MogoStatusManager;
import com.mogo.eagle.core.data.map.entity.V2XMessageEntity;
import com.mogo.eagle.core.function.v2x.events.consts.V2XConst;
import com.mogo.eagle.core.function.v2x.events.scenario.IV2XScenarioManager;
import com.mogo.eagle.core.function.v2x.events.scenario.scene.road.V2XRoadEventScenario;
import com.mogo.eagle.core.function.v2x.events.scenario.scene.route.V2XOptimalRouteVREventScenario;
import com.mogo.eagle.core.function.v2x.events.scenario.scene.warning.V2XFrontWarningScenario;
import com.mogo.eagle.core.utilcode.mogo.toast.TipToast;
import com.mogo.eagle.core.utilcode.mogo.logger.CallerLogger;
import com.mogo.eagle.core.utilcode.util.ThreadUtils;
import com.mogo.eagle.core.utilcode.util.Utils;
import com.mogo.map.MogoMapUIController;
import com.mogo.map.uicontroller.IMogoMapUIController;
import com.mogo.map.uicontroller.VisualAngleMode;
import com.mogo.module.common.entity.V2XMessageEntity;
import com.mogo.service.statusmanager.IMogoStatusManager;
/**
* author : donghongyu
@@ -74,12 +71,7 @@ public class V2XScenarioManager implements IV2XScenarioManager {
break;
case V2XMessageEntity.V2XTypeEnum.ALERT_THE_FRONT_WEAKNESS:
sceneChange();
boolean isVrMode1 = false;
IMogoStatusManager statusManager1 = BridgeApi.INSTANCE.statusManager();
if (statusManager1 != null) {
isVrMode1 = statusManager1.isVrMode();
}
if (isVrMode1) {
if (MogoStatusManager.getInstance().isVrMode()) {
mV2XScenario = new V2XFrontWarningScenario();
} else {
mV2XScenario = null;

View File

@@ -10,8 +10,10 @@ import androidx.lifecycle.*
import androidx.lifecycle.Lifecycle.Event
import androidx.lifecycle.Lifecycle.Event.ON_CREATE
import androidx.lifecycle.Lifecycle.Event.ON_DESTROY
import com.mogo.commons.utils.DrivingDirectionUtils
import com.mogo.eagle.core.data.map.*
import com.mogo.eagle.core.data.map.MapRoadInfo.StopLine
import com.mogo.eagle.core.data.map.entity.V2XRoadEventEntity
import com.mogo.eagle.core.function.api.map.listener.*
import com.mogo.eagle.core.function.api.v2x.*
import com.mogo.eagle.core.function.call.map.*
@@ -23,8 +25,6 @@ import com.mogo.eagle.core.utilcode.kotlin.*
import com.mogo.eagle.core.utilcode.mogo.logger.*
import com.mogo.map.*
import com.mogo.map.overlay.*
import com.mogo.module.common.entity.*
import com.mogo.module.common.utils.*
import io.netty.util.internal.*
import java.lang.Runnable
import java.util.*

View File

@@ -3,15 +3,15 @@ package com.mogo.eagle.core.function.v2x.events.scenario.scene.road
import android.graphics.*
import android.util.*
import com.mogo.cloud.commons.utils.*
import com.mogo.commons.utils.DrivingDirectionUtils
import com.mogo.eagle.core.data.map.*
import com.mogo.eagle.core.data.map.entity.V2XRoadEventEntity
import com.mogo.eagle.core.function.v2x.events.bridge.BridgeApi.context
import com.mogo.eagle.core.function.v2x.events.bridge.BridgeApi.v2xMarker
import com.mogo.map.*
import com.mogo.map.R.raw
import com.mogo.map.marker.*
import com.mogo.map.overlay.*
import com.mogo.module.common.entity.*
import com.mogo.module.common.utils.*
import java.util.*
import java.util.concurrent.atomic.*
import kotlin.Pair

View File

@@ -2,16 +2,15 @@ package com.mogo.eagle.core.function.v2x.events.scenario.scene.road;
import androidx.core.util.Pair;
import com.mogo.cloud.commons.utils.CoordinateUtils;
import com.mogo.eagle.core.data.map.entity.MarkerExploreWay;
import com.mogo.eagle.core.data.map.entity.MarkerLocation;
import com.mogo.eagle.core.data.map.entity.V2XRoadEventEntity;
import com.mogo.eagle.core.function.v2x.events.bridge.BridgeApi;
import com.mogo.eagle.core.function.v2x.events.manager.IMoGoV2XMarkerManager;
import com.mogo.eagle.core.function.v2x.events.manager.IMoGoV2XPolylineManager;
import com.mogo.eagle.core.function.v2x.events.scenario.scene.airoad.AiRoadMarker;
import com.mogo.eagle.core.function.v2x.events.scenario.view.IV2XMarker;
import com.mogo.module.common.entity.MarkerExploreWay;
import com.mogo.module.common.entity.MarkerLocation;
import com.mogo.module.common.entity.V2XRoadEventEntity;
import com.mogo.module.common.enums.EventTypeEnum;
import com.mogo.eagle.core.data.enums.EventTypeEnum;
import java.util.ArrayList;
import java.util.List;

View File

@@ -2,23 +2,21 @@ package com.mogo.eagle.core.function.v2x.events.scenario.scene.road;
import static com.mogo.eagle.core.utilcode.mogo.logger.scene.SceneConstant.M_V2X;
import com.mogo.commons.analytics.AnalyticsUtils;
import com.mogo.eagle.core.data.enums.WarningDirectionEnum;
import com.mogo.eagle.core.data.map.entity.MarkerExploreWay;
import com.mogo.eagle.core.data.map.entity.V2XMessageEntity;
import com.mogo.eagle.core.data.map.entity.V2XRoadEventEntity;
import com.mogo.eagle.core.function.api.hmi.warning.IMoGoWarningStatusListener;
import com.mogo.eagle.core.function.call.hmi.CallerHmiManager;
import com.mogo.eagle.core.function.call.map.CallerVisualAngleManager;
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.manager.V2XStatusManager;
import com.mogo.eagle.core.function.v2x.events.scenario.impl.AbsV2XScenario;
import com.mogo.eagle.core.function.v2x.events.scenario.view.IV2XMarker;
import com.mogo.eagle.core.network.utils.GsonUtil;
import com.mogo.eagle.core.utilcode.mogo.logger.CallerLogger;
import com.mogo.module.common.entity.MarkerExploreWay;
import com.mogo.module.common.entity.V2XMessageEntity;
import com.mogo.module.common.entity.V2XRoadEventEntity;
import com.mogo.module.common.enums.EventTypeEnum;
import com.mogo.service.analytics.IMogoAnalytics;
import com.mogo.service.v2x.DisplayEffectsInterface;
import com.mogo.eagle.core.data.enums.EventTypeEnum;
import java.util.HashMap;
import java.util.Map;
@@ -70,29 +68,27 @@ public class V2XRoadEventScenario extends AbsV2XScenario<V2XRoadEventEntity> imp
boolean onlyShow = getV2XMessageEntity().isOnlyShow();
if (!onlyShow) {
// 设置TTS
getV2XMessageEntity().getContent().getTts(false);
getV2XMessageEntity().getContent().getTts();
}
showWindow();
IMogoAnalytics analytics = BridgeApi.INSTANCE.analytics();
if (analytics != null) {
String poiType = getV2XMessageEntity().getContent().getPoiType();
String lat = String.valueOf(getV2XMessageEntity().getContent().getLocation().getLat());
String lon = String.valueOf(getV2XMessageEntity().getContent().getLocation().getLon());
String infoId = getV2XMessageEntity().getContent().getNoveltyInfo().getInfoId();
String style = "1";
Map<String, Object> properties = new HashMap<>();
properties.put("dbid", infoId);
properties.put("type", poiType);
properties.put("lng", lon);
properties.put("lat", lat);
properties.put("style", style);
analytics.track(V2XConst.V2X_ROAD_SHOW, properties);
}
String poiType = getV2XMessageEntity().getContent().getPoiType();
String lat = String.valueOf(getV2XMessageEntity().getContent().getLocation().getLat());
String lon = String.valueOf(getV2XMessageEntity().getContent().getLocation().getLon());
String infoId = getV2XMessageEntity().getContent().getNoveltyInfo().getInfoId();
String style = "1";
Map<String, Object> properties = new HashMap<>();
properties.put("dbid", infoId);
properties.put("type", poiType);
properties.put("lng", lon);
properties.put("lat", lat);
properties.put("style", style);
AnalyticsUtils.track(V2XConst.V2X_ROAD_SHOW, properties);
}
} catch (Exception e) {
e.printStackTrace();
}
}
private void showWindow() {
V2XMessageEntity<V2XRoadEventEntity> entity = getV2XMessageEntity();
V2XRoadEventEntity content = entity != null ? entity.getContent() : null;
@@ -131,12 +127,11 @@ public class V2XRoadEventScenario extends AbsV2XScenario<V2XRoadEventEntity> imp
if (entity.isNeedAddLine()) {
drawPOI();
}
DisplayEffectsInterface wu = BridgeApi.INSTANCE.displayEffects();
V2XRoadEventEntity content = entity.getContent();
if (wu != null && content != null) {
if (content != null) {
MarkerExploreWay noveltyInfo = content.getNoveltyInfo();
if (noveltyInfo != null && EventTypeEnum.FOURS_FOG.getPoiType().equals(content.getNoveltyInfo().getPoiType())) {
wu.displayEffects(EventTypeEnum.FOURS_FOG.getPoiType());
CallerHmiManager.INSTANCE.displayEffects();
}
}
}

View File

@@ -4,6 +4,7 @@ import static com.mogo.eagle.core.utilcode.mogo.logger.scene.SceneConstant.M_V2X
import androidx.annotation.Nullable;
import com.mogo.eagle.core.data.map.entity.V2XMessageEntity;
import com.mogo.eagle.core.function.api.hmi.warning.IMoGoWarningStatusListener;
import com.mogo.eagle.core.function.call.hmi.CallerHmiManager;
import com.mogo.eagle.core.utilcode.mogo.logger.CallerLogger;
@@ -13,7 +14,6 @@ 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.scenario.view.IV2XMarker;
import com.mogo.eagle.core.network.utils.GsonUtil;
import com.mogo.module.common.entity.V2XMessageEntity;
import java.util.concurrent.TimeUnit;

View File

@@ -9,13 +9,13 @@ import android.text.style.ForegroundColorSpan;
import androidx.annotation.Nullable;
import com.mogo.eagle.core.data.enums.WarningDirectionEnum;
import com.mogo.eagle.core.data.map.MogoLocation;
import com.mogo.eagle.core.data.map.entity.V2XMessageEntity;
import com.mogo.eagle.core.function.api.hmi.warning.IMoGoWarningStatusListener;
import com.mogo.eagle.core.function.api.map.listener.IMoGoMapLocationListener;
import com.mogo.eagle.core.function.call.hmi.CallerHmiManager;
import com.mogo.eagle.core.utilcode.mogo.logger.CallerLogger;
import com.mogo.eagle.core.function.v2x.events.scenario.impl.AbsV2XScenario;
import com.mogo.eagle.core.function.v2x.events.scenario.view.IV2XMarker;
import com.mogo.module.common.entity.V2XMessageEntity;
import com.mogo.v2x.data.V2XWarningTarget;
import java.math.BigDecimal;
import java.util.Locale;

View File

@@ -1,36 +1,37 @@
package com.mogo.eagle.core.function.v2x.events.scenario.scene.warning;
import static com.mogo.eagle.core.utilcode.mogo.logger.scene.SceneConstant.M_V2X;
import static com.mogo.eagle.core.data.constants.DataTypes.TYPE_MARKER_CLOUD_STOP_LINE_DATA;
import static com.mogo.eagle.core.data.constants.DataTypes.TYPE_MARKER_CLOUD_WARN_DATA;
import static com.mogo.eagle.core.function.v2x.events.consts.V2XConst.V2X_FRONT_WARNING_MARKER;
import static com.mogo.module.common.constants.DataTypes.TYPE_MARKER_CLOUD_STOP_LINE_DATA;
import static com.mogo.module.common.constants.DataTypes.TYPE_MARKER_CLOUD_WARN_DATA;
import static com.mogo.eagle.core.utilcode.mogo.logger.scene.SceneConstant.M_V2X;
import com.mogo.cloud.commons.utils.CoordinateUtils;
import com.mogo.commons.AbsMogoApplication;
import com.mogo.commons.module.status.MogoStatusManager;
import com.mogo.eagle.core.data.map.MogoLatLng;
import com.mogo.eagle.core.data.map.MogoLocation;
import com.mogo.eagle.core.function.call.autopilot.CallerAutoPilotStatusListenerManager;
import com.mogo.eagle.core.utilcode.mogo.logger.CallerLogger;
import com.mogo.eagle.core.function.call.map.CallerMapUIServiceManager;
import com.mogo.eagle.core.function.v2x.events.bridge.BridgeApi;
import com.mogo.eagle.core.function.v2x.events.entity.model.DrawLineInfo;
import com.mogo.eagle.core.function.v2x.events.manager.IMoGoPersonWarnPolylineManager;
import com.mogo.eagle.core.function.v2x.events.manager.IMoGoStopPolylineManager;
import com.mogo.eagle.core.function.v2x.events.manager.IMoGoWarnPolylineManager;
import com.mogo.eagle.core.function.v2x.events.scenario.view.IV2XMarker;
import com.mogo.eagle.core.utilcode.mogo.logger.CallerLogger;
import com.mogo.eagle.core.utilcode.mogo.thread.WorkThreadHandler;
import com.mogo.eagle.core.utilcode.util.UiThreadHandler;
import com.mogo.map.MogoMarkerManager;
import com.mogo.map.marker.IMogoMarkerManager;
import com.mogo.map.overlay.IMogoPolyline;
import com.mogo.module.common.MogoApisHandler;
import com.mogo.module.common.drawer.V2XWarnDataDrawer;
import com.mogo.module.common.utils.Trigonometric;
import com.mogo.commons.utils.Trigonometric;
import com.mogo.v2x.data.V2XLocation;
import com.mogo.v2x.data.V2XWarningTarget;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
import java.util.Objects;
/**
* @author liujing
@@ -110,7 +111,7 @@ public class V2XWarningMarker implements IV2XMarker {
warningLocation);
*/
V2XWarnDataDrawer.getInstance().renderWarnData(mCloundWarningInfo.getLon(), mCloundWarningInfo.getLat(), mCloundWarningInfo.getType(), mCloundWarningInfo.getCollisionLat(), mCloundWarningInfo.getCollisionLon(), mCloundWarningInfo.getAngle(), mCloundWarningInfo.getShowTime());
Objects.requireNonNull(CallerMapUIServiceManager.INSTANCE.getMarkerService()).renderWarningMoveMarker(mCloundWarningInfo.getLon(), mCloundWarningInfo.getLat(), mCloundWarningInfo.getType(), mCloundWarningInfo.getCollisionLat(), mCloundWarningInfo.getCollisionLon(), mCloundWarningInfo.getAngle(), mCloundWarningInfo.getShowTime());
//添加停止线marker
//衡阳交付-取消划线需求,只渲染识别物红色模型移动过程
@@ -134,8 +135,13 @@ public class V2XWarningMarker implements IV2XMarker {
CallerLogger.INSTANCE.d(M_V2X + TAG, "数据为空carLocation == null");
}
*/
V2XWarnDataDrawer.getInstance().renderWarnData(mCloundWarningInfo.getLon(), mCloundWarningInfo.getLat(), mCloundWarningInfo.getType(), mCloundWarningInfo.getCollisionLat(), mCloundWarningInfo.getCollisionLon(), mCloundWarningInfo.getAngle(), mCloundWarningInfo.getShowTime());
Objects.requireNonNull(CallerMapUIServiceManager.INSTANCE.getMarkerService()).renderWarningMoveMarker(mCloundWarningInfo.getLon()
, mCloundWarningInfo.getLat()
, mCloundWarningInfo.getType()
, mCloundWarningInfo.getCollisionLat()
, mCloundWarningInfo.getCollisionLon()
, mCloundWarningInfo.getAngle()
, mCloundWarningInfo.getShowTime());
}, 0);
}
@@ -271,7 +277,7 @@ public class V2XWarningMarker implements IV2XMarker {
entity.setLat(latLng.lat);
entity.setLon(latLng.lon);
entity.setHeading(mCloundWarningInfo.getHeading());
V2XWarnDataDrawer.getInstance().renderStopLineData(entity.getLon(), entity.getLat());
Objects.requireNonNull(CallerMapUIServiceManager.INSTANCE.getMarkerService()).renderStopLineMarker(entity.getLon(), entity.getLat());
}
}
} catch (Exception e) {
@@ -417,7 +423,7 @@ public class V2XWarningMarker implements IV2XMarker {
for (int i = 0; i < count; i++) {
MogoLatLng newLo = Trigonometric.getNewLocation(
startLatLng.getLon(), startLatLng.getLat(), 5 * (i + 1), Trigonometric.getAngle(startLatLng.lon, startLatLng.lat, endLatLng.lon, endLatLng.lat));
V2XWarnDataDrawer.getInstance().drawerArrowsMarkerWithLocation(newLo, WARNING_ARROWS, 10, new Double(rotate).intValue());
Objects.requireNonNull(CallerMapUIServiceManager.INSTANCE.getMarkerService()).drawerArrowsMarkerWithLocation(newLo, WARNING_ARROWS, 10, new Double(rotate).intValue());
CallerLogger.INSTANCE.d(M_V2X + TAG, "小箭头位置" + newLo);
}
}
@@ -427,7 +433,7 @@ public class V2XWarningMarker implements IV2XMarker {
//线随车动
public void onCarLocationChanged2(MogoLocation latLng) {
carLocation = new MogoLatLng(latLng.getLatitude(), latLng.getLongitude());
if (MogoApisHandler.getInstance().getApis().getStatusManagerApi().isVrMode() && isSelfLineClear == false) {
if (MogoStatusManager.getInstance().isVrMode() && !isSelfLineClear) {
if (mCloundWarningInfo != null) {
V2XLocation v2XLocation = new V2XLocation();
v2XLocation.setLat(latLng.getLatitude());
@@ -437,7 +443,7 @@ public class V2XWarningMarker implements IV2XMarker {
//衡阳交付-取消划线需求,只渲染识别物红色模型移动过程
//drawSelfCarLine(latLng.getLongitude(), latLng.getLatitude(), latLng.getBearing());
}
CallerLogger.INSTANCE.d(M_V2X + TAG, "车辆行驶轨迹" + String.valueOf(latLng.getLongitude()) + "," + String.valueOf(latLng.getLatitude()));
CallerLogger.INSTANCE.d(M_V2X + TAG, "车辆行驶轨迹" + latLng.getLongitude() + "," + latLng.getLatitude());
}
@Override

View File

@@ -1,8 +1,8 @@
package com.mogo.eagle.core.function.v2x.events.utils
import com.mogo.module.common.entity.MarkerExploreWay
import com.mogo.module.common.entity.MarkerLocation
import com.mogo.module.common.entity.MarkerUserInfo
import com.mogo.eagle.core.data.map.entity.MarkerExploreWay
import com.mogo.eagle.core.data.map.entity.MarkerLocation
import com.mogo.eagle.core.data.map.entity.MarkerUserInfo
import com.mogo.v2x.data.MarkerExploreWayItem
import com.mogo.v2x.data.V2XMarkerExploreWay
import com.mogo.v2x.data.V2XMarkerLocation
@@ -16,7 +16,7 @@ fun V2XMarkerLocation?.toMarkerLocation(): MarkerLocation? = if (this == null) n
it.angle = this.angle
}
fun MarkerExploreWayItem?.toMarkerExploreWayItem(): com.mogo.module.common.entity.MarkerExploreWayItem? = if (this == null) null else com.mogo.module.common.entity.MarkerExploreWayItem().also {
fun MarkerExploreWayItem?.toMarkerExploreWayItem(): com.mogo.eagle.core.data.map.entity.MarkerExploreWayItem? = if (this == null) null else com.mogo.eagle.core.data.map.entity.MarkerExploreWayItem().also {
it.illegalCount = this.illegalCount
it.content = this.content
it.url = this.url

View File

@@ -8,11 +8,8 @@ import com.mogo.eagle.core.data.map.MogoLocation;
import com.mogo.eagle.core.function.call.autopilot.CallerAutoPilotStatusListenerManager;
import com.mogo.eagle.core.function.call.map.CallerMapUIServiceManager;
import com.mogo.eagle.core.utilcode.mogo.logger.CallerLogger;
import com.mogo.eagle.core.function.v2x.events.bridge.BridgeApi;
import com.mogo.eagle.core.utilcode.util.AppUtils;
import com.mogo.map.location.IMogoLocationClient;
import com.mogo.map.uicontroller.IMogoMapUIController;
import com.mogo.module.common.MogoApisHandler;
/**
* author : donghongyu

View File

@@ -5,11 +5,7 @@ import android.graphics.Rect
import com.mogo.eagle.core.data.map.MogoLatLng
import com.mogo.eagle.core.function.call.autopilot.CallerAutoPilotStatusListenerManager
import com.mogo.eagle.core.function.call.map.CallerMapUIServiceManager
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
class MapUtils {
@@ -22,34 +18,18 @@ class MapUtils {
return
}
val mBoundRect = Rect()
val paddingTop: Int
val paddingBottom: Int
val paddingRight: Int
val paddingLeft: Int
if (CarSeries.isF8xxSeries()) {
paddingTop = WindowUtils.dip2px(context, 250f)
paddingBottom = WindowUtils.dip2px(context, 100f)
paddingRight = WindowUtils.dip2px(context, 100f)
paddingLeft = WindowUtils.dip2px(context, 475f)
} else {
paddingTop = WindowUtils.dip2px(context, 370f)
paddingBottom = WindowUtils.dip2px(context, 100f)
paddingRight = WindowUtils.dip2px(context, 100f)
paddingLeft = WindowUtils.dip2px(context, 575f)
}
mBoundRect.bottom = paddingBottom
mBoundRect.top = paddingTop
mBoundRect.left = paddingLeft
mBoundRect.right = paddingRight
mBoundRect.bottom = WindowUtils.dip2px(context, 100f)
mBoundRect.top = WindowUtils.dip2px(context, 370f)
mBoundRect.left = WindowUtils.dip2px(context, 575f)
mBoundRect.right = WindowUtils.dip2px(context, 100f)
// 当前车辆位置
val carLocation = MogoLatLng(
CallerAutoPilotStatusListenerManager.getCurWgs84Lat(),
CallerAutoPilotStatusListenerManager.getCurWgs84Lon()
)
// 调整自适应的地图镜头
carLocation?.let {
CallerMapUIServiceManager.getMapUIController()?.showBounds("MapUtils", it, listOf(latLng), mBoundRect, true)
}
CallerMapUIServiceManager.getMapUIController()
?.showBounds("MapUtils", carLocation, listOf(latLng), mBoundRect, true)
} catch (e: Exception) {
e.printStackTrace()
}

View File

@@ -1,20 +1,19 @@
package com.mogo.eagle.core.function.v2x.events.utils;
import static com.mogo.module.common.entity.V2XMessageEntity.V2XTypeEnum.ALERT_ROAD_WARNING;
import static com.mogo.eagle.core.data.map.entity.V2XMessageEntity.V2XTypeEnum.ALERT_ROAD_WARNING;
import com.mogo.eagle.core.data.map.MogoLatLng;
import com.mogo.eagle.core.data.map.entity.MarkerExploreWay;
import com.mogo.eagle.core.data.map.entity.MarkerLocation;
import com.mogo.eagle.core.data.map.entity.MarkerResponse;
import com.mogo.eagle.core.data.map.entity.V2XMessageEntity;
import com.mogo.eagle.core.data.map.entity.V2XRoadEventEntity;
import com.mogo.eagle.core.data.map.entity.V2XWarningEntity;
import com.mogo.eagle.core.function.v2x.R;
import com.mogo.eagle.core.function.v2x.events.entity.net.V2XOptimalRouteDataRes;
import com.mogo.eagle.core.function.v2x.events.entity.net.V2XSpecialCarRes;
import com.mogo.eagle.core.network.utils.GsonUtil;
import com.mogo.eagle.core.utilcode.util.Utils;
import com.mogo.module.common.entity.MarkerExploreWay;
import com.mogo.module.common.entity.MarkerLocation;
import com.mogo.module.common.entity.MarkerResponse;
import com.mogo.module.common.entity.V2XMessageEntity;
import com.mogo.module.common.entity.V2XRoadEventEntity;
import com.mogo.module.common.entity.V2XWarningEntity;
import com.mogo.v2x.event.V2XEvent;
import java.io.ByteArrayOutputStream;
import java.io.InputStream;

View File

@@ -1,9 +1,8 @@
package com.mogo.eagle.core.function.v2x.events.utils;
import com.mogo.eagle.core.function.v2x.events.bridge.BridgeApi;
import com.mogo.commons.analytics.AnalyticsUtils;
import com.mogo.eagle.core.function.v2x.events.consts.V2XConst;
import com.mogo.eagle.core.function.v2x.events.manager.V2XStatusManager;
import com.mogo.service.analytics.IMogoAnalytics;
import java.util.HashMap;
import java.util.Map;
@@ -15,17 +14,13 @@ public class TrackUtils {
//埋点
public static void trackV2xRoadShow(String dbid, String type, String style) {
try {
IMogoAnalytics analytics = BridgeApi.INSTANCE.analytics();
if (analytics == null) {
return;
}
Map<String, Object> properties = new HashMap<>();
properties.put("dbid", dbid);
properties.put("type", type);
properties.put("lng", V2XStatusManager.getInstance().getLocation().getLongitude());
properties.put("lat", V2XStatusManager.getInstance().getLocation().getLatitude());
properties.put("style", style);
analytics.track(V2XConst.V2X_ROAD_SHOW, properties);
AnalyticsUtils.track(V2XConst.V2X_ROAD_SHOW, properties);
} catch (Exception e) {
e.printStackTrace();
}
@@ -34,15 +29,11 @@ public class TrackUtils {
//道路事件操作埋点 v2x_road_event
public static void trackV2xRoadEvent(String dbid, String sn, String type) {
try {
IMogoAnalytics analytics = BridgeApi.INSTANCE.analytics();
if (analytics == null) {
return;
}
Map<String, Object> properties = new HashMap<>();
properties.put("dbid", dbid);
properties.put("sn", sn);
properties.put("type", type);
analytics.track(V2XConst.V2X_ROAD_EVET, properties);
AnalyticsUtils.track(V2XConst.V2X_ROAD_EVET, properties);
} catch (Exception e) {
e.printStackTrace();
}
@@ -54,13 +45,9 @@ public class TrackUtils {
*/
public static void trackV2xRoadProduceEvent(int type) {
try {
IMogoAnalytics analytics = BridgeApi.INSTANCE.analytics();
if (analytics == null) {
return;
}
Map<String, Object> properties = new HashMap<>();
properties.put("type", type);
analytics.track(V2XConst.V2X_ROAD_PRODUCE, properties);
AnalyticsUtils.track(V2XConst.V2X_ROAD_PRODUCE, properties);
} catch (Exception e) {
e.printStackTrace();
}
@@ -68,13 +55,9 @@ public class TrackUtils {
public static void trackV2XMarkerClick(int type) {
try {
IMogoAnalytics analytics = BridgeApi.INSTANCE.analytics();
if (analytics == null) {
return;
}
Map<String, Object> properties = new HashMap<>();
properties.put("type", type);
analytics.track(V2XConst.LAUNCHER_ICON_CLICK, properties);
AnalyticsUtils.track(V2XConst.LAUNCHER_ICON_CLICK, properties);
} catch (Exception e) {
e.printStackTrace();
}
@@ -95,13 +78,9 @@ public class TrackUtils {
*/
public static void trackV2xHistoryEvent(int type) {
try {
IMogoAnalytics analytics = BridgeApi.INSTANCE.analytics();
if (analytics == null) {
return;
}
Map<String, Object> properties = new HashMap<>();
properties.put("type", type);
analytics.track(V2XConst.V2X_ROAD_EVET_HISTORY_BUTTON, properties);
AnalyticsUtils.track(V2XConst.V2X_ROAD_EVET_HISTORY_BUTTON, properties);
} catch (Exception e) {
e.printStackTrace();
}

View File

@@ -2,13 +2,13 @@ package com.mogo.eagle.core.function.v2x.events.utils;
import static com.mogo.eagle.core.utilcode.mogo.logger.scene.SceneConstant.M_V2X;
import com.mogo.eagle.core.data.map.entity.V2XEventZanData;
import com.mogo.eagle.core.data.map.entity.V2XHistoryScenarioData;
import com.mogo.eagle.core.utilcode.mogo.logger.CallerLogger;
import com.mogo.eagle.core.network.utils.GsonUtil;
import com.mogo.eagle.core.utilcode.mogo.sqlite.SQLIDao;
import com.mogo.eagle.core.utilcode.util.TimeUtils;
import com.mogo.eagle.core.utilcode.util.Utils;
import com.mogo.module.common.entity.V2XEventZanData;
import com.mogo.module.common.entity.V2XHistoryScenarioData;
import com.mogo.utils.sqlite.SQLDaoFactory;
import java.util.List;

View File

@@ -12,9 +12,8 @@ import android.widget.LinearLayout;
import androidx.annotation.Nullable;
import com.mogo.commons.module.status.MogoStatusManager;
import com.mogo.eagle.core.function.v2x.R;
import com.mogo.eagle.core.function.v2x.events.bridge.BridgeApi;
import com.mogo.service.statusmanager.IMogoStatusManager;
/**
@@ -42,11 +41,7 @@ public class HeartLikeView extends LinearLayout implements Animator.AnimatorList
super(context, attrs, defStyleAttr);
TypedArray typedArray = context.obtainStyledAttributes(attrs, R.styleable.HeartLikeView, defStyleAttr,
0);
boolean isVrMode = false;
IMogoStatusManager statusManager = BridgeApi.INSTANCE.statusManager();
if (statusManager != null) {
isVrMode = statusManager.isVrMode();
}
boolean isVrMode = MogoStatusManager.getInstance().isVrMode();
boolean showGrayBack = typedArray.getBoolean(R.styleable.HeartLikeView_showGrayBack, false);
@@ -57,14 +52,12 @@ public class HeartLikeView extends LinearLayout implements Animator.AnimatorList
inflate(context, isVrMode ? R.layout.view_heart_like_vr : R.layout.view_heart_like, this);
mIllegalParkingLike = findViewById(R.id.ivIllegalParkingLike);
}
boolean finalIsVrMode = isVrMode;
setOnClickListener(v -> {
if (!isAnimator) {
isAnimator = true;
if (mAnimatorSet == null) {
mAnimatorSet = (AnimatorSet) AnimatorInflater.loadAnimator(getContext(),
finalIsVrMode ? R.animator.v2x_like_heart_animation_vr : R.animator.v2x_like_heart_animation);
isVrMode ? R.animator.v2x_like_heart_animation_vr : R.animator.v2x_like_heart_animation);
mAnimatorSet.setTarget(mIllegalParkingLike);
mAnimatorSet.addListener(this);
}
@@ -84,12 +77,7 @@ public class HeartLikeView extends LinearLayout implements Animator.AnimatorList
if (mOnClickCallListener != null) {
mOnClickCallListener.onClicked(HeartLikeView.this);
}
boolean isVrMode = false;
IMogoStatusManager statusManager = BridgeApi.INSTANCE.statusManager();
if (statusManager != null) {
isVrMode = statusManager.isVrMode();
}
if (isVrMode) {
if (MogoStatusManager.getInstance().isVrMode()) {
mIllegalParkingLike.setImageResource(R.drawable.module_common_icon_like_selected_vr);
}
}

View File

@@ -13,9 +13,8 @@ import android.widget.LinearLayout;
import androidx.annotation.Nullable;
import com.mogo.commons.module.status.MogoStatusManager;
import com.mogo.eagle.core.function.v2x.R;
import com.mogo.eagle.core.function.v2x.events.bridge.BridgeApi;
import com.mogo.service.statusmanager.IMogoStatusManager;
/**
@@ -42,29 +41,24 @@ public class HeartUnLikeView extends LinearLayout implements Animator.AnimatorLi
public HeartUnLikeView(Context context, @Nullable AttributeSet attrs, int defStyleAttr) {
super(context, attrs, defStyleAttr);
boolean isVrMode = false;
IMogoStatusManager statusManager = BridgeApi.INSTANCE.statusManager();
if (statusManager != null) {
isVrMode = statusManager.isVrMode();
}
boolean isVrMode = MogoStatusManager.getInstance().isVrMode();
inflate(context, isVrMode ? R.layout.view_heart_unlike_vr : R.layout.view_heart_unlike, this);
mIllegalParkingUnLike = findViewById(R.id.ivIllegalParkingUnLike);
animationImageView = findViewById(R.id.animationImage);
boolean finalIsVrMode = isVrMode;
setOnClickListener(v -> {
if (!isAnimator) {
isAnimator = true;
if (mAnimatorSet == null) {
mAnimatorSet = (AnimatorSet) AnimatorInflater.loadAnimator(getContext(),
finalIsVrMode ?
isVrMode ?
R.animator.v2x_unlike_heart_animation_vr : R.animator.v2x_unlike_heart_animation);
mAnimatorSet.setTarget(mIllegalParkingUnLike);
mAnimatorSet.addListener(this);
}
mAnimatorSet.start();
}
if (finalIsVrMode) {
if (isVrMode) {
animationImageView.setVisibility(View.VISIBLE);
Animation animation = AnimationUtils.loadAnimation(getContext(), R.anim.v2x_unlike_heart_scale_ani_vr);
animationImageView.startAnimation(animation);
@@ -84,12 +78,7 @@ public class HeartUnLikeView extends LinearLayout implements Animator.AnimatorLi
if (mOnClickCallListener != null) {
mOnClickCallListener.onClicked(HeartUnLikeView.this);
}
boolean isVrMode = false;
IMogoStatusManager statusManager = BridgeApi.INSTANCE.statusManager();
if (statusManager != null) {
isVrMode = statusManager.isVrMode();
}
if (isVrMode) {
if (MogoStatusManager.getInstance().isVrMode()) {
mIllegalParkingUnLike.setImageResource(R.drawable.module_common_icon_unlike_selected_vr);
}
}

View File

@@ -7,6 +7,7 @@ import android.view.View
import android.widget.ImageView
import com.bumptech.glide.Glide
import com.bumptech.glide.request.RequestOptions
import com.mogo.commons.module.status.MogoStatusManager
import com.mogo.eagle.core.function.v2x.R
import com.mogo.eagle.core.widget.glide.SkinAbleBitmapTarget
import com.shuyu.gsyvideoplayer.GSYVideoManager
@@ -14,8 +15,6 @@ import com.shuyu.gsyvideoplayer.utils.GSYVideoType
import com.shuyu.gsyvideoplayer.video.StandardGSYVideoPlayer
import com.shuyu.gsyvideoplayer.video.base.GSYVideoView
import com.shuyu.gsyvideoplayer.video.base.GSYVideoViewBridge
import com.mogo.eagle.core.function.v2x.events.bridge.BridgeApi.statusManager
import com.mogo.service.statusmanager.IMogoStatusManager
class SimpleCoverVideoPlayer : StandardGSYVideoPlayer {
@@ -45,12 +44,7 @@ class SimpleCoverVideoPlayer : StandardGSYVideoPlayer {
}
override fun getLayoutId(): Int {
var isVrMode = false
val statusManager: IMogoStatusManager? = statusManager()
if (statusManager != null) {
isVrMode = statusManager.isVrMode
}
if (isVrMode) {
if (MogoStatusManager.getInstance().isVrMode) {
return R.layout.v2x_road_video_plyer_layout_vr
}
return R.layout.v2x_road_video_plyer_layout

View File

@@ -19,6 +19,7 @@ import com.mogo.cloud.trafficlive.api.ITrafficIntersectionLiveCallBack;
import com.mogo.cloud.trafficlive.api.MoGoAiCloudTrafficLive;
import com.mogo.commons.voice.AIAssist;
import com.mogo.eagle.core.data.map.MogoLocation;
import com.mogo.eagle.core.data.map.entity.MarkerCarInfo;
import com.mogo.eagle.core.utilcode.mogo.logger.CallerLogger;
import com.mogo.eagle.core.function.v2x.R;
import com.mogo.eagle.core.function.v2x.events.bridge.BridgeApi;
@@ -30,7 +31,6 @@ import com.mogo.eagle.core.widget.RoundLayout;
import com.mogo.eagle.core.widget.media.video.SimpleVideoPlayer;
import com.mogo.map.MogoLocationClient;
import com.mogo.map.location.IMogoLocationClient;
import com.mogo.module.common.entity.MarkerCarInfo;
import com.shuyu.gsyvideoplayer.GSYVideoManager;
import com.shuyu.gsyvideoplayer.builder.GSYVideoOptionBuilder;
import com.shuyu.gsyvideoplayer.cache.CacheFactory;

View File

@@ -16,6 +16,7 @@ import androidx.constraintlayout.widget.ConstraintLayout;
import androidx.core.content.ContextCompat;
import com.mogo.commons.voice.AIAssist;
import com.mogo.eagle.core.data.map.entity.MarkerCarInfo;
import com.mogo.eagle.core.utilcode.mogo.logger.CallerLogger;
import com.mogo.eagle.core.function.v2x.R;
import com.mogo.eagle.core.function.v2x.events.voice.V2XVoiceCallbackListener;
@@ -24,7 +25,6 @@ import com.mogo.eagle.core.function.v2x.events.voice.V2XVoiceManager;
import com.mogo.eagle.core.network.utils.GsonUtil;
import com.mogo.eagle.core.utilcode.util.Utils;
import com.mogo.eagle.core.widget.RoundLayout;
import com.mogo.module.common.entity.MarkerCarInfo;
import com.tencent.rtmp.ITXLivePlayListener;
import com.tencent.rtmp.TXLiveConstants;
import com.tencent.rtmp.TXLivePlayConfig;

View File

@@ -3,10 +3,10 @@ package com.mogo.eagle.core.function.v2x.events.voice
import android.content.Context
import android.content.Intent
import android.text.TextUtils
import com.mogo.commons.module.intent.IMogoIntentListener
import com.mogo.commons.module.intent.IntentManager
import com.mogo.commons.voice.AIAssist
import com.mogo.commons.voice.IMogoVoiceCmdCallBack
import com.mogo.eagle.core.function.v2x.events.bridge.BridgeApi
import com.mogo.service.intent.IMogoIntentListener
import java.lang.ref.WeakReference
import java.util.concurrent.ConcurrentHashMap
@@ -51,7 +51,7 @@ object V2XVoiceManager : IMogoVoiceCmdCallBack, IMogoIntentListener {
try {
unRegisterWakeCmd(cmd)
voiceCallbackMap[cmd] = callbackListener
BridgeApi.intentManager()?.registerIntentListener(cmd, this)
IntentManager.getInstance().registerIntentListener(cmd, this)
} catch (e: Exception) {
e.printStackTrace()
}
@@ -63,7 +63,7 @@ object V2XVoiceManager : IMogoVoiceCmdCallBack, IMogoIntentListener {
fun unRegisterWakeCmd(cmd: String): V2XVoiceManager {
try {
voiceCallbackMap.remove(cmd)
BridgeApi.intentManager()?.unregisterIntentListener(cmd, this)
IntentManager.getInstance().unregisterIntentListener(cmd, this)
} catch (e: Exception) {
e.printStackTrace()
}

View File

@@ -1,25 +1,25 @@
package com.mogo.eagle.core.function.v2x.redlightwarning
import android.location.Location
import com.mogo.eagle.core.data.deva.bizconfig.FuncBizConfig.Companion.BIZ_IVP
import com.mogo.eagle.core.data.deva.bizconfig.FuncBizConfig.Companion.BIZ_IVP_GREEN
import com.mogo.eagle.core.data.deva.bizconfig.FuncBizConfig.Companion.V2I
import com.mogo.eagle.core.utilcode.mogo.logger.scene.SceneConstant.Companion.M_V2X
import com.mogo.eagle.core.data.map.MogoLatLng
import com.mogo.eagle.core.data.map.MogoLocation
import com.mogo.eagle.core.data.trafficlight.*
import com.mogo.eagle.core.data.trafficlight.TrafficLightStatusHelper.getCurrentRoadTrafficLight
import com.mogo.eagle.core.function.api.map.listener.IMoGoMapLocationListener
import com.mogo.eagle.core.function.api.trafficlight.IMoGoTrafficLightListener
import com.mogo.eagle.core.function.api.vip.IMoGoVipSetListener
import com.mogo.eagle.core.function.call.hmi.CallerHmiManager
import com.mogo.eagle.core.utilcode.mogo.logger.CallerLogger
import com.mogo.eagle.core.function.call.map.CallerMapLocationListenerManager
import com.mogo.eagle.core.function.call.map.CallerMapUIServiceManager
import com.mogo.eagle.core.function.call.trafficlight.CallerTrafficLightListenerManager
import com.mogo.eagle.core.function.call.vip.CallVipSetListenerManager
import com.mogo.eagle.core.function.v2x.trafficlight.core.MogoTrafficLightManager
import com.mogo.eagle.core.utilcode.mogo.logger.CallerLogger
import com.mogo.eagle.core.utilcode.mogo.logger.scene.SceneConstant.Companion.M_V2X
import com.mogo.eagle.core.utilcode.util.ThreadUtils
import com.mogo.map.navi.IMogoCarLocationChangedListener2
import com.mogo.module.common.MogoApisHandler
import com.mogo.module.common.enums.EventTypeEnum
import com.mogo.eagle.core.data.enums.EventTypeEnum
import com.zhjt.service_biz.BizConfig
import kotlin.math.abs
import kotlin.math.ceil
@@ -28,7 +28,7 @@ import kotlin.math.min
class RedLightWarningManager : IMoGoTrafficLightListener, IMoGoVipSetListener,
IMogoCarLocationChangedListener2 {
IMoGoMapLocationListener {
private var vip: Boolean = false
@@ -38,7 +38,7 @@ class RedLightWarningManager : IMoGoTrafficLightListener, IMoGoVipSetListener,
// 是否已进入到路口(停止线处)
private var isEnter = false
private var mLocation: Location? = null
private var mLocation: MogoLocation? = null
companion object {
@@ -53,7 +53,7 @@ class RedLightWarningManager : IMoGoTrafficLightListener, IMoGoVipSetListener,
// 到路口100m时回调
CallerLogger.d("$M_V2X$TAG", "处理路口交通数据:是否是第一次处理:${isFirst}是否进入路口:${isEnter}")
if (trafficLightResult.currentRoadIsRight()) {
CallerLogger.d("$M_V2X$TAG","当前道路右转,不处理")
CallerLogger.d("$M_V2X$TAG", "当前道路右转,不处理")
return
}
if (isFirst && !isEnter) {
@@ -79,7 +79,7 @@ class RedLightWarningManager : IMoGoTrafficLightListener, IMoGoVipSetListener,
fun listenTrafficLight() {
CallerTrafficLightListenerManager.registerEnterCrossRoadListener(TAG, this)
CallerTrafficLightListenerManager.registerTrafficLightListener(TAG, this)
MogoApisHandler.getInstance().apis.registerCenterApi.registerCarLocationChangedListener(TAG, this)
CallerMapLocationListenerManager.addListener(TAG, this, false)
CallVipSetListenerManager.registerVipSetListener(TAG, this)
}
@@ -177,7 +177,17 @@ class RedLightWarningManager : IMoGoTrafficLightListener, IMoGoVipSetListener,
for (i in 0..size step 2) {
if (i < size) {
// 自车到0-1、2-3、4-5、6-7组成的线段的最小距离
minValue = min(minValue, LocationUtils.pointToLine(points[i].lon, points[i].lat, points[i+1].lon, points[i+1].lat, lon, lat))
minValue = min(
minValue,
LocationUtils.pointToLine(
points[i].lon,
points[i].lat,
points[i + 1].lon,
points[i + 1].lat,
lon,
lat
)
)
}
}
return if (minValue > 9999) 0f else minValue.toFloat()
@@ -186,18 +196,26 @@ class RedLightWarningManager : IMoGoTrafficLightListener, IMoGoVipSetListener,
/**
* 闯红灯预警
*/
@BizConfig(V2I,"",BIZ_IVP)
@BizConfig(V2I, "", BIZ_IVP)
private fun redLightWarning() {
CallerLogger.d("$M_V2X$TAG", "=====闯红灯预警=====")
ThreadUtils.runOnUiThread {
CallerHmiManager.showWarningV2X(EventTypeEnum.TYPE_USECASE_ID_IVP.poiType, EventTypeEnum.TYPE_USECASE_ID_IVP.content, EventTypeEnum.TYPE_USECASE_ID_IVP.tts, EventTypeEnum.TYPE_USECASE_ID_IVP.poiType, null, true, 5000L)
CallerHmiManager.showWarningV2X(
EventTypeEnum.TYPE_USECASE_ID_IVP.poiType,
EventTypeEnum.TYPE_USECASE_ID_IVP.content,
EventTypeEnum.TYPE_USECASE_ID_IVP.tts,
EventTypeEnum.TYPE_USECASE_ID_IVP.poiType,
null,
true,
5000L
)
}
}
/**
* 绿灯通行提示
*/
@BizConfig(V2I,"",BIZ_IVP_GREEN)
@BizConfig(V2I, "", BIZ_IVP_GREEN)
private fun greenLightWarning(speed: String = "50") {
CallerLogger.d("$M_V2X$TAG", "=====绿灯通行预警=====")
ThreadUtils.runOnUiThread {
@@ -209,7 +227,15 @@ class RedLightWarningManager : IMoGoTrafficLightListener, IMoGoVipSetListener,
EventTypeEnum.getWarningTts(EventTypeEnum.TYPE_USECASE_ID_IVP_GREEN.poiType),
speed
)
CallerHmiManager.showWarningV2X(EventTypeEnum.TYPE_USECASE_ID_IVP_GREEN.poiType, content, tts, EventTypeEnum.TYPE_USECASE_ID_IVP_GREEN.poiType, null, true, 5000L)
CallerHmiManager.showWarningV2X(
EventTypeEnum.TYPE_USECASE_ID_IVP_GREEN.poiType,
content,
tts,
EventTypeEnum.TYPE_USECASE_ID_IVP_GREEN.poiType,
null,
true,
5000L
)
}
}
@@ -221,13 +247,11 @@ class RedLightWarningManager : IMoGoTrafficLightListener, IMoGoVipSetListener,
CallerTrafficLightListenerManager.unRegisterTrafficLightListener(TAG)
CallVipSetListenerManager.unRegisterVipSetListener(TAG)
CallerTrafficLightListenerManager.unRegisterEnterCrossRoadListener(TAG)
MogoApisHandler.getInstance().apis.registerCenterApi.unregisterCarLocationChangedListener(
TAG, this
)
CallerMapLocationListenerManager.removeListener(TAG,false)
}
override fun onCarLocationChanged2(latLng: Location?) {
latLng?.let {
override fun onLocationChanged(location: MogoLocation?, from: Int, isGps: Boolean) {
location?.let {
mLocation = it
}
}

View File

@@ -8,7 +8,7 @@ import com.mogo.eagle.core.network.MoGoRetrofitFactory
import com.mogo.eagle.core.network.apiCall
import com.mogo.eagle.core.network.cancel
import com.mogo.eagle.core.network.request
import com.mogo.module.common.constants.HostConst.CITY_HOST
import com.mogo.eagle.core.data.constants.HostConst.CITY_HOST
class TrafficLightNetWorkModel {

View File

@@ -25,7 +25,7 @@ import com.mogo.eagle.core.utilcode.mogo.logger.CallerLogger
import com.mogo.eagle.core.utilcode.mogo.logger.scene.SceneConstant.Companion.M_V2X
import com.mogo.eagle.core.utilcode.util.ToastUtils
import com.mogo.eagle.core.utilcode.util.UiThreadHandler
import com.mogo.module.common.enums.EventTypeEnum
import com.mogo.eagle.core.data.enums.EventTypeEnum
import com.zhjt.service_biz.BizConfig
class VipCarManager : IMogoOnMessageListener<VipMessage>, IMoGoTrafficLightListener,

View File

@@ -6,7 +6,7 @@ import com.mogo.eagle.core.data.v2x.VipRequest
import com.mogo.eagle.core.network.MoGoRetrofitFactory
import com.mogo.eagle.core.network.apiCall
import com.mogo.eagle.core.network.request
import com.mogo.module.common.constants.HostConst.DATA_SERVICE_HOST
import com.mogo.eagle.core.data.constants.HostConst.DATA_SERVICE_HOST
class VipNetWorkModel {

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 8.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 8.8 KiB

View File

@@ -1,15 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android">
<gradient
android:angle="270"
android:endColor="#3F4057"
android:startColor="#585A7C" />
<corners android:radius="360dp" />
<padding
android:bottom="@dimen/dp_6"
android:left="@dimen/dp_6"
android:right="@dimen/dp_6"
android:top="@dimen/dp_6" />
</shape>

View File

@@ -1,15 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android">
<gradient
android:angle="180"
android:endColor="#5CC1FF"
android:startColor="#256BFF" />
<corners android:radius="360dp" />
<padding
android:bottom="@dimen/dp_3"
android:left="@dimen/dp_16"
android:right="@dimen/dp_16"
android:top="@dimen/dp_3" />
</shape>

View File

@@ -1,17 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<layer-list xmlns:android="http://schemas.android.com/apk/res/android" >
<item android:id="@+id/shape_id" >
<!-- 倒三角 -->
<rotate
android:fromDegrees="45"
android:pivotX="135%"
android:pivotY="15%"
android:toDegrees="45" >
<shape android:shape="rectangle" >
<size android:width="@dimen/dp_20"
android:height="@dimen/dp_20"/>
<solid android:color="#3F4057" />
</shape >
</rotate >
</item >
</layer-list >

View File

@@ -23,7 +23,7 @@
android:gravity="center"
android:text="周边5公里暂无交通事件\n
你可以试着分享一个交通事件给其他车主"
android:textColor="@color/v2x_FFF_666"
android:textColor="@android:color/white"
android:textSize="@dimen/dp_36"
app:layout_constraintBottom_toTopOf="@+id/btnShear"
app:layout_constraintEnd_toEndOf="parent"
@@ -32,8 +32,8 @@
<TextView
android:id="@+id/btnShear"
android:layout_width="@dimen/v2x_share_btn_width"
android:layout_height="@dimen/v2x_share_btn_height"
android:layout_width="@dimen/dp_150"
android:layout_height="@dimen/dp_48"
android:layout_marginTop="@dimen/dp_60"
android:background="@drawable/bg_v2x_go_to_share"
android:gravity="center"
@@ -46,8 +46,8 @@
<TextView
android:id="@+id/btnRefresh"
android:layout_width="@dimen/v2x_share_btn_width"
android:layout_height="@dimen/v2x_share_btn_height"
android:layout_width="@dimen/dp_150"
android:layout_height="@dimen/dp_48"
android:layout_marginStart="@dimen/dp_60"
android:layout_marginTop="@dimen/dp_60"
android:background="@drawable/module_dw_common_corner_bkg_light"

View File

@@ -1,34 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:gravity="center"
android:minWidth="@dimen/dp_80"
android:orientation="vertical"
tools:parentTag="androidx.constraintlayout.widget.ConstraintLayout">
<ImageView
android:id="@+id/ivMarkerTip"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:scaleType="fitXY"
android:src="@drawable/v_to_x_marker_car_red"
android:visibility="gone"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"
tools:visibility="visible" />
<ImageView
android:id="@+id/ivCar"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:rotation="90"
android:src="@drawable/icon_car_gray"
app:layout_constraintEnd_toEndOf="@+id/ivMarkerTip"
app:layout_constraintStart_toStartOf="@+id/ivMarkerTip"
app:layout_constraintTop_toBottomOf="@+id/ivMarkerTip" />
</androidx.constraintlayout.widget.ConstraintLayout>

View File

@@ -1,102 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:gravity="center"
android:orientation="vertical"
android:paddingStart="@dimen/dp_5"
android:paddingEnd="@dimen/dp_5"
tools:parentTag="androidx.constraintlayout.widget.ConstraintLayout">
<androidx.constraintlayout.widget.ConstraintLayout
android:id="@+id/clMarkerContent"
android:layout_width="wrap_content"
android:layout_height="@dimen/dp_90"
android:background="@drawable/v2x_map_marker_blue_info"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent">
<com.mogo.service.imageloader.MogoImageView
android:id="@+id/ivUserHead"
android:layout_width="@dimen/dp_76"
android:layout_height="@dimen/dp_76"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"
app:miv_failureHolder="@drawable/icon_default_user_head"
app:miv_overlayImageId="@drawable/icon_default_user_head"
app:miv_placeHolder="@drawable/icon_default_user_head"
app:miv_shape="circle" />
<TextView
android:id="@+id/tvMarkerContent"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="@dimen/dp_10"
android:ellipsize="end"
android:minWidth="@dimen/dp_150"
android:singleLine="true"
android:textColor="#ffffff"
android:textSize="@dimen/dp_32"
app:layout_constraintEnd_toStartOf="@+id/ivIcon"
app:layout_constraintStart_toEndOf="@+id/ivUserHead"
app:layout_constraintTop_toTopOf="@+id/ivUserHead"
app:layout_goneMarginRight="@dimen/dp_30"
tools:text="诗一样的女子" />
<TextView
android:id="@+id/tvUserMarker"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:background="@drawable/v2x_map_marker_driver_type_blue_info"
android:textColor="#ffffff"
android:textSize="@dimen/dp_20"
app:layout_constraintStart_toStartOf="@+id/tvMarkerContent"
app:layout_constraintTop_toBottomOf="@+id/tvMarkerContent"
tools:text="老司机" />
<ImageView
android:id="@+id/ivIcon"
android:layout_width="@dimen/dp_85"
android:layout_height="@dimen/dp_85"
android:layout_gravity="center"
android:layout_marginLeft="@dimen/dp_10"
android:scaleType="fitXY"
android:src="@drawable/icon_talk"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toEndOf="@+id/tvMarkerContent"
app:layout_constraintTop_toTopOf="parent" />
</androidx.constraintlayout.widget.ConstraintLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_marginBottom="-10dp"
android:gravity="center"
android:orientation="vertical"
app:layout_constraintEnd_toEndOf="@+id/clMarkerContent"
app:layout_constraintStart_toStartOf="@+id/clMarkerContent"
app:layout_constraintTop_toBottomOf="@+id/clMarkerContent">
<ImageView
android:id="@+id/ivReverseTriangle"
android:layout_width="20dp"
android:layout_height="20dp"
android:src="@drawable/v2x_shape_reverse_triangle_blue"
android:visibility="gone"
tools:visibility="visible" />
<ImageView
android:id="@+id/ivCar"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:src="@drawable/icon_map_marker_car_gray"
android:translationY="-10dp" />
</LinearLayout>
</LinearLayout>