[dev_arch_opt_3.0]

[Change]
[
1、解决地图加载异常
]

Signed-off-by: donghongyu <donghongyu@zhidaoauto.com>
This commit is contained in:
donghongyu
2023-02-08 11:34:54 +08:00
parent 2ea96f15a2
commit a1506c731c
2 changed files with 22 additions and 18 deletions

View File

@@ -44,7 +44,7 @@ class SmallMapView @JvmOverloads constructor(
private var mCarMarker: Marker? = null
private var mStartMarker: Marker? = null
private var mEndMarker: Marker? = null
private val zoomLevel = 14
private val zoomLevel = 17
private val mCoordinatesLatLng: MutableList<LatLng> = ArrayList()
private var mPolyline: Polyline? = null
private var mCameraUpdate: CameraUpdate? = null
@@ -299,8 +299,12 @@ class SmallMapView @JvmOverloads constructor(
}
}
val cameraPosition: CameraPosition =
CameraPosition.Builder().target(mCarMarker!!.position).tilt(0f).bearing(bearing)
.zoom(zoomLevel.toFloat()).build()
CameraPosition.Builder()
.target(mCarMarker!!.position)
.tilt(0f)
.bearing(bearing)
.zoom(zoomLevel.toFloat())
.build()
mAMap?.moveCamera(CameraUpdateFactory.newCameraPosition(cameraPosition))
}

View File

@@ -854,21 +854,21 @@ public class AMapViewWrapper implements IMogoMapView,
@Override
public void stepInVrMode(boolean isDayMode) {
try {
int mapStyle;
if (isDayMode) {
mCurrentUI = EnumMapUI.MAP_STYLE_DAY_VR;
mapStyle = MapAutoApi.MAP_STYLE_DAY_VR;
} else {
mCurrentUI = EnumMapUI.MAP_STYLE_NIGHT_VR;
mapStyle = MapAutoApi.MAP_STYLE_NIGHT_VR;
}
if (mMapView != null && mMapView.getMapAutoViewHelper() != null) {
mMapView.getMapAutoViewHelper().setMapStyle(mapStyle);
}
} catch (Exception e) {
e.printStackTrace();
}
// try {
// int mapStyle;
// if (isDayMode) {
// mCurrentUI = EnumMapUI.MAP_STYLE_DAY_VR;
// mapStyle = MapAutoApi.MAP_STYLE_DAY_VR;
// } else {
// mCurrentUI = EnumMapUI.MAP_STYLE_NIGHT_VR;
// mapStyle = MapAutoApi.MAP_STYLE_NIGHT_VR;
// }
// if (mMapView != null && mMapView.getMapAutoViewHelper() != null) {
// mMapView.getMapAutoViewHelper().setMapStyle(mapStyle);
// }
// } catch (Exception e) {
// e.printStackTrace();
// }
}
@Override