[3.4.0-map-sdk] merge

This commit is contained in:
zhongchao
2023-09-11 18:14:56 +08:00
parent 9f4df04133
commit 94c7b74a81
7 changed files with 66 additions and 68 deletions

View File

@@ -11,9 +11,13 @@ import com.mogo.eagle.core.function.api.autopilot.IMoGoChassisLocationWGS84Liste
import com.mogo.eagle.core.function.api.setting.IMoGoSkinModeChangeListener
import com.mogo.eagle.core.function.call.autopilot.CallerChassisLamplightListenerManager
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.setting.CallerSkinModeListenerManager
import com.mogo.map.MogoMapView
import com.mogo.map.overlay.line.Polyline
import com.mogo.map.overlay.point.Point
import com.mogo.map.overlay.proxy.line.IMapPolylineOverlay
import com.mogo.map.overlay.proxy.point.IMapPointOverlay
import com.mogo.map.uicontroller.IMogoMapUIController
class MapBizView(context: Context?, attrs: AttributeSet?) : MogoMapView(context, attrs),
@@ -48,7 +52,7 @@ class MapBizView(context: Context?, attrs: AttributeSet?) : MogoMapView(context,
//设置旋转手势是否可用。
it.setRotateGesturesEnabled(false)
//设置比例尺控件是否可见
it.setScaleControlsEnabled(true)
it.setScaleControlsEnabled(false)
//设置拖拽手势是否可用。
it.setScrollGesturesEnabled(true)
//设置倾斜手势是否可用。
@@ -60,6 +64,18 @@ class MapBizView(context: Context?, attrs: AttributeSet?) : MogoMapView(context,
}
}
fun getUI(): IMogoMapUIController {
return uiController
}
fun addLine(options:Polyline.Options): IMapPolylineOverlay? {
return map.addLine(options)
}
fun addPoint(options: Point.Options): IMapPointOverlay?{
return map.addPoint(options)
}
override fun onSaveInstanceState(outState: Bundle?) {
super.onSaveInstanceState(outState)
}
@@ -74,9 +90,9 @@ class MapBizView(context: Context?, attrs: AttributeSet?) : MogoMapView(context,
override fun onSkinModeChange(skinMode: Int) {
if (skinMode == 0) {
CallerMapUIServiceManager.getMapUIController()?.stepInVrMode(false)
getUI().stepInDayMode(false)
} else if (skinMode == 1) {
CallerMapUIServiceManager.getMapUIController()?.stepInVrMode(true)
getUI().stepInDayMode(true)
}
}
@@ -107,9 +123,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
}