[3.4.0-map-sdk] wait to finish
This commit is contained in:
@@ -20,6 +20,8 @@ import com.mogo.eagle.function.biz.v2x.trafficlight.core.TrafficLightThreadHandl
|
||||
import com.mogo.eagle.function.biz.v2x.trafficlight.core.TrafficLightThreadHandler.Companion.MSG_WHAT_STOP_SEARCH_CROSS_ROAD
|
||||
import com.mogo.eagle.function.biz.v2x.trafficlight.core.TrafficLightThreadHandler.Companion.MSG_WHAT_STOP_SEARCH_TRAFFIC_LIGHT
|
||||
import com.mogo.eagle.function.biz.v2x.trafficlight.network.TrafficLightNetWorkModel
|
||||
import com.mogo.map.MogoData
|
||||
import com.mogo.map.MogoData.Companion.mogoMapData
|
||||
|
||||
class MogoTrafficLightManager : IMoGoChassisLocationGCJ02Listener {
|
||||
|
||||
@@ -58,8 +60,7 @@ class MogoTrafficLightManager : IMoGoChassisLocationGCJ02Listener {
|
||||
}
|
||||
firstLoopCrossRoad = false
|
||||
mLocation?.let { it ->
|
||||
val tileId = CallerMapUIServiceManager.getMapUIController()
|
||||
?.getTileId(it.longitude, it.latitude) ?: 0
|
||||
val tileId = mogoMapData.get().getTileId(it.longitude, it.latitude)
|
||||
trafficLightNetWorkModel.requestRoadID(
|
||||
tileId, it.latitude, it.longitude, it.heading,
|
||||
{
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
package com.mogo.eagle.function.biz.v2x.v2n.scenario.impl;
|
||||
|
||||
import static com.mogo.eagle.core.utilcode.mogo.logger.scene.SceneConstant.M_V2X;
|
||||
import static com.mogo.map.MogoMap.DEFAULT;
|
||||
|
||||
import androidx.localbroadcastmanager.content.LocalBroadcastManager;
|
||||
|
||||
@@ -93,7 +94,7 @@ public class V2XScenarioManager implements IV2XScenarioManager {
|
||||
* 道路事件触发后,切换到中景
|
||||
*/
|
||||
private void sceneChange() {
|
||||
IMogoMapUIController mapUiController = CallerMapUIServiceManager.INSTANCE.getMapUIController();
|
||||
IMogoMapUIController mapUiController = CallerMapUIServiceManager.INSTANCE.getMapUIController(DEFAULT);
|
||||
if (mapUiController != null && mapUiController.getCurrentMapVisualAngle() != VisualAngleMode.MODE_MEDIUM_SIGHT) {
|
||||
mapUiController.changeMapVisualAngle(VisualAngleMode.MODE_MEDIUM_SIGHT, null);
|
||||
}
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
package com.mogo.eagle.function.biz.v2x.v2n.scenario.scene.road;
|
||||
|
||||
import static com.mogo.eagle.core.utilcode.mogo.logger.scene.SceneConstant.M_V2X;
|
||||
import static com.mogo.map.MogoMap.DEFAULT;
|
||||
|
||||
import androidx.core.util.Pair;
|
||||
import com.mogo.eagle.core.data.enums.EventTypeEnumNew;
|
||||
@@ -54,7 +55,7 @@ public class V2XRoadEventMarker implements IV2XMarker<V2XRoadEventEntity> {
|
||||
.longitude(entity.getLocation().getLon())
|
||||
.latitude(entity.getLocation().getLat())
|
||||
.set3DMode(true)
|
||||
.icon3DRes(EventTypeEnumNew.getMarker3DRes(entity.getPoiType())).build());
|
||||
.icon3DRes(EventTypeEnumNew.getMarker3DRes(entity.getPoiType())).build(),DEFAULT);
|
||||
if (point != null) {
|
||||
V2XBizTrace.Companion.onAck("V2XRoadEventMarker -> --- add Marker type: ", entity.getPoiType());
|
||||
ArrayList<Point> markers = new ArrayList<>();
|
||||
|
||||
@@ -6,13 +6,15 @@ import com.mogo.eagle.core.data.enums.DataSourceType;
|
||||
import com.mogo.eagle.core.data.map.MogoLocation;
|
||||
import com.mogo.eagle.core.function.api.autopilot.IMoGoChassisLocationWGS84Listener;
|
||||
import com.mogo.eagle.core.function.call.autopilot.CallerChassisLocationWGS84ListenerManager;
|
||||
import com.mogo.eagle.core.function.call.map.CallerMapUIServiceManager;
|
||||
import com.mogo.eagle.core.function.call.v2x.CallerLimitingVelocityListenerManager;
|
||||
import com.mogo.map.MapDataWrapper;
|
||||
|
||||
import java.util.Objects;
|
||||
import java.util.Timer;
|
||||
import java.util.TimerTask;
|
||||
|
||||
import kotlin.Unit;
|
||||
import kotlin.jvm.functions.Function1;
|
||||
|
||||
/**
|
||||
* 限速
|
||||
*
|
||||
@@ -47,17 +49,20 @@ public class SpeedLimitDataManager implements IMoGoChassisLocationWGS84Listener
|
||||
@Override
|
||||
public void run() {
|
||||
if (mLocation != null) {
|
||||
if (CallerMapUIServiceManager.INSTANCE.getMapUIController() != null) {
|
||||
getSpeedLimit();
|
||||
}
|
||||
getSpeedLimit();
|
||||
}
|
||||
}
|
||||
|
||||
private void getSpeedLimit() {
|
||||
int speedLimit = Objects.requireNonNull(CallerMapUIServiceManager.INSTANCE.getMapUIController()).getLimitSpeed(mLocation.getLongitude(), mLocation.getLatitude(), (float) mLocation.getHeading());
|
||||
if (speedLimit > 0) {
|
||||
CallerLimitingVelocityListenerManager.INSTANCE.invokeUnion(speedLimit, DataSourceType.MAP);
|
||||
}
|
||||
MapDataWrapper.INSTANCE.getLimitSpeed(mLocation.getLongitude(), mLocation.getLatitude(), (float) mLocation.getHeading(), new Function1<Integer, Unit>() {
|
||||
@Override
|
||||
public Unit invoke(Integer integer) {
|
||||
if (integer != null && integer > 0) {
|
||||
CallerLimitingVelocityListenerManager.INSTANCE.invokeUnion(integer, DataSourceType.MAP);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -4,7 +4,6 @@ import android.annotation.SuppressLint
|
||||
import com.mogo.eagle.core.data.config.FunctionBuildConfig
|
||||
import com.mogo.eagle.core.data.enums.TrafficTypeEnum
|
||||
import com.mogo.eagle.core.function.call.biz.CallerFuncBizListenerManager
|
||||
import com.mogo.eagle.core.function.call.map.CallerMapUIServiceManager
|
||||
import mogo.telematics.pad.MessagePad.*
|
||||
|
||||
object TrackerSourceFilterHelper {
|
||||
@@ -12,7 +11,8 @@ object TrackerSourceFilterHelper {
|
||||
@SuppressLint("NewApi")
|
||||
fun filterData(data: TrackedObject): Boolean {
|
||||
if (!FunctionBuildConfig.isDrawUnknownIdentifyData && (data.type == TrafficTypeEnum.TYPE_TRAFFIC_ID_WEI_ZHI.type
|
||||
|| data.type == TrafficTypeEnum.TYPE_TRAFFIC_ID_501.type || data.type == TrafficTypeEnum.TYPE_TRAFFIC_ID_502.type)) {
|
||||
|| data.type == TrafficTypeEnum.TYPE_TRAFFIC_ID_501.type || data.type == TrafficTypeEnum.TYPE_TRAFFIC_ID_502.type)
|
||||
) {
|
||||
return true
|
||||
}
|
||||
var trackIPCFilter = true
|
||||
@@ -32,7 +32,7 @@ object TrackerSourceFilterHelper {
|
||||
}
|
||||
}
|
||||
4 -> {
|
||||
if(isV2nRSM(data).second){
|
||||
if (isV2nRSM(data).second) {
|
||||
trackIPCFilter = false
|
||||
}
|
||||
}
|
||||
@@ -65,12 +65,10 @@ object TrackerSourceFilterHelper {
|
||||
}
|
||||
|
||||
//僵尸车
|
||||
if(data.addAttribute == AdditionalAttribute.ATTR_ZOMBIE){
|
||||
if (data.addAttribute == AdditionalAttribute.ATTR_ZOMBIE) {
|
||||
color = "#7A8499FF"
|
||||
CallerMapUIServiceManager.getMapUIController()?.let {
|
||||
if(it.isDayMode){
|
||||
color = "#9BA8BCFF"
|
||||
}
|
||||
if (FunctionBuildConfig.skinMode == 1) {
|
||||
color = "#9BA8BCFF"
|
||||
}
|
||||
//消息埋点
|
||||
CallerFuncBizListenerManager.invokeAttrZombieAnalyticsEvent()
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
package com.mogo.eagle.core.function.business.routeoverlay;
|
||||
|
||||
import static com.mogo.map.MogoMap.DEFAULT;
|
||||
|
||||
import android.annotation.SuppressLint;
|
||||
import android.graphics.Color;
|
||||
import android.os.Handler;
|
||||
@@ -197,7 +199,7 @@ public class RouteOverlayDrawer {
|
||||
if (mPolylineOptions == null) {
|
||||
mPolylineOptions = options;
|
||||
}
|
||||
overlayManager.showOrUpdateLine(options);
|
||||
overlayManager.showOrUpdateLine(options,DEFAULT);
|
||||
} else {
|
||||
isExcept = true;
|
||||
}
|
||||
|
||||
@@ -1,44 +0,0 @@
|
||||
package com.mogo.eagle.core.function.impl;
|
||||
|
||||
import android.content.Context;
|
||||
|
||||
import com.alibaba.android.arouter.facade.annotation.Route;
|
||||
import com.mogo.eagle.core.data.constants.MogoServicePaths;
|
||||
import com.mogo.eagle.core.function.api.map.IMogoMapService;
|
||||
import com.mogo.map.MoGoOverlayManager;
|
||||
import com.mogo.map.MogoMapUIController;
|
||||
import com.mogo.map.location.GDLocationClient;
|
||||
import com.mogo.map.location.IMogoGDLocationClient;
|
||||
import com.mogo.map.overlay.IMoGoOverlayManager;
|
||||
import com.mogo.map.uicontroller.IMogoMapUIController;
|
||||
|
||||
/**
|
||||
* @author congtaowang
|
||||
* @since 2019-12-18
|
||||
* <p>
|
||||
* 地图对外地接口
|
||||
*/
|
||||
@Route(path = MogoServicePaths.PATH_SERVICES_MAP)
|
||||
public class MogoMapService implements IMogoMapService {
|
||||
|
||||
//todo 多实例,主动设置IMap对象,下面接口返回对应IMap实例的接口数据
|
||||
|
||||
@Override
|
||||
public IMogoMapUIController getMapUIController() {
|
||||
return MogoMapUIController.getInstance();
|
||||
}
|
||||
|
||||
@Override
|
||||
public IMoGoOverlayManager getOverlayManager() {
|
||||
return MoGoOverlayManager.INSTANCE.overlay();
|
||||
}
|
||||
|
||||
@Override
|
||||
public IMogoGDLocationClient getGDLocationServer() {
|
||||
return GDLocationClient.Companion.getGdLocationClient();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void init(Context context) {
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,38 @@
|
||||
package com.mogo.eagle.core.function.impl
|
||||
|
||||
import android.content.Context
|
||||
import com.alibaba.android.arouter.facade.annotation.Route
|
||||
import com.mogo.map.MoGoOverlayManager.overlay
|
||||
import com.mogo.map.location.GDLocationClient.Companion.gdLocationClient
|
||||
import com.mogo.eagle.core.data.constants.MogoServicePaths
|
||||
import com.mogo.eagle.core.function.api.map.IMogoMapService
|
||||
import com.mogo.map.MogoMap
|
||||
import com.mogo.map.uicontroller.IMogoMapUIController
|
||||
import com.mogo.map.overlay.IMoGoOverlayManager
|
||||
import com.mogo.map.MogoMap.Companion.mapInstance
|
||||
import com.mogo.map.location.IMogoGDLocationClient
|
||||
|
||||
/**
|
||||
* @author congtaowang
|
||||
* @since 2019-12-18
|
||||
*
|
||||
*
|
||||
* 地图对外地接口,多实例情况下,如果某个业务需要在多个地图上展示,需要业务提供监听接口,各个地图实例监听实现
|
||||
*/
|
||||
@Route(path = MogoServicePaths.PATH_SERVICES_MAP)
|
||||
class MogoMapService : IMogoMapService {
|
||||
|
||||
override fun getMapUIController(mapTag:String): IMogoMapUIController {
|
||||
return mapInstance.getMogoMap().uiController
|
||||
}
|
||||
|
||||
override fun getOverlayManager(): IMoGoOverlayManager {
|
||||
return overlay()
|
||||
}
|
||||
|
||||
override fun getGDLocationServer(): IMogoGDLocationClient {
|
||||
return gdLocationClient
|
||||
}
|
||||
|
||||
override fun init(context: Context) {}
|
||||
}
|
||||
@@ -14,6 +14,7 @@ import com.mogo.eagle.core.function.call.autopilot.CallerChassisLocationWGS84Lis
|
||||
import com.mogo.eagle.core.function.call.map.CallerMapUIServiceManager
|
||||
import com.mogo.eagle.core.function.call.setting.CallerSkinModeListenerManager
|
||||
import com.mogo.map.MogoMapView
|
||||
import com.mogo.map.uicontroller.IMogoMapUIController
|
||||
|
||||
|
||||
class MapBizView(context: Context?, attrs: AttributeSet?) : MogoMapView(context, attrs),
|
||||
@@ -60,6 +61,10 @@ class MapBizView(context: Context?, attrs: AttributeSet?) : MogoMapView(context,
|
||||
}
|
||||
}
|
||||
|
||||
fun getUI(): IMogoMapUIController {
|
||||
return uiController
|
||||
}
|
||||
|
||||
override fun onSaveInstanceState(outState: Bundle?) {
|
||||
super.onSaveInstanceState(outState)
|
||||
}
|
||||
@@ -74,9 +79,9 @@ class MapBizView(context: Context?, attrs: AttributeSet?) : MogoMapView(context,
|
||||
|
||||
override fun onSkinModeChange(skinMode: Int) {
|
||||
if (skinMode == 0) {
|
||||
CallerMapUIServiceManager.getMapUIController()?.stepInVrMode(false)
|
||||
getUI().stepInVrMode(false)
|
||||
} else if (skinMode == 1) {
|
||||
CallerMapUIServiceManager.getMapUIController()?.stepInVrMode(true)
|
||||
getUI().stepInVrMode(true)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -107,9 +112,9 @@ class MapBizView(context: Context?, attrs: AttributeSet?) : MogoMapView(context,
|
||||
private fun turn(lightNum: Int) {
|
||||
if (currentLevel != lightNum) {
|
||||
when (lightNum) {
|
||||
0 -> CallerMapUIServiceManager.getMapUIController()?.setCarLightsType(0, 500)
|
||||
1 -> CallerMapUIServiceManager.getMapUIController()?.setCarLightsType(1, 500)
|
||||
2 -> CallerMapUIServiceManager.getMapUIController()?.setCarLightsType(2, 500)
|
||||
0 -> getUI().setCarLightsType(0, 500)
|
||||
1 -> getUI().setCarLightsType(1, 500)
|
||||
2 -> getUI().setCarLightsType(2, 500)
|
||||
}
|
||||
currentLevel = lightNum
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user