|
|
|
|
@@ -11,7 +11,6 @@ import com.mogo.eagle.core.data.constants.MoGoFragmentPaths
|
|
|
|
|
import com.mogo.eagle.core.data.enums.DataSourceType
|
|
|
|
|
import com.mogo.eagle.core.data.map.CenterLine
|
|
|
|
|
import com.mogo.eagle.core.function.api.autopilot.IMoGoChassisLamplightListener
|
|
|
|
|
import com.mogo.eagle.core.function.api.autopilot.IMoGoPlanningRottingListener
|
|
|
|
|
import com.mogo.eagle.core.function.api.map.hd.IMoGoMapFragmentProvider
|
|
|
|
|
import com.mogo.eagle.core.function.api.setting.IMoGoSkinModeChangeListener
|
|
|
|
|
import com.mogo.eagle.core.function.business.MapPointCloudSubscriber
|
|
|
|
|
@@ -19,22 +18,16 @@ import com.mogo.eagle.core.function.business.SpeedLimitDataManager
|
|
|
|
|
import com.mogo.eagle.core.function.business.identify.MapIdentifySubscriber
|
|
|
|
|
import com.mogo.eagle.core.function.business.routeoverlay.MogoRouteOverlayManager
|
|
|
|
|
import com.mogo.eagle.core.function.call.autopilot.CallerChassisLamplightListenerManager
|
|
|
|
|
import com.mogo.eagle.core.function.call.autopilot.CallerPlanningRottingListenerManager
|
|
|
|
|
import com.mogo.eagle.core.function.call.hmi.CallerHmiManager.showBrakeLight
|
|
|
|
|
import com.mogo.eagle.core.function.call.hmi.CallerHmiManager.showTurnLight
|
|
|
|
|
import com.mogo.eagle.core.function.call.map.CallerHDMapManager
|
|
|
|
|
import com.mogo.eagle.core.function.call.setting.CallerSkinModeListenerManager
|
|
|
|
|
import com.mogo.eagle.core.function.datacenter.location.IMoGoLocationListener
|
|
|
|
|
import com.mogo.eagle.core.function.datacenter.location.MoGoLocationManager
|
|
|
|
|
import com.mogo.eagle.core.function.overview.InfStructureManager
|
|
|
|
|
import com.mogo.eagle.core.function.overview.InfStructureManager.savePlanningData
|
|
|
|
|
import com.mogo.eagle.core.function.overview.obtainViewModel
|
|
|
|
|
import com.mogo.eagle.core.function.overview.vm.OverViewModel
|
|
|
|
|
import com.mogo.eagle.core.utilcode.mogo.logger.CallerLogger.d
|
|
|
|
|
import com.mogo.eagle.core.utilcode.mogo.logger.CallerLogger.e
|
|
|
|
|
import com.mogo.eagle.core.utilcode.mogo.logger.scene.SceneConstant
|
|
|
|
|
import com.mogo.eagle.core.utilcode.mogo.storage.SharedPrefsMgr
|
|
|
|
|
import com.mogo.eagle.core.utilcode.util.UiThreadHandler
|
|
|
|
|
import com.mogo.eagle.core.utilcode.util.Utils
|
|
|
|
|
import com.mogo.map.IMogoMap
|
|
|
|
|
import com.mogo.map.MogoMapView
|
|
|
|
|
@@ -55,7 +48,6 @@ class MapFragment : MvpFragment<MapView?, MapPresenter?>(),
|
|
|
|
|
IMoGoMapFragmentProvider,
|
|
|
|
|
IMoGoSkinModeChangeListener,
|
|
|
|
|
IMoGoLocationListener,
|
|
|
|
|
IMoGoPlanningRottingListener,
|
|
|
|
|
IMoGoChassisLamplightListener {
|
|
|
|
|
|
|
|
|
|
private var mMogoMapView: MogoMapView? = null
|
|
|
|
|
@@ -113,7 +105,6 @@ class MapFragment : MvpFragment<MapView?, MapPresenter?>(),
|
|
|
|
|
}
|
|
|
|
|
// 添加换肤监听
|
|
|
|
|
CallerSkinModeListenerManager.addListener(Companion.functionName, this)
|
|
|
|
|
CallerPlanningRottingListenerManager.addListener(Companion.functionName, this)
|
|
|
|
|
MoGoLocationManager.addListener(Companion.functionName, this)
|
|
|
|
|
CallerChassisLamplightListenerManager.addListener(Companion.functionName, this)
|
|
|
|
|
}
|
|
|
|
|
@@ -200,15 +191,6 @@ class MapFragment : MvpFragment<MapView?, MapPresenter?>(),
|
|
|
|
|
MogoRouteOverlayManager.getInstance().init()
|
|
|
|
|
MapPointCloudSubscriber.instance
|
|
|
|
|
SpeedLimitDataManager.getInstance().start()
|
|
|
|
|
|
|
|
|
|
// TODO GD地图业务需要与高精地图业务拆开 --- 扶风
|
|
|
|
|
queryInfStructure()
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
private fun queryInfStructure() {
|
|
|
|
|
val viewModel = this.obtainViewModel(OverViewModel::class.java)
|
|
|
|
|
viewModel.infStructuresMap.observe(this.viewLifecycleOwner) { t -> InfStructureManager.saveData(t) }
|
|
|
|
|
viewModel.fetchInfStructures()
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
override fun getUIController(): IMogoMapUIController {
|
|
|
|
|
@@ -217,7 +199,6 @@ class MapFragment : MvpFragment<MapView?, MapPresenter?>(),
|
|
|
|
|
|
|
|
|
|
override fun onDestroyView() {
|
|
|
|
|
CallerSkinModeListenerManager.removeListener(Companion.functionName)
|
|
|
|
|
CallerPlanningRottingListenerManager.removeListener(Companion.functionName)
|
|
|
|
|
MoGoLocationManager.removeListener(Companion.functionName)
|
|
|
|
|
CallerChassisLamplightListenerManager.removeListener(Companion.functionName)
|
|
|
|
|
|
|
|
|
|
@@ -334,11 +315,6 @@ class MapFragment : MvpFragment<MapView?, MapPresenter?>(),
|
|
|
|
|
override val functionName: String
|
|
|
|
|
get() = functionName
|
|
|
|
|
|
|
|
|
|
// TODO 全览模式需要自己监听 --- 扶风
|
|
|
|
|
override fun onAutopilotRotting(globalPathResp: MessagePad.GlobalPathResp?) {
|
|
|
|
|
UiThreadHandler.post { savePlanningData(globalPathResp!!.wayPointsList) }
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
private var turnLightTimes = 0
|
|
|
|
|
private var isOnTurnLight = false
|
|
|
|
|
private var turnLight = 0
|
|
|
|
|
|