[6.5.0][视角变换] 添加自车相对屏幕位置设定
This commit is contained in:
@@ -14,6 +14,9 @@ import com.mogo.eagle.core.function.angle.scenes.Roma
|
||||
import com.mogo.eagle.core.function.api.map.angle.*
|
||||
import com.mogo.eagle.core.function.api.map.angle.IMoGoVisualAngleChangeProvider.OnMoGoVisualAngleSceneChangeListener
|
||||
import com.mogo.eagle.core.function.api.map.angle.Scene
|
||||
import com.mogo.eagle.core.function.api.map.angle.ScreenToOriginDis.DEFAULT
|
||||
import com.mogo.eagle.core.function.api.map.angle.ScreenToOriginDis.DOWN
|
||||
import com.mogo.eagle.core.function.api.map.angle.ScreenToOriginDis.UP
|
||||
import com.mogo.eagle.core.function.api.map.road.IMoGoMapRoadListener
|
||||
import com.mogo.eagle.core.function.call.autopilot.*
|
||||
import com.mogo.eagle.core.function.call.map.*
|
||||
@@ -189,6 +192,12 @@ class MoGoVisualAngleChangeProvider: IMoGoVisualAngleChangeProvider {
|
||||
} else {
|
||||
CallerMapUIServiceManager.getMapUIController()?.setAllGesturesEnabled(true)
|
||||
}
|
||||
val screenToOriginDis = target.getScreenToOriginDis()
|
||||
when(screenToOriginDis) {
|
||||
DEFAULT -> CallerMapUIServiceManager.getMapUIController()?.setScreenToOriginDis(4.0f)
|
||||
UP -> CallerMapUIServiceManager.getMapUIController()?.setScreenToOriginDis(3.0f)
|
||||
DOWN -> CallerMapUIServiceManager.getMapUIController()?.setScreenToOriginDis(5.0f)
|
||||
}
|
||||
if (target !is Roma) {
|
||||
it.changeMapVisualAngle(angle, null)
|
||||
}
|
||||
|
||||
@@ -1,6 +1,8 @@
|
||||
package com.mogo.eagle.core.function.angle.scenes
|
||||
|
||||
import com.mogo.eagle.core.function.api.map.angle.Scene
|
||||
import com.mogo.eagle.core.function.api.map.angle.ScreenToOriginDis
|
||||
import com.mogo.eagle.core.function.api.map.angle.ScreenToOriginDis.DOWN
|
||||
import com.mogo.map.uicontroller.VisualAngleMode
|
||||
import com.mogo.map.uicontroller.VisualAngleMode.MAP_STYLE_VR_ANGLE_CROSS_NEW
|
||||
import java.util.concurrent.TimeUnit
|
||||
@@ -28,4 +30,8 @@ class CrossRoad(private val delayTime: Long = 0, private val unit: TimeUnit = Ti
|
||||
override fun toString(): String {
|
||||
return "CrossRoad(delayTime=${delayTime}, priority=${priority}, displayThreshold: ${displayThreshold}, priority=${priority})"
|
||||
}
|
||||
|
||||
override fun getScreenToOriginDis(): ScreenToOriginDis {
|
||||
return DOWN
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
package com.mogo.eagle.core.function.api.map.angle
|
||||
|
||||
import com.mogo.eagle.core.function.api.map.angle.ScreenToOriginDis.DEFAULT
|
||||
import com.mogo.map.uicontroller.*
|
||||
|
||||
interface IAttach {
|
||||
@@ -9,8 +10,15 @@ interface IAttach {
|
||||
val delay: Long // 延迟多长时间切换
|
||||
val isCanSwitch: Boolean // 是否可切换
|
||||
val isCanTouch: Boolean // 是否响应地图触摸事件
|
||||
|
||||
fun getScreenToOriginDis(): ScreenToOriginDis = DEFAULT
|
||||
}
|
||||
|
||||
enum class ScreenToOriginDis {
|
||||
DEFAULT,
|
||||
UP,
|
||||
DOWN
|
||||
}
|
||||
|
||||
interface Scene: IAttach
|
||||
|
||||
|
||||
Reference in New Issue
Block a user