[3.4.0][视角] 优化旋转动效
This commit is contained in:
@@ -160,7 +160,7 @@ public class V2XRoadEventScenario extends AbsV2XScenario<V2XRoadEventEntity> imp
|
||||
if (isNeedChangeAngle()) {
|
||||
MarkerLocation location = content.getLocation();
|
||||
if (location != null) {
|
||||
CallerVisualAngleManager.INSTANCE.changeAngle(new RoadEvent(content.getLocation().getLon(), content.getLocation().getLat(), content.getLocation().getAngle()));
|
||||
CallerVisualAngleManager.INSTANCE.changeAngle(new RoadEvent(content.getLocation().getLon(), content.getLocation().getLat(), content.getLocation().getAngle(), false));
|
||||
}
|
||||
}
|
||||
if (entity.isNeedAddLine() && !EventTypeEnumNew.TYPE_SOCKET_ROAD_CONGESTION.getPoiType().equals(content.getPoiType())) {
|
||||
|
||||
@@ -7,21 +7,14 @@ import androidx.lifecycle.*
|
||||
import androidx.lifecycle.Lifecycle.Event
|
||||
import androidx.lifecycle.Lifecycle.Event.ON_DESTROY
|
||||
import com.alibaba.android.arouter.facade.annotation.Route
|
||||
import com.mogo.eagle.core.data.config.*
|
||||
import com.mogo.eagle.core.data.constants.MogoServicePaths
|
||||
import com.mogo.eagle.core.data.map.*
|
||||
import com.mogo.eagle.core.function.api.map.angle.*
|
||||
import com.mogo.eagle.core.function.api.map.angle.Scene
|
||||
import com.mogo.eagle.core.function.call.autopilot.*
|
||||
import com.mogo.eagle.core.function.call.map.*
|
||||
import com.mogo.eagle.core.utilcode.kotlin.*
|
||||
import com.mogo.eagle.core.utilcode.mogo.*
|
||||
import com.mogo.eagle.core.utilcode.mogo.logger.*
|
||||
import com.zhidaoauto.map.sdk.open.tools.*
|
||||
import kotlinx.coroutines.*
|
||||
import kotlinx.coroutines.android.*
|
||||
import java.util.*
|
||||
import java.util.concurrent.atomic.*
|
||||
|
||||
@Route(path = MogoServicePaths.PATH_VISUAL_ANGLE)
|
||||
class MoGoVisualAngleChangeProvider: IMoGoVisualAngleChangeProvider {
|
||||
@@ -193,31 +186,26 @@ class MoGoVisualAngleChangeProvider: IMoGoVisualAngleChangeProvider {
|
||||
}
|
||||
}
|
||||
|
||||
@OptIn(InternalCoroutinesApi::class)
|
||||
private fun doChangeAngle(record: Record) {
|
||||
val angle = record.target.angle
|
||||
CallerMapUIServiceManager.getMapUIController()?.also {
|
||||
Log.d(TAG, "--- doChangeAngle ---: ${record.target}")
|
||||
if (record.target !is Default) {
|
||||
record.isDisplay = true
|
||||
kotlinx.coroutines.internal.synchronized(queue) {
|
||||
synchronized(queue) {
|
||||
queue += record
|
||||
}
|
||||
}
|
||||
if (record.target is Default && roadEventFlag) {
|
||||
roadEventFlag = false
|
||||
//it.setLockMode(true)
|
||||
it.setLockMode(true)
|
||||
}
|
||||
if (record.target is RoadEvent) {
|
||||
it.setLockMode(false)
|
||||
roadEventFlag = true
|
||||
Log.d("TTTTTT", "scene:${record.target}")
|
||||
// scope.launch {
|
||||
// delay(500)
|
||||
// it.changeMapVisualAngle(angle, null)
|
||||
// }
|
||||
it.animateTo(record.target.poi_lon, record.target.poi_lat, record.target.poi_angle.toFloat(), 1000, true)
|
||||
// it.animateTo(record.target.poi_lon, record.target.poi_lat, 0f, 1000, true)
|
||||
scope.launch {
|
||||
it.animateTo(0.0 ,0.0,1f, 0f ,11.5f,28f,3000,true)
|
||||
}
|
||||
|
||||
} else {
|
||||
it.changeMapVisualAngle(angle, null)
|
||||
|
||||
Reference in New Issue
Block a user