优化显示逻辑
This commit is contained in:
@@ -28,6 +28,7 @@ import com.mogo.map.search.geo.MogoGeocodeResult;
|
||||
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.constants.DataTypes;
|
||||
import com.mogo.module.common.dialog.WMDialog;
|
||||
import com.mogo.module.common.drawer.AdasRecognizedResultDrawer;
|
||||
import com.mogo.module.common.drawer.SnapshotSetDataDrawer;
|
||||
@@ -562,6 +563,23 @@ public class MockIntentHandler implements IntentHandler {
|
||||
mLocationMockHandler.sendEmptyMessageDelayed( 3, 0L );
|
||||
// mLocationMockHandler.sendEmptyMessageDelayed( 5, 0L );
|
||||
break;
|
||||
case 48:
|
||||
MogoMarkerOptions options = new MogoMarkerOptions()
|
||||
.owner( DataTypes.TYPE_MARKER_ADAS )
|
||||
.anchor( 0.5f, 0.5f )
|
||||
.set3DMode( true )
|
||||
.position( new MogoLatLng( 39.981971055705,116.41150648393 ) )
|
||||
.gps( true )
|
||||
.controlAngle( true )
|
||||
.icon3DRes( R.raw.cargrey )
|
||||
.rotate( ( float ) 358.526123 );
|
||||
IMogoMarker marker = MogoApisHandler.getInstance().getApis().getMapServiceApi().getMarkerManager( context ).addMarker( DataTypes.TYPE_MARKER_ADAS, options );
|
||||
List<MogoLatLng> latLngs = new ArrayList<>( );
|
||||
latLngs.add( new MogoLatLng( 39.981971055705,116.41150648393 ) );
|
||||
latLngs.add( new MogoLatLng( 39.981990561932,116.412893641626 ) );
|
||||
marker.startSmoothInMs(latLngs, 20_000L );
|
||||
break;
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -647,6 +665,17 @@ public class MockIntentHandler implements IntentHandler {
|
||||
}
|
||||
br5 = null;
|
||||
}
|
||||
} else if ( msg.what == 48 ) {
|
||||
try {
|
||||
handleMockLocationIntent48();
|
||||
} catch ( Exception e ) {
|
||||
try {
|
||||
br48.close();
|
||||
} catch ( IOException ex ) {
|
||||
ex.printStackTrace();
|
||||
}
|
||||
br48 = null;
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
@@ -669,6 +698,25 @@ public class MockIntentHandler implements IntentHandler {
|
||||
return true;
|
||||
}
|
||||
|
||||
private BufferedReader br48;
|
||||
int count = 0;
|
||||
|
||||
private boolean handleMockLocationIntent48() throws Exception {
|
||||
if ( br48 == null ) {
|
||||
br48 = new BufferedReader( new InputStreamReader( AbsMogoApplication.getApp().getAssets().open( "loc3.txt" ) ) );
|
||||
}
|
||||
final long start = System.currentTimeMillis();
|
||||
String line = br48.readLine();
|
||||
if ( line == null ) {
|
||||
throw new Exception( "end of file." );
|
||||
}
|
||||
JSONObject jo = new JSONObject( line );
|
||||
MarkerServiceHandler.getApis().getMapServiceApi().getMapUIController().syncLocation2Map( jo );
|
||||
Logger.i( "mock-timer-loc", "cost " + ( System.currentTimeMillis() - start ) + "ms: count=%s", ++count );
|
||||
mLocationMockHandler.sendEmptyMessageDelayed( 48, 100L );
|
||||
return true;
|
||||
}
|
||||
|
||||
private BufferedReader br2;
|
||||
|
||||
private boolean handleMockSnapshotIntent() throws Exception {
|
||||
@@ -688,8 +736,8 @@ public class MockIntentHandler implements IntentHandler {
|
||||
// double[] coor = CoordinateUtils.transformWgsToGcj( cloudRoadData.getLat(), cloudRoadData.getLon() );
|
||||
// cloudRoadData.setLon( coor[0] );
|
||||
// cloudRoadData.setLat( coor[1] );
|
||||
cloudRoadData.setWgslat(cloudRoadData.getLat());
|
||||
cloudRoadData.setWgslon(cloudRoadData.getLon());
|
||||
cloudRoadData.setWgslat( cloudRoadData.getLat() );
|
||||
cloudRoadData.setWgslon( cloudRoadData.getLon() );
|
||||
allList.add( cloudRoadData );
|
||||
data.setAllList( allList );
|
||||
|
||||
|
||||
Reference in New Issue
Block a user