opt
This commit is contained in:
@@ -187,25 +187,30 @@ class SnapshotSetDataDrawer extends BaseDrawer implements IMogoMarkerClickListen
|
||||
}
|
||||
}
|
||||
|
||||
if ( ( lastPosition != null || lastPosition.equals( cloudRoadData ) ) && !DebugConfig.isNotSmooth() ) {
|
||||
List< MogoLatLng > points = new ArrayList<>();
|
||||
points.add( new MogoLatLng( lastPosition.getLat(), lastPosition.getLon() ) );
|
||||
if ( cloudRoadData.getCoordinates() != null && !cloudRoadData.getCoordinates().isEmpty() ) {
|
||||
for ( CloudLocationInfo coordinate : cloudRoadData.getCoordinates() ) {
|
||||
points.add( new MogoLatLng( coordinate.getLat(), coordinate.getLon() ) );
|
||||
}
|
||||
if ( lastPosition != null && !DebugConfig.isNotSmooth() ) {
|
||||
if ( lastPosition.equals( cloudRoadData ) ) {
|
||||
marker.setRotateAngle( ( float ) cloudRoadData.getHeading() );
|
||||
marker.setPosition( cloudRoadData.getLat(), cloudRoadData.getLon() );
|
||||
} else {
|
||||
points.add( new MogoLatLng( cloudRoadData.getLat(), cloudRoadData.getLon() ) );
|
||||
List< MogoLatLng > points = new ArrayList<>();
|
||||
points.add( new MogoLatLng( lastPosition.getLat(), lastPosition.getLon() ) );
|
||||
if ( cloudRoadData.getCoordinates() != null && !cloudRoadData.getCoordinates().isEmpty() ) {
|
||||
for ( CloudLocationInfo coordinate : cloudRoadData.getCoordinates() ) {
|
||||
points.add( new MogoLatLng( coordinate.getLat(), coordinate.getLon() ) );
|
||||
}
|
||||
} else {
|
||||
points.add( new MogoLatLng( cloudRoadData.getLat(), cloudRoadData.getLon() ) );
|
||||
}
|
||||
long interval = cloudRoadData.getSystemTime() - lastPosition.getSystemTime();
|
||||
long interval2 = cloudRoadData.getSatelliteTime() - lastPosition.getSatelliteTime();
|
||||
interval2 = interval < interval2 || interval2 == 0 ? interval : interval2;
|
||||
if ( interval2 < 45 ) {
|
||||
interval2 = 45;
|
||||
}
|
||||
interval2 -= 25;
|
||||
marker.startSmoothInMs( points, interval2 );
|
||||
Logger.d( TAG, "平滑移动 - %s duration = %s", uniqueKey, interval2 );
|
||||
}
|
||||
long interval = cloudRoadData.getSystemTime() - lastPosition.getSystemTime();
|
||||
long interval2 = cloudRoadData.getSatelliteTime() - lastPosition.getSatelliteTime();
|
||||
interval2 = interval < interval2 || interval2 == 0 ? interval : interval2;
|
||||
if ( interval2 < 45 ) {
|
||||
interval2 = 45;
|
||||
}
|
||||
interval2 -= 25;
|
||||
marker.startSmoothInMs( points, interval2 );
|
||||
Logger.d( TAG, "平滑移动 - %s duration = %s", uniqueKey, interval2 );
|
||||
} else {
|
||||
marker.setRotateAngle( ( float ) cloudRoadData.getHeading() );
|
||||
marker.setPosition( cloudRoadData.getLat(), cloudRoadData.getLon() );
|
||||
|
||||
@@ -26,8 +26,10 @@ import com.mogo.map.search.geo.MogoRegeocodeResult;
|
||||
import com.mogo.map.search.geo.query.MogoRegeocodeQuery;
|
||||
import com.mogo.module.common.MogoApisHandler;
|
||||
import com.mogo.module.common.dialog.WMDialog;
|
||||
import com.mogo.module.common.drawer.SnapshotSetDataDrawer;
|
||||
import com.mogo.module.service.MarkerServiceHandler;
|
||||
import com.mogo.module.service.R;
|
||||
import com.mogo.realtime.entity.MogoSnapshotSetData;
|
||||
import com.mogo.service.adas.RemoteControlAutoPilotParameters;
|
||||
import com.mogo.service.adas.entity.ADASCarStateInfo;
|
||||
import com.mogo.service.entrance.ButtonIndex;
|
||||
@@ -541,6 +543,10 @@ public class MockIntentHandler implements IntentHandler {
|
||||
.getMapUIController()
|
||||
.openVrMode( false );
|
||||
break;
|
||||
case 46:
|
||||
String json = "{\"allList\":[{\"type\":3,\"uuid\":\"10009-5152\",\"lat\":40.1990809296,\"lon\":116.7393252195,\"speed\":0.0,\"heading\":0.0,\"systemTime\":1614329151909,\"vehicleType\":0,\"distance\":576.0,\"fromType\":3,\"isOnline\":0},{\"type\":3,\"uuid\":\"10009-5161\",\"lat\":40.1990827227,\"lon\":116.739325826,\"speed\":0.0,\"heading\":0.0,\"systemTime\":1614329151909,\"vehicleType\":0,\"distance\":576.0,\"fromType\":3,\"isOnline\":0}],\"nearList\":[],\"time\":1614329152238}";
|
||||
SnapshotSetDataDrawer.getInstance().renderSnapshotData( GsonUtil.objectFromJson( json, MogoSnapshotSetData.class ), false );
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user