1. 去掉部分日志

2. 添加m2不依赖地图的逻辑
This commit is contained in:
wangcongtao
2020-11-12 15:22:27 +08:00
parent 8a3048741d
commit d6e8e13338
11 changed files with 88 additions and 119 deletions

View File

@@ -439,9 +439,6 @@ public class AMapNaviViewWrapper implements IMogoMapView,
@Override
public MapControlResult changeZoom( float zoom ) {
Logger.d( TAG, "changeZoom %s", zoom );
if ( DebugConfig.isDebug() ) {
Logger.d( TAG, Log.getStackTraceString( new Throwable() ) );
}
getMap().changeZoom( zoom );
return MapControlResult.SUCCESS;
}
@@ -520,9 +517,6 @@ public class AMapNaviViewWrapper implements IMogoMapView,
Logger.e( TAG, "latlng = null or is illegal" );
return;
}
if ( DebugConfig.isDebug() ) {
Logger.d( TAG, Log.getStackTraceString( new Throwable() ) );
}
loseLockMode();
if ( animate ) {
mMapView.getMap().animateCamera( CameraUpdateFactory.newLatLng( new LatLng( latLng.lat, latLng.lng ) ) );
@@ -537,9 +531,6 @@ public class AMapNaviViewWrapper implements IMogoMapView,
if ( visible && NaviClient.getInstance( getContext() ).isNaviing() ) {
return;
}
if ( DebugConfig.isDebug() ) {
Logger.d( TAG, Log.getStackTraceString( new Throwable() ) );
}
if ( checkAMapView() ) {
MyLocationStyle style = getMyLocationStyle();
if ( style == null ) {
@@ -565,9 +556,6 @@ public class AMapNaviViewWrapper implements IMogoMapView,
if ( NaviClient.getInstance( getContext() ).isNaviing() ) {
return;
}
if ( DebugConfig.isDebug() ) {
Logger.d( TAG, Log.getStackTraceString( new Throwable() ) );
}
if ( checkAMapView() ) {
MyLocationStyle style = getMyLocationStyle();
if ( style == null ) {
@@ -647,9 +635,6 @@ public class AMapNaviViewWrapper implements IMogoMapView,
@Override
public void recoverLockMode() {
if ( checkAMapView() ) {
if ( DebugConfig.isDebug() ) {
Logger.d( TAG, Log.getStackTraceString( new Throwable() ) );
}
Logger.d( TAG, "锁车" );
mMapView.recoverLockMode();
changeMyLocationType2Follow();
@@ -659,9 +644,6 @@ public class AMapNaviViewWrapper implements IMogoMapView,
@Override
public void loseLockMode() {
if ( DebugConfig.isDebug() ) {
Logger.d( TAG, Log.getStackTraceString( new Throwable() ) );
}
Logger.d( TAG, "解锁锁车" );
mIsCarLocked = false;
mockTouchEvent();
@@ -683,9 +665,6 @@ public class AMapNaviViewWrapper implements IMogoMapView,
@Override
public void setLockZoom( int var1 ) {
if ( checkAMapView() ) {
if ( DebugConfig.isDebug() ) {
Logger.d( TAG, Log.getStackTraceString( new Throwable() ) );
}
Logger.d( TAG, "Zoom锁定锁车比例尺 %s", var1 );
// mMapView.setLockZoom( var1 );
}
@@ -787,9 +766,6 @@ public class AMapNaviViewWrapper implements IMogoMapView,
@Override
public void setPointToCenter( double mapCenterX, double mapCenterY ) {
if ( checkAMapView() ) {
if ( DebugConfig.isDebug() ) {
Logger.d( TAG, Log.getStackTraceString( new Throwable() ) );
}
Logger.d( TAG, "setPointToCenter(%s, %s)", mapCenterX, mapCenterY );
AMapNaviViewOptions options = mMapView.getViewOptions();
options.setPointToCenter( mapCenterX, mapCenterY );
@@ -866,9 +842,6 @@ public class AMapNaviViewWrapper implements IMogoMapView,
return;
}
try {
if ( DebugConfig.isDebug() ) {
Logger.d( TAG, Log.getStackTraceString( new Throwable() ) );
}
LatLngBounds latLngBounds = MogoMapUtils.getLatLngBounds( carPosition, lonLats, lockCarPosition );
if ( !lockCarPosition ) {
loseLockMode();

View File

@@ -204,7 +204,6 @@ public class AMapViewWrapper implements IMogoMapView,
@Override
public void onCreate( Bundle bundle ) {
Logger.d( TAG, Log.getStackTraceString( new Throwable() ) );
if ( mMapView != null ) {
mMapView.onCreate( bundle );
Logger.d( TAG, "map onCreate" );
@@ -218,7 +217,6 @@ public class AMapViewWrapper implements IMogoMapView,
public void onResume() {
if ( mMapView != null ) {
mMapView.onResume();
Logger.d( TAG, Log.getStackTraceString( new Throwable() ) );
Logger.d( TAG, "map onResume" );
}
}
@@ -352,9 +350,6 @@ public class AMapViewWrapper implements IMogoMapView,
@Override
public MapControlResult changeZoom( float zoom ) {
Logger.d( TAG, "changeZoom %s", zoom );
if ( DebugConfig.isDebug() ) {
Logger.d( TAG, Log.getStackTraceString( new Throwable() ) );
}
getMap().changeZoom( zoom );
return MapControlResult.SUCCESS;
}
@@ -403,9 +398,6 @@ public class AMapViewWrapper implements IMogoMapView,
Logger.e( TAG, "latlng = null or is illegal" );
return;
}
if ( DebugConfig.isDebug() ) {
Logger.d( TAG, Log.getStackTraceString( new Throwable() ) );
}
loseLockMode();
if ( animate ) {
mMapView.getMap().animateCamera( CameraUpdateFactory.newLatLng( new LatLng( latLng.lat, latLng.lng ) ) );
@@ -420,9 +412,6 @@ public class AMapViewWrapper implements IMogoMapView,
if ( visible && NaviClient.getInstance( getContext() ).isNaviing() ) {
return;
}
if ( DebugConfig.isDebug() ) {
Logger.d( TAG, Log.getStackTraceString( new Throwable() ) );
}
if ( checkMapView() ) {
MyLocationStyle style = getMyLocationStyle();
if ( style == null ) {
@@ -442,9 +431,6 @@ public class AMapViewWrapper implements IMogoMapView,
if ( NaviClient.getInstance( getContext() ).isNaviing() ) {
return;
}
if ( DebugConfig.isDebug() ) {
Logger.d( TAG, Log.getStackTraceString( new Throwable() ) );
}
if ( checkMapView() ) {
MyLocationStyle style = getMyLocationStyle();
if ( style == null ) {
@@ -487,9 +473,6 @@ public class AMapViewWrapper implements IMogoMapView,
@Override
public void recoverLockMode() {
if ( checkMapView() ) {
if ( DebugConfig.isDebug() ) {
Logger.d( TAG, Log.getStackTraceString( new Throwable() ) );
}
Logger.d( TAG, "锁车" );
Location target = NaviClient.getInstance( getContext() ).getCarLocation2();
if ( target != null ) {
@@ -528,9 +511,6 @@ public class AMapViewWrapper implements IMogoMapView,
@Override
public void loseLockMode() {
if ( DebugConfig.isDebug() ) {
Logger.d( TAG, Log.getStackTraceString( new Throwable() ) );
}
Logger.d( TAG, "解锁锁车" );
MyLocationStyle style = getMyLocationStyle();
style.myLocationType( MyLocationStyle.LOCATION_TYPE_FOLLOW_NO_CENTER );
@@ -554,9 +534,6 @@ public class AMapViewWrapper implements IMogoMapView,
@Override
public void setLockZoom( int var1 ) {
if ( checkMapView() ) {
if ( DebugConfig.isDebug() ) {
Logger.d( TAG, Log.getStackTraceString( new Throwable() ) );
}
Logger.d( TAG, "Zoom锁定锁车比例尺 %s", var1 );
// mMapView.setLockZoom( var1 );
}
@@ -656,9 +633,6 @@ public class AMapViewWrapper implements IMogoMapView,
@Override
public void setPointToCenter( double mapCenterX, double mapCenterY ) {
if ( checkMapView() ) {
if ( DebugConfig.isDebug() ) {
Logger.d( TAG, Log.getStackTraceString( new Throwable() ) );
}
Logger.d( TAG, "setPointToCenter(%s, %s)", mapCenterX, mapCenterY );
mMapView.getMap().setPointToCenter( ( ( int ) ( mapCenterX * WindowUtils.getScreenWidth( getContext() ) ) ),
( ( int ) ( mapCenterY * WindowUtils.getScreenHeight( getContext() ) ) ) );
@@ -734,9 +708,6 @@ public class AMapViewWrapper implements IMogoMapView,
return;
}
try {
if ( DebugConfig.isDebug() ) {
Logger.d( TAG, Log.getStackTraceString( new Throwable() ) );
}
LatLngBounds latLngBounds = MogoMapUtils.getLatLngBounds( carPosition, lonLats, lockCarPosition );
if ( !lockCarPosition ) {
loseLockMode();