导航语音指令
This commit is contained in:
@@ -416,6 +416,8 @@ public class AMapNaviViewWrapper implements IMogoMapView,
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
private boolean checkAMapView() {
|
||||
if ( mMapView == null ) {
|
||||
Logger.e( TAG, "高德mapView实例为空,请检查" );
|
||||
|
||||
@@ -31,9 +31,9 @@ public class AMapUIController implements IMogoMapUIController {
|
||||
}
|
||||
|
||||
public static AMapUIController getInstance() {
|
||||
if ( sInstance == null ) {
|
||||
synchronized ( AMapUIController.class ) {
|
||||
if ( sInstance == null ) {
|
||||
if (sInstance == null) {
|
||||
synchronized (AMapUIController.class) {
|
||||
if (sInstance == null) {
|
||||
sInstance = new AMapUIController();
|
||||
}
|
||||
}
|
||||
@@ -41,7 +41,7 @@ public class AMapUIController implements IMogoMapUIController {
|
||||
return sInstance;
|
||||
}
|
||||
|
||||
public void initClient( IMogoMapUIController client ) {
|
||||
public void initClient(IMogoMapUIController client) {
|
||||
this.mClient = client;
|
||||
}
|
||||
|
||||
@@ -50,71 +50,71 @@ public class AMapUIController implements IMogoMapUIController {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setTrafficEnabled( boolean visible ) {
|
||||
if ( mClient != null ) {
|
||||
mClient.setTrafficEnabled( visible );
|
||||
public void setTrafficEnabled(boolean visible) {
|
||||
if (mClient != null) {
|
||||
mClient.setTrafficEnabled(visible);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void changeZoom( boolean zoom ) {
|
||||
if ( mClient != null ) {
|
||||
mClient.changeZoom( zoom );
|
||||
public void changeZoom(boolean zoom) {
|
||||
if (mClient != null) {
|
||||
mClient.changeZoom(zoom);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void changeZoom( float zoom ) {
|
||||
if ( mClient != null ) {
|
||||
mClient.changeZoom( zoom );
|
||||
public void changeZoom(float zoom) {
|
||||
if (mClient != null) {
|
||||
mClient.changeZoom(zoom);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void changeMapMode( EnumMapUI mode ) {
|
||||
if ( mClient != null ) {
|
||||
mClient.changeMapMode( mode );
|
||||
public void changeMapMode(EnumMapUI mode) {
|
||||
if (mClient != null) {
|
||||
mClient.changeMapMode(mode);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void moveToCenter( MogoLatLng latLng ) {
|
||||
if ( mClient != null ) {
|
||||
mClient.moveToCenter( latLng );
|
||||
public void moveToCenter(MogoLatLng latLng) {
|
||||
if (mClient != null) {
|
||||
mClient.moveToCenter(latLng);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void showMyLocation( boolean visible ) {
|
||||
if ( mClient != null ) {
|
||||
mClient.showMyLocation( visible );
|
||||
public void showMyLocation(boolean visible) {
|
||||
if (mClient != null) {
|
||||
mClient.showMyLocation(visible);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void recoverLockMode() {
|
||||
if ( mClient != null ) {
|
||||
if (mClient != null) {
|
||||
mClient.recoverLockMode();
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setLockZoom(int var1) {
|
||||
if ( mClient != null ) {
|
||||
if (mClient != null) {
|
||||
mClient.setLockZoom(var1);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void displayOverview() {
|
||||
if ( mClient != null ) {
|
||||
if (mClient != null) {
|
||||
mClient.displayOverview();
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public float getScalePerPixel() {
|
||||
if ( mClient != null ) {
|
||||
if (mClient != null) {
|
||||
return mClient.getScalePerPixel();
|
||||
}
|
||||
return 0;
|
||||
@@ -122,7 +122,7 @@ public class AMapUIController implements IMogoMapUIController {
|
||||
|
||||
@Override
|
||||
public float getZoomLevel() {
|
||||
if ( mClient != null ) {
|
||||
if (mClient != null) {
|
||||
return mClient.getZoomLevel();
|
||||
}
|
||||
return 0;
|
||||
@@ -130,7 +130,7 @@ public class AMapUIController implements IMogoMapUIController {
|
||||
|
||||
@Override
|
||||
public MogoLatLng getCameraNorthEastPosition() {
|
||||
if ( mClient != null ) {
|
||||
if (mClient != null) {
|
||||
return mClient.getCameraNorthEastPosition();
|
||||
}
|
||||
return null;
|
||||
@@ -138,66 +138,67 @@ public class AMapUIController implements IMogoMapUIController {
|
||||
|
||||
@Override
|
||||
public MogoLatLng getCameraSouthWestPosition() {
|
||||
if ( mClient != null ) {
|
||||
if (mClient != null) {
|
||||
return mClient.getCameraSouthWestPosition();
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override public MogoLatLng getWindowCenterLocation() {
|
||||
if ( mClient != null ) {
|
||||
if (mClient != null) {
|
||||
return mClient.getWindowCenterLocation();
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setPointToCenter( double mapCenterX, double mapCenterY ) {
|
||||
if ( mClient != null ) {
|
||||
mClient.setPointToCenter( mapCenterX, mapCenterY );
|
||||
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 );
|
||||
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 );
|
||||
if (mClient != null) {
|
||||
return mClient.getLocationMogoLatLngInScreen(point);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void startJumpAnimation( IMogoMarker marker, float high, Interpolator interpolator, long duration ) {
|
||||
if ( mClient != null ) {
|
||||
mClient.startJumpAnimation( marker, high, interpolator, duration );
|
||||
public void startJumpAnimation(IMogoMarker marker, float high, Interpolator interpolator,
|
||||
long duration) {
|
||||
if (mClient != null) {
|
||||
mClient.startJumpAnimation(marker, high, interpolator, duration);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setRenderFps( int fps ) {
|
||||
if ( mClient != null ) {
|
||||
mClient.setRenderFps( fps );
|
||||
public void setRenderFps(int fps) {
|
||||
if (mClient != null) {
|
||||
mClient.setRenderFps(fps);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void showBounds( List< MogoLatLng > lonLats, Rect bound ) {
|
||||
if ( mClient != null ) {
|
||||
mClient.showBounds( lonLats, bound );
|
||||
public void showBounds(List<MogoLatLng> lonLats, Rect bound) {
|
||||
if (mClient != null) {
|
||||
mClient.showBounds(lonLats, bound);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void forceRender() {
|
||||
if ( mClient != null ) {
|
||||
if (mClient != null) {
|
||||
mClient.forceRender();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -19,43 +19,39 @@ public interface IMogoMapUIController {
|
||||
|
||||
/**
|
||||
* 实时路况
|
||||
*
|
||||
* @param visible
|
||||
*/
|
||||
void setTrafficEnabled( boolean visible );
|
||||
void setTrafficEnabled(boolean visible);
|
||||
|
||||
/**
|
||||
* 地图缩放
|
||||
*
|
||||
* @param zoomIn true - 方法 false - 缩小
|
||||
*/
|
||||
void changeZoom( boolean zoomIn );
|
||||
void changeZoom(boolean zoomIn);
|
||||
|
||||
/**
|
||||
* 修改缩放级别
|
||||
*
|
||||
* @param zoom
|
||||
*/
|
||||
void changeZoom( float zoom );
|
||||
void changeZoom(float zoom);
|
||||
|
||||
/**
|
||||
* 切换2D/3D模式
|
||||
*
|
||||
* @param mode true - 3D模式 false - 2D模式
|
||||
*/
|
||||
void changeMapMode( EnumMapUI mode );
|
||||
void changeMapMode(EnumMapUI mode);
|
||||
|
||||
/**
|
||||
* 将地图移动至当前位置
|
||||
*/
|
||||
void moveToCenter( MogoLatLng latLng );
|
||||
void moveToCenter(MogoLatLng latLng);
|
||||
|
||||
/**
|
||||
* 显示我的位置
|
||||
*
|
||||
* @param visible true - 显示 false - 不显示
|
||||
*/
|
||||
void showMyLocation( boolean visible );
|
||||
void showMyLocation(boolean visible);
|
||||
|
||||
/**
|
||||
* 解锁锁车
|
||||
@@ -67,7 +63,7 @@ public interface IMogoMapUIController {
|
||||
*
|
||||
* @param var1 级别 3-20
|
||||
*/
|
||||
void setLockZoom( int var1 );
|
||||
void setLockZoom(int var1);
|
||||
|
||||
/**
|
||||
* 预览全程
|
||||
@@ -83,29 +79,21 @@ public interface IMogoMapUIController {
|
||||
|
||||
/**
|
||||
* 获取缩放比例
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
float getZoomLevel();
|
||||
|
||||
/**
|
||||
* 获取视图东北角坐标
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
MogoLatLng getCameraNorthEastPosition();
|
||||
|
||||
/**
|
||||
* 获取视图西南角坐标
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
MogoLatLng getCameraSouthWestPosition();
|
||||
|
||||
/**
|
||||
* 获取视图中心点坐标
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
MogoLatLng getWindowCenterLocation();
|
||||
|
||||
@@ -115,46 +103,39 @@ public interface IMogoMapUIController {
|
||||
* @param mapCenterX x 点位置x值与地图宽度的比例
|
||||
* @param mapCenterY y 点位置x值与地图高度的比例
|
||||
*/
|
||||
void setPointToCenter( double mapCenterX, double mapCenterY );
|
||||
void setPointToCenter(double mapCenterX, double mapCenterY);
|
||||
|
||||
/**
|
||||
* 获取经纬度对应的屏幕的位置
|
||||
*
|
||||
* @param latLng
|
||||
* @return
|
||||
*/
|
||||
Point getLocationPointInScreen( MogoLatLng latLng );
|
||||
Point getLocationPointInScreen(MogoLatLng latLng);
|
||||
|
||||
/**
|
||||
* 获取像素点对应的经纬度
|
||||
*
|
||||
* @param point
|
||||
* @return
|
||||
*/
|
||||
MogoLatLng getLocationMogoLatLngInScreen( Point point );
|
||||
MogoLatLng getLocationMogoLatLngInScreen(Point point);
|
||||
|
||||
/**
|
||||
* marker 跳跃动画
|
||||
*
|
||||
* @param marker 跳跃的 marker
|
||||
* @param high 跳跃的高度
|
||||
* @param marker 跳跃的 marker
|
||||
* @param high 跳跃的高度
|
||||
* @param interpolator 插值器
|
||||
* @param duration 动画时间
|
||||
* @param duration 动画时间
|
||||
*/
|
||||
void startJumpAnimation( IMogoMarker marker, float high, Interpolator interpolator, long duration );
|
||||
void startJumpAnimation(IMogoMarker marker, float high, Interpolator interpolator,
|
||||
long duration);
|
||||
|
||||
/**
|
||||
* 设置刷新帧率
|
||||
*
|
||||
* @param fps
|
||||
*/
|
||||
void setRenderFps( int fps );
|
||||
void setRenderFps(int fps);
|
||||
|
||||
/**
|
||||
* @param lonLats 经纬度围成的范围
|
||||
* @param bound 地图上可显示的范围
|
||||
* @param bound 地图上可显示的范围
|
||||
*/
|
||||
void showBounds( List< MogoLatLng > lonLats, Rect bound );
|
||||
void showBounds(List<MogoLatLng> lonLats, Rect bound);
|
||||
|
||||
/**
|
||||
* 强制刷新地图
|
||||
|
||||
@@ -70,6 +70,7 @@ public class MogoMapUIController implements IMogoMapUIController {
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public void moveToCenter(MogoLatLng latLng) {
|
||||
if (mDelegate != null) {
|
||||
|
||||
Reference in New Issue
Block a user