add tileId in uploadData
This commit is contained in:
@@ -3,7 +3,6 @@ package com.mogo.map;
|
||||
import android.graphics.Point;
|
||||
import android.graphics.Rect;
|
||||
import android.location.Location;
|
||||
import android.util.Log;
|
||||
import android.view.View;
|
||||
import android.view.animation.Interpolator;
|
||||
|
||||
@@ -38,9 +37,9 @@ public class MogoMapUIController implements IMogoMapUIController {
|
||||
}
|
||||
|
||||
public static MogoMapUIController getInstance() {
|
||||
if ( sInstance == null ) {
|
||||
synchronized ( MogoMapUIController.class ) {
|
||||
if ( sInstance == null ) {
|
||||
if (sInstance == null) {
|
||||
synchronized (MogoMapUIController.class) {
|
||||
if (sInstance == null) {
|
||||
sInstance = new MogoMapUIController();
|
||||
}
|
||||
}
|
||||
@@ -48,7 +47,7 @@ public class MogoMapUIController implements IMogoMapUIController {
|
||||
return sInstance;
|
||||
}
|
||||
|
||||
public void setDelegate( IMogoMapUIController mDelegate ) {
|
||||
public void setDelegate(IMogoMapUIController mDelegate) {
|
||||
this.mDelegate = mDelegate;
|
||||
}
|
||||
|
||||
@@ -57,77 +56,77 @@ public class MogoMapUIController implements IMogoMapUIController {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setTrafficEnabled( boolean visible ) {
|
||||
public void setTrafficEnabled(boolean visible) {
|
||||
initDelegate();
|
||||
if ( mDelegate != null ) {
|
||||
mDelegate.setTrafficEnabled( visible );
|
||||
if (mDelegate != null) {
|
||||
mDelegate.setTrafficEnabled(visible);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public MapControlResult changeZoom( boolean zoom ) {
|
||||
public MapControlResult changeZoom(boolean zoom) {
|
||||
initDelegate();
|
||||
if ( mDelegate != null ) {
|
||||
return mDelegate.changeZoom( zoom );
|
||||
if (mDelegate != null) {
|
||||
return mDelegate.changeZoom(zoom);
|
||||
}
|
||||
return MapControlResult.ERROR;
|
||||
}
|
||||
|
||||
@Override
|
||||
public MapControlResult changeZoom( float zoom ) {
|
||||
public MapControlResult changeZoom(float zoom) {
|
||||
initDelegate();
|
||||
if ( mDelegate != null ) {
|
||||
return mDelegate.changeZoom( zoom );
|
||||
if (mDelegate != null) {
|
||||
return mDelegate.changeZoom(zoom);
|
||||
}
|
||||
return MapControlResult.ERROR;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void changeMapMode( EnumMapUI mode ) {
|
||||
public void changeMapMode(EnumMapUI mode) {
|
||||
initDelegate();
|
||||
if ( mDelegate != null ) {
|
||||
Logger.d( TAG, "set type: %s", mode.name() );
|
||||
mDelegate.changeMapMode( mode );
|
||||
if (mDelegate != null) {
|
||||
Logger.d(TAG, "set type: %s", mode.name());
|
||||
mDelegate.changeMapMode(mode);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public void moveToCenter( MogoLatLng latLng, boolean animate ) {
|
||||
public void moveToCenter(MogoLatLng latLng, boolean animate) {
|
||||
initDelegate();
|
||||
if ( mDelegate != null ) {
|
||||
mDelegate.moveToCenter( latLng, animate );
|
||||
if (mDelegate != null) {
|
||||
mDelegate.moveToCenter(latLng, animate);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void showMyLocation( boolean visible ) {
|
||||
public void showMyLocation(boolean visible) {
|
||||
initDelegate();
|
||||
if ( mDelegate != null ) {
|
||||
mDelegate.showMyLocation( visible );
|
||||
if (mDelegate != null) {
|
||||
mDelegate.showMyLocation(visible);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void emphasizeMyLocation() {
|
||||
initDelegate();
|
||||
if ( mDelegate != null ) {
|
||||
if (mDelegate != null) {
|
||||
mDelegate.emphasizeMyLocation();
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void showMyLocation( View view ) {
|
||||
public void showMyLocation(View view) {
|
||||
initDelegate();
|
||||
if ( mDelegate != null ) {
|
||||
mDelegate.showMyLocation( view );
|
||||
if (mDelegate != null) {
|
||||
mDelegate.showMyLocation(view);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void recoverLockMode() {
|
||||
initDelegate();
|
||||
if ( mDelegate != null ) {
|
||||
if (mDelegate != null) {
|
||||
mDelegate.recoverLockMode();
|
||||
}
|
||||
}
|
||||
@@ -135,31 +134,31 @@ public class MogoMapUIController implements IMogoMapUIController {
|
||||
@Override
|
||||
public void loseLockMode() {
|
||||
initDelegate();
|
||||
if ( mDelegate != null ) {
|
||||
if (mDelegate != null) {
|
||||
mDelegate.loseLockMode();
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setLockZoom( int var1 ) {
|
||||
public void setLockZoom(int var1) {
|
||||
initDelegate();
|
||||
if ( mDelegate != null ) {
|
||||
mDelegate.setLockZoom( var1 );
|
||||
if (mDelegate != null) {
|
||||
mDelegate.setLockZoom(var1);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void displayOverview( Rect bounds ) {
|
||||
public void displayOverview(Rect bounds) {
|
||||
initDelegate();
|
||||
if ( mDelegate != null ) {
|
||||
mDelegate.displayOverview( bounds );
|
||||
if (mDelegate != null) {
|
||||
mDelegate.displayOverview(bounds);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public float getScalePerPixel() {
|
||||
initDelegate();
|
||||
if ( mDelegate != null ) {
|
||||
if (mDelegate != null) {
|
||||
return mDelegate.getScalePerPixel();
|
||||
}
|
||||
return 0;
|
||||
@@ -168,7 +167,7 @@ public class MogoMapUIController implements IMogoMapUIController {
|
||||
@Override
|
||||
public float getZoomLevel() {
|
||||
initDelegate();
|
||||
if ( mDelegate != null ) {
|
||||
if (mDelegate != null) {
|
||||
return mDelegate.getZoomLevel();
|
||||
}
|
||||
return 0;
|
||||
@@ -177,7 +176,7 @@ public class MogoMapUIController implements IMogoMapUIController {
|
||||
@Override
|
||||
public float getRoadWidth(double lon, double lat, float angle, boolean isGpsLocation, boolean isRTK) {
|
||||
initDelegate();
|
||||
if ( mDelegate != null ) {
|
||||
if (mDelegate != null) {
|
||||
return mDelegate.getRoadWidth(lon, lat, angle, isGpsLocation, isRTK);
|
||||
}
|
||||
|
||||
@@ -187,7 +186,7 @@ public class MogoMapUIController implements IMogoMapUIController {
|
||||
@Override
|
||||
public MogoLatLng getCameraNorthEastPosition() {
|
||||
initDelegate();
|
||||
if ( mDelegate != null ) {
|
||||
if (mDelegate != null) {
|
||||
return mDelegate.getCameraNorthEastPosition();
|
||||
}
|
||||
return null;
|
||||
@@ -196,7 +195,7 @@ public class MogoMapUIController implements IMogoMapUIController {
|
||||
@Override
|
||||
public MogoLatLng getCameraSouthWestPosition() {
|
||||
initDelegate();
|
||||
if ( mDelegate != null ) {
|
||||
if (mDelegate != null) {
|
||||
return mDelegate.getCameraSouthWestPosition();
|
||||
}
|
||||
return null;
|
||||
@@ -205,75 +204,75 @@ public class MogoMapUIController implements IMogoMapUIController {
|
||||
@Override
|
||||
public MogoLatLng getWindowCenterLocation() {
|
||||
initDelegate();
|
||||
if ( mDelegate != null ) {
|
||||
if (mDelegate != null) {
|
||||
return mDelegate.getWindowCenterLocation();
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setPointToCenter( double mapCenterX, double mapCenterY ) {
|
||||
public void setPointToCenter(double mapCenterX, double mapCenterY) {
|
||||
initDelegate();
|
||||
if ( mDelegate != null ) {
|
||||
mDelegate.setPointToCenter( mapCenterX, mapCenterY );
|
||||
if (mDelegate != null) {
|
||||
mDelegate.setPointToCenter(mapCenterX, mapCenterY);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public Point getLocationPointInScreen( MogoLatLng latLng ) {
|
||||
public Point getLocationPointInScreen(MogoLatLng latLng) {
|
||||
initDelegate();
|
||||
if ( mDelegate != null ) {
|
||||
return mDelegate.getLocationPointInScreen( latLng );
|
||||
if (mDelegate != null) {
|
||||
return mDelegate.getLocationPointInScreen(latLng);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public MogoLatLng getLocationMogoLatLngInScreen( Point point ) {
|
||||
public MogoLatLng getLocationMogoLatLngInScreen(Point point) {
|
||||
initDelegate();
|
||||
if ( mDelegate != null ) {
|
||||
return mDelegate.getLocationMogoLatLngInScreen( point );
|
||||
if (mDelegate != null) {
|
||||
return mDelegate.getLocationMogoLatLngInScreen(point);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void startJumpAnimation( IMogoMarker marker, float high, Interpolator interpolator, long duration ) {
|
||||
public void startJumpAnimation(IMogoMarker marker, float high, Interpolator interpolator, long duration) {
|
||||
initDelegate();
|
||||
if ( mDelegate != null ) {
|
||||
mDelegate.startJumpAnimation( marker, high, interpolator, duration );
|
||||
if (mDelegate != null) {
|
||||
mDelegate.startJumpAnimation(marker, high, interpolator, duration);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setRenderFps( int fps ) {
|
||||
public void setRenderFps(int fps) {
|
||||
initDelegate();
|
||||
if ( mDelegate != null ) {
|
||||
mDelegate.setRenderFps( fps );
|
||||
if (mDelegate != null) {
|
||||
mDelegate.setRenderFps(fps);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void showBounds( String tag, MogoLatLng carPosition, List< MogoLatLng > lonLats, Rect bound, boolean lockCarPosition ) {
|
||||
public void showBounds(String tag, MogoLatLng carPosition, List<MogoLatLng> lonLats, Rect bound, boolean lockCarPosition) {
|
||||
initDelegate();
|
||||
if ( mDelegate != null ) {
|
||||
mDelegate.showBounds( tag, carPosition, lonLats, bound, lockCarPosition );
|
||||
if (mDelegate != null) {
|
||||
mDelegate.showBounds(tag, carPosition, lonLats, bound, lockCarPosition);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void forceRender() {
|
||||
initDelegate();
|
||||
if ( mDelegate != null ) {
|
||||
if (mDelegate != null) {
|
||||
mDelegate.forceRender();
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public float calculateLineDistance( MogoLatLng p1, MogoLatLng p2 ) throws Exception {
|
||||
public float calculateLineDistance(MogoLatLng p1, MogoLatLng p2) throws Exception {
|
||||
initDelegate();
|
||||
if ( mDelegate != null ) {
|
||||
return mDelegate.calculateLineDistance( p1, p2 );
|
||||
if (mDelegate != null) {
|
||||
return mDelegate.calculateLineDistance(p1, p2);
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
@@ -281,67 +280,72 @@ public class MogoMapUIController implements IMogoMapUIController {
|
||||
@Override
|
||||
public EnumMapUI getCurrentUiMode() {
|
||||
initDelegate();
|
||||
if ( mDelegate != null ) {
|
||||
if (mDelegate != null) {
|
||||
return mDelegate.getCurrentUiMode();
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void changeMyLocation( Location location ) {
|
||||
public void changeMyLocation(Location location) {
|
||||
initDelegate();
|
||||
if ( mDelegate != null ) {
|
||||
mDelegate.changeMyLocation( location );
|
||||
if (mDelegate != null) {
|
||||
mDelegate.changeMyLocation(location);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isCarLocked() {
|
||||
initDelegate();
|
||||
if ( mDelegate != null ) {
|
||||
if (mDelegate != null) {
|
||||
return mDelegate.isCarLocked();
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setCarCursorOption( CarCursorOption option ) {
|
||||
public void setCarCursorOption(CarCursorOption option) {
|
||||
initDelegate();
|
||||
if ( mDelegate != null ) {
|
||||
mDelegate.setCarCursorOption( option );
|
||||
if (mDelegate != null) {
|
||||
mDelegate.setCarCursorOption(option);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public MapCameraPosition getMapCameraPosition() {
|
||||
initDelegate();
|
||||
if ( mDelegate != null ) {
|
||||
if (mDelegate != null) {
|
||||
return mDelegate.getMapCameraPosition();
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void changeBearing( float bearing ) {
|
||||
public void changeBearing(float bearing) {
|
||||
initDelegate();
|
||||
if ( mDelegate != null ) {
|
||||
mDelegate.changeBearing( bearing );
|
||||
if (mDelegate != null) {
|
||||
mDelegate.changeBearing(bearing);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void rtkEnable( boolean enable ) {
|
||||
public long getTileId(double lon, double lat) {
|
||||
return mDelegate.getTileId(lon, lat);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void rtkEnable(boolean enable) {
|
||||
initDelegate();
|
||||
if ( mDelegate != null ) {
|
||||
mDelegate.rtkEnable( enable );
|
||||
if (mDelegate != null) {
|
||||
mDelegate.rtkEnable(enable);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void syncLocation2Map( JSONObject data ) {
|
||||
public void syncLocation2Map(JSONObject data) {
|
||||
initDelegate();
|
||||
if ( mDelegate != null ) {
|
||||
mDelegate.syncLocation2Map( data );
|
||||
if (mDelegate != null) {
|
||||
mDelegate.syncLocation2Map(data);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -351,42 +355,42 @@ public class MogoMapUIController implements IMogoMapUIController {
|
||||
}
|
||||
|
||||
private void initDelegate() {
|
||||
if ( mDelegate == null ) {
|
||||
if (mDelegate == null) {
|
||||
mDelegate = MogoMapDelegateFactory.getMapUIControllerDelegate();
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void openVrMode( boolean zoomGestureEnable ) {
|
||||
public void openVrMode(boolean zoomGestureEnable) {
|
||||
initDelegate();
|
||||
if ( mDelegate != null ) {
|
||||
mDelegate.openVrMode( zoomGestureEnable );
|
||||
if (mDelegate != null) {
|
||||
mDelegate.openVrMode(zoomGestureEnable);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public double[] matchRoad( String id, double lon, double lat, double angle, boolean isGpsLocation, boolean isRTK ) {
|
||||
public double[] matchRoad(String id, double lon, double lat, double angle, boolean isGpsLocation, boolean isRTK) {
|
||||
initDelegate();
|
||||
if ( mDelegate != null ) {
|
||||
return mDelegate.matchRoad( id, lon, lat, angle, isGpsLocation, isRTK );
|
||||
if (mDelegate != null) {
|
||||
return mDelegate.matchRoad(id, lon, lat, angle, isGpsLocation, isRTK);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getMarkerInfoResName( String speedVal ) {
|
||||
public String getMarkerInfoResName(String speedVal) {
|
||||
initDelegate();
|
||||
if ( mDelegate != null ) {
|
||||
return mDelegate.getMarkerInfoResName( speedVal );
|
||||
if (mDelegate != null) {
|
||||
return mDelegate.getMarkerInfoResName(speedVal);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setMarkerInfoResName( String speedVal, String val ) {
|
||||
public void setMarkerInfoResName(String speedVal, String val) {
|
||||
initDelegate();
|
||||
if ( mDelegate != null ) {
|
||||
mDelegate.setMarkerInfoResName( speedVal, val );
|
||||
if (mDelegate != null) {
|
||||
mDelegate.setMarkerInfoResName(speedVal, val);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user