[6.0.0] code opt and update sdk of aicloud , map , plus kotlin union
This commit is contained in:
@@ -160,27 +160,6 @@ public class AMapViewWrapper implements IMogoMapView,
|
||||
|
||||
}
|
||||
|
||||
private void initMapView() {
|
||||
if (mMapView == null) {
|
||||
return;
|
||||
}
|
||||
MapAutoViewHelper options = mMapView.getMapAutoViewHelper();
|
||||
ThreadUtils.getIoPool().submit(() -> {
|
||||
if (options != null) {
|
||||
//设置手势是否可以缩放 isCanZoom true 可缩放 false 不可缩放
|
||||
options.setZoomGesturesEnabled(true);
|
||||
options.setScaleVRMode(true);
|
||||
options.setWeatherEnable(false);
|
||||
// options.setAllGesturesEnabled(false); //禁止全部手势
|
||||
if (options.getMyLocationStyle() != null) {
|
||||
options.getMyLocationStyle().setDisplayAnimEnable(true);
|
||||
}
|
||||
//修改自车模型,未来需区分车的类型
|
||||
options.setMyLocationStyle(options.getMyLocationStyle().myLocationIcon(HdMapBuildConfig.currentCarVrIconRes, true));
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
private void initListeners() {
|
||||
mMapView.setOnMarkClickListener(this);
|
||||
mMapView.setOnMapLoadedListener(this);
|
||||
@@ -746,7 +725,6 @@ public class AMapViewWrapper implements IMogoMapView,
|
||||
cameraPosition.getZoom(),
|
||||
cameraPosition.getTilt(),
|
||||
cameraPosition.getBearing());
|
||||
initMapView();
|
||||
initMyLocation();
|
||||
loadPreVehicleModel();
|
||||
}
|
||||
|
||||
@@ -26,8 +26,10 @@ class GDLocationClient private constructor(context: Context) : AMapLocationListe
|
||||
IMogoGDLocationClient {
|
||||
//声明LocationClient对象
|
||||
private lateinit var mLocationClient: AMapLocationClient
|
||||
|
||||
@Volatile
|
||||
private var mCityCode: String = ""
|
||||
|
||||
@Volatile
|
||||
private var mapLocation: AMapLocation? = null
|
||||
|
||||
@@ -65,15 +67,11 @@ class GDLocationClient private constructor(context: Context) : AMapLocationListe
|
||||
}
|
||||
|
||||
override fun start() {
|
||||
if (mLocationClient != null) {
|
||||
mLocationClient.startLocation()
|
||||
}
|
||||
mLocationClient.startLocation()
|
||||
}
|
||||
|
||||
override fun stop() {
|
||||
if (mLocationClient != null) {
|
||||
mLocationClient.stopLocation()
|
||||
}
|
||||
mLocationClient.stopLocation()
|
||||
}
|
||||
|
||||
override fun onLocationChanged(aMapLocation: AMapLocation) {
|
||||
|
||||
@@ -47,7 +47,7 @@ class AMapPolylineWrapper(private val id: String, private val delegate: Polyline
|
||||
}
|
||||
|
||||
override fun isVisible(): Boolean {
|
||||
return delegate.isVisible() ?: false
|
||||
return delegate.isVisible()
|
||||
}
|
||||
|
||||
override fun setToTop() {
|
||||
|
||||
Reference in New Issue
Block a user