[2.13.0-arch-opt] add note

This commit is contained in:
zhongchao
2023-01-14 14:24:23 +08:00
parent 63d9459352
commit 245bde74d2
6 changed files with 9 additions and 310 deletions

View File

@@ -47,9 +47,7 @@ import mogo.telematics.pad.MessagePad
* @author donghongyu
* @since 2021-11-09
* 高精度地图层UI
*
*
* 地图图层,地图操作都在这个图层完成
* 地图图层,地图操作都在这个图层完成 //todo 以view方式进行提供
*/
@Route(path = MoGoFragmentPaths.PATH_FRAGMENT_MAP)
class MapFragment : MvpFragment<MapView?, MapPresenter?>(),
@@ -65,7 +63,7 @@ class MapFragment : MvpFragment<MapView?, MapPresenter?>(),
private val mIsControllerByOthersStatus = false
companion object {
val functionName = "MapFragment"
const val functionName = "MapFragment"
/**
* sight mode
@@ -128,7 +126,7 @@ class MapFragment : MvpFragment<MapView?, MapPresenter?>(),
override fun onViewCreated(view: View, savedInstanceState: Bundle?) {
super.onViewCreated(view, savedInstanceState)
initMapView()
queryInfStructure()
initMapBiz()
}
override fun onSaveInstanceState(outState: Bundle) {
@@ -201,31 +199,20 @@ class MapFragment : MvpFragment<MapView?, MapPresenter?>(),
//设置双指缩放手势是否可用。
uiSettings.setZoomGesturesEnabled(true)
}
}
private fun initMapBiz() {
// TODO 临时初始化地图监听工控机、OBU等数据监听器用于感知元素绘制
MapIdentifySubscriber.instance
MogoRouteOverlayManager.getInstance().init()
MapPointCloudSubscriber.instance
// TODO GD地图业务需要与高精地图业务拆开 --- 扶风
queryInfStructure()
}
private fun queryInfStructure() {
val viewModel = this.obtainViewModel(OverViewModel::class.java)
// viewModel.getInfStructures().observe(this.getViewLifecycleOwner(), infrastructures -> {
// if (isFirst) {
// for (Infrastructure entity : infrastructures) {
// Double lat = Double.parseDouble(entity.getLat());
// Double lon = Double.parseDouble(entity.getLon());
// if (lat < 0 || lat > 90 || lon < 0 || lon > 180) {
// continue;
// }
// String geoHash = GeoHash.withCharacterPrecision(lat, lon, 7).toBase32();
// viewModel.updateGeoHash(entity.getId(), geoHash);
// }
// isFirst = false;
// }
// });
viewModel.infStructuresMap.observe(this.viewLifecycleOwner) { t -> InfStructureManager.saveData(t) }
viewModel.fetchInfStructures()
}
@@ -352,6 +339,7 @@ class MapFragment : MvpFragment<MapView?, MapPresenter?>(),
override val functionName: String
get() = functionName
// TODO 全览模式需要自己监听 --- 扶风
override fun onAutopilotRotting(globalPathResp: MessagePad.GlobalPathResp?) {
UiThreadHandler.post { savePlanningData(globalPathResp!!.wayPointsList) }
}