[3.4.0-map-sdk] wait to finish
This commit is contained in:
@@ -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