This commit is contained in:
wangcongtao
2020-05-18 17:05:58 +08:00
parent 8d7e09f81d
commit f5a1925532
34 changed files with 725 additions and 978 deletions

View File

@@ -492,7 +492,7 @@ public class AMapNaviViewWrapper implements IMogoMapView,
}
@Override
public void moveToCenter( MogoLatLng latLng ) {
public void moveToCenter( MogoLatLng latLng, boolean animate ) {
Logger.d( TAG, "move to center %s", latLng );
if ( latLng == null || latLng.lat == 0.0d || latLng.lng == 0.0d ) {
Logger.e( TAG, "latlng = null or is illegal" );
@@ -502,7 +502,11 @@ public class AMapNaviViewWrapper implements IMogoMapView,
Logger.d( TAG, Log.getStackTraceString( new Throwable() ) );
}
loseLockMode();
mMapView.getMap().moveCamera( CameraUpdateFactory.newLatLng( new LatLng( latLng.lat, latLng.lng ) ) );
if ( animate ) {
mMapView.getMap().animateCamera( CameraUpdateFactory.newLatLng( new LatLng( latLng.lat, latLng.lng ) ) );
} else {
mMapView.getMap().moveCamera( CameraUpdateFactory.newLatLng( new LatLng( latLng.lat, latLng.lng ) ) );
}
}
@Override

View File

@@ -85,9 +85,9 @@ public class AMapUIController implements IMogoMapUIController {
}
@Override
public void moveToCenter(MogoLatLng latLng) {
public void moveToCenter(MogoLatLng latLng, boolean animate) {
if (mClient != null) {
mClient.moveToCenter(latLng);
mClient.moveToCenter(latLng, animate);
}
}