[3.4.0-map-sdk] wait
This commit is contained in:
@@ -1,366 +0,0 @@
|
||||
package com.mogo.map.uicontroller;
|
||||
|
||||
import android.graphics.Point;
|
||||
import android.graphics.Rect;
|
||||
import android.view.View;
|
||||
|
||||
import com.mogo.eagle.core.data.map.MogoLatLng;
|
||||
import com.mogo.eagle.core.data.map.MogoLocation;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
|
||||
/**
|
||||
* @author congtaowang
|
||||
* @since 2019-12-26
|
||||
* <p>
|
||||
* 描述
|
||||
*/
|
||||
public class AMapUIController implements IMogoMapUIController {
|
||||
|
||||
private static volatile AMapUIController sInstance;
|
||||
|
||||
private IMogoMapUIController mClient;
|
||||
|
||||
private AMapUIController() {
|
||||
}
|
||||
|
||||
public static AMapUIController getInstance() {
|
||||
if (sInstance == null) {
|
||||
synchronized (AMapUIController.class) {
|
||||
if (sInstance == null) {
|
||||
sInstance = new AMapUIController();
|
||||
}
|
||||
}
|
||||
}
|
||||
return sInstance;
|
||||
}
|
||||
|
||||
public void initClient(IMogoMapUIController client) {
|
||||
this.mClient = client;
|
||||
}
|
||||
|
||||
public synchronized void release() {
|
||||
sInstance = null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public MapControlResult changeZoom(float zoom) {
|
||||
if (mClient != null) {
|
||||
return mClient.changeZoom(zoom);
|
||||
}
|
||||
return MapControlResult.ERROR;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void changeZoom2(float zoom) {
|
||||
if (mClient != null) {
|
||||
mClient.changeZoom2(zoom);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void changeMapVisualAngle(VisualAngleMode angelMode, MogoLatLng mogoLatLng) {
|
||||
if (mClient != null) {
|
||||
mClient.changeMapVisualAngle(angelMode, mogoLatLng);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setRoamTrajectory(String trajectory) {
|
||||
if (mClient != null) {
|
||||
mClient.setRoamTrajectory(trajectory);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setRomaMode(int mode) {
|
||||
if (mClient != null) {
|
||||
mClient.setRomaMode(mode);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public VisualAngleMode getCurrentMapVisualAngle() {
|
||||
if (mClient != null) {
|
||||
return mClient.getCurrentMapVisualAngle();
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void moveToCenter(MogoLatLng latLng, boolean animate) {
|
||||
if (mClient != null) {
|
||||
mClient.moveToCenter(latLng, animate);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isDayMode() {
|
||||
if (mClient != null) {
|
||||
return mClient.isDayMode();
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void showMyLocation(boolean visible) {
|
||||
if (mClient != null) {
|
||||
mClient.showMyLocation(visible);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void showMyLocation(View view) {
|
||||
if (mClient != null) {
|
||||
mClient.showMyLocation(view);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public float getScalePerPixel() {
|
||||
if (mClient != null) {
|
||||
return mClient.getScalePerPixel();
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
@Override
|
||||
public float getZoomLevel() {
|
||||
if (mClient != null) {
|
||||
return mClient.getZoomLevel();
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
@Override
|
||||
public MogoLatLng getCameraNorthEastPosition() {
|
||||
if (mClient != null) {
|
||||
return mClient.getCameraNorthEastPosition();
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public MogoLatLng getCameraSouthWestPosition() {
|
||||
if (mClient != null) {
|
||||
return mClient.getCameraSouthWestPosition();
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public MogoLatLng getWindowCenterLocation() {
|
||||
if (mClient != null) {
|
||||
return mClient.getWindowCenterLocation();
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setPointToCenter(double mapCenterX, double mapCenterY) {
|
||||
if (mClient != null) {
|
||||
mClient.setPointToCenter(mapCenterX, mapCenterY);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public Point getLocationPointInScreen(MogoLatLng latLng) {
|
||||
if (mClient != null) {
|
||||
return mClient.getLocationPointInScreen(latLng);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public MogoLatLng getLocationMogoLatLngInScreen(Point point) {
|
||||
if (mClient != null) {
|
||||
return mClient.getLocationMogoLatLngInScreen(point);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public void setRenderFps(int fps) {
|
||||
if (mClient != null) {
|
||||
mClient.setRenderFps(fps);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void showBounds(String tag, MogoLatLng carPosition, List<MogoLatLng> lonLats, Rect bound, boolean lockCarPosition) {
|
||||
if (mClient != null) {
|
||||
mClient.showBounds(tag, carPosition, lonLats, bound, lockCarPosition);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void forceRender() {
|
||||
if (mClient != null) {
|
||||
mClient.forceRender();
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public float calculateLineDistance(MogoLatLng p1, MogoLatLng p2) throws Exception {
|
||||
if (mClient != null) {
|
||||
return mClient.calculateLineDistance(p1, p2);
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public boolean isCarLocked() {
|
||||
if (mClient != null) {
|
||||
return mClient.isCarLocked();
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setCarCursorOption(CarCursorOption option) {
|
||||
if (mClient != null) {
|
||||
mClient.setCarCursorOption(option);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setCarLightsType(int type, int time) {
|
||||
if (mClient != null) {
|
||||
mClient.setCarLightsType(type, time);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public MapCameraPosition getMapCameraPosition() {
|
||||
if (mClient != null) {
|
||||
return mClient.getMapCameraPosition();
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void changeBearing(float bearing) {
|
||||
if (mClient != null) {
|
||||
mClient.changeBearing(bearing);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void changeCurrentIcon(int iconId) {
|
||||
if (mClient != null) {
|
||||
mClient.changeCurrentIcon(iconId);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void rtkEnable(boolean enable) {
|
||||
if (mClient != null) {
|
||||
mClient.rtkEnable(enable);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void stepInVrMode(boolean isDayMode) {
|
||||
if (mClient != null) {
|
||||
mClient.stepInVrMode(isDayMode);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public String getMarkerInfoResName(String speedVal) {
|
||||
if (mClient != null) {
|
||||
return mClient.getMarkerInfoResName(speedVal);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setMarkerInfoResName(String speedVal, String val) {
|
||||
if (mClient != null) {
|
||||
mClient.setMarkerInfoResName(speedVal, val);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setMapDAngle(float angle) {
|
||||
if (mClient != null) {
|
||||
mClient.setMapDAngle(angle);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setLockMode(boolean isLock) {
|
||||
if (mClient != null) {
|
||||
mClient.setLockMode(isLock);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setScrollGesturesEnable(boolean isEnable) {
|
||||
if (mClient != null) {
|
||||
mClient.setScrollGesturesEnable(isEnable);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setAllGesturesEnabled(boolean isEnable) {
|
||||
if (mClient != null) {
|
||||
mClient.setAllGesturesEnabled(isEnable);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setExtraGPSData(MogoLocation gnssInfo) {
|
||||
if (mClient != null) {
|
||||
mClient.setExtraGPSData(gnssInfo);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setIsDrawPointCloud(Boolean isDrawPointCloud) {
|
||||
if (mClient != null) {
|
||||
mClient.setIsDrawPointCloud(isDrawPointCloud);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setPointCloudSize(Float pointCloudSize) {
|
||||
if (mClient != null) {
|
||||
mClient.setPointCloudSize(pointCloudSize);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setPointCloudColor(String color) {
|
||||
if (mClient != null) {
|
||||
mClient.setPointCloudColor(color);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getCityCode() {
|
||||
if (mClient != null) {
|
||||
return mClient.getCityCode();
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void animateTo(double lon, double lat, float rotateAngle, int duration, boolean isGps) {
|
||||
if (mClient != null) {
|
||||
mClient.animateTo(lon, lat, rotateAngle, duration, isGps);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void animateTo(double lon, double lat, float v1, float v2, float v3, float v4, int duration, boolean isGps) {
|
||||
if (mClient != null) {
|
||||
mClient.animateTo(lon, lat, v1, v2, v3, v4, duration, isGps);
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user