[dev_minibus-d_230425_3.2.0] 优化可能出现bug的代码

This commit is contained in:
lixiaopeng
2023-05-29 14:15:16 +08:00
parent 5a9da1f641
commit 8f7758aca2
7 changed files with 59 additions and 36 deletions

View File

@@ -391,12 +391,16 @@ public class AMapViewWrapper implements IMogoMapView,
)
@Override
public void setRoamTrajectory(String trajectory) {
mMapView.getMapAutoViewHelper().setRoamTrajectory(trajectory);
if (checkAMapView()) {
mMapView.getMapAutoViewHelper().setRoamTrajectory(trajectory);
}
}
@Override
public void setRomaMode(int mode) {
mMapView.getMapAutoViewHelper().setRoamStyle(mode,1800, MapAutoApi.ROAM_SPEED_40);
if (checkAMapView()) {
mMapView.getMapAutoViewHelper().setRoamStyle(mode,1800, MapAutoApi.ROAM_SPEED_40);
}
}
@Override
@@ -427,7 +431,9 @@ public class AMapViewWrapper implements IMogoMapView,
if (DebugConfig.isDebug()) {
CallerLogger.INSTANCE.d(M_MAP + TAG, Log.getStackTraceString(new Throwable()));
}
mMapView.getMapAutoViewHelper().animateCamera(new LonLatPoint(latLng.lon, latLng.lat));
if (checkAMapView()) {
mMapView.getMapAutoViewHelper().animateCamera(new LonLatPoint(latLng.lon, latLng.lat));
}
}
@Override
@@ -883,7 +889,9 @@ public class AMapViewWrapper implements IMogoMapView,
try {
mRtkEnable = !mRtkEnable;
TipToast.shortTip(mRtkEnable ? "已开启rtk道路匹配" : "已开启gps道路匹配");
mMapView.getLocationClient().rtkEnable(mRtkEnable);
if (mMapView != null && mMapView.getLocationClient() != null) {
mMapView.getLocationClient().rtkEnable(mRtkEnable);
}
} catch (Exception e) {
CallerLogger.INSTANCE.e(M_MAP + TAG, "rtkEnable has exception : " + e);
}