添加切换道路匹配测试逻辑

This commit is contained in:
wangcongtao
2021-01-05 11:04:49 +08:00
parent 62c8dc6e87
commit 5cbb771469
4 changed files with 19 additions and 1 deletions

View File

@@ -895,7 +895,7 @@ public class AMapViewWrapper implements IMogoMapView,
public void matchRoadEnable( boolean enable ) {
try {
mMatchRoadEnable = !mMatchRoadEnable;
TipToast.shortTip( mMatchRoadEnable ? "已开启道路匹配" : "已关闭道路匹配" );
TipToast.shortTip( mMatchRoadEnable ? "gps,已开启道路匹配" : "rtk,已关闭道路匹配" );
mMapView.getLocationClient().matchRoadEnable( mMatchRoadEnable );
} catch ( Exception e ) {
Logger.e( TAG, e, "matchRoadEnable" );

View File

@@ -291,4 +291,11 @@ public class AMapUIController implements IMogoMapUIController {
public void setAnchorRate( float rate ) {
}
@Override
public void matchRoadEnable( boolean enable ) {
if ( mClient != null ) {
mClient.matchRoadEnable( enable );
}
}
}

View File

@@ -283,4 +283,11 @@ public class MogoMapUIController implements IMogoMapUIController {
mDelegate.changeBearing( bearing );
}
}
@Override
public void matchRoadEnable( boolean enable ) {
if ( mDelegate != null ) {
mDelegate.matchRoadEnable( enable );
}
}
}

View File

@@ -383,6 +383,10 @@ public class MockIntentHandler implements IntentHandler {
centerMarker.destroy();
}
break;
case 38:
MogoApisHandler.getInstance().getApis().getMapServiceApi().getMapUIController()
.matchRoadEnable( false );
break;
}
}