add change bearing api

This commit is contained in:
wangcongtao
2020-05-07 14:33:32 +08:00
parent ba00d3ca1b
commit 6632d29618
6 changed files with 34 additions and 2 deletions

View File

@@ -66,7 +66,7 @@ MOGO_MODULE_GUIDESHOW_PROVIDER_VERSION=1.0.2-SNAPSHOT
# 在线车辆F
MOGO_MODULE_ONLINECAR_VERSION=1.0.3.2
# v2x
MOGO_MODULE_V2X_VERSION=1.0.6.16
MOGO_MODULE_V2X_VERSION=1.0.6.171
# 媒体卡片
MOGO_MODULE_MEDIA_VERSION=1.0.4.3
# 推送

View File

@@ -872,4 +872,11 @@ public class AMapNaviViewWrapper implements IMogoMapView,
}
return null;
}
@Override
public void changeBearing( float bearing ) {
if ( checkAMapView() ) {
mMapView.getMap().moveCamera( CameraUpdateFactory.changeBearing( bearing ) );
}
}
}

View File

@@ -269,4 +269,11 @@ public class AMapUIController implements IMogoMapUIController {
}
return null;
}
@Override
public void changeBearing( float bearing ) {
if ( mClient != null ) {
mClient.changeBearing( bearing );
}
}
}

View File

@@ -199,7 +199,8 @@ public interface IMogoMapUIController {
/**
* 配置自车图标样式
*
* @param option 为空时使用默认配置
* @param option 为空时使用
* 默认配置
*/
void setCarCursorOption( @Nullable CarCursorOption option );
@@ -209,4 +210,10 @@ public interface IMogoMapUIController {
* @return
*/
MapCameraPosition getMapCameraPosition();
/**
* 切换地图视图视角
* @param bearing
*/
void changeBearing(float bearing);
}

View File

@@ -262,4 +262,11 @@ public class MogoMapUIController implements IMogoMapUIController {
}
return null;
}
@Override
public void changeBearing( float bearing ) {
if ( mDelegate != null ) {
mDelegate.changeBearing( bearing );
}
}
}

View File

@@ -85,6 +85,10 @@ public class MockIntentHandler implements IntentHandler {
} );
}
break;
case 8:
float bearing = intent.getFloatExtra( "bearing", 0 );
MarkerServiceHandler.getMapUIController().changeBearing( bearing );
break;
}
}
}