[3.2.0] 解决M2乘客屏地图marker不显示问题

This commit is contained in:
wangmingjun
2023-05-26 16:48:45 +08:00
parent e65079a696
commit fd270c684d
3 changed files with 9 additions and 4 deletions

View File

@@ -30,7 +30,7 @@ class PM2ADASPresenter(view: PM2HPMapFragment?) :
override fun updateHDMapStations(stations: MutableList<MutableList<Double>>) {
for (i in stations.indices){
mView?.setMapMaker(M2_MAP_STATION_MAKER,stations[i])
mView?.setMapMaker(M2_MAP_STATION_MAKER+i,stations[i])
}
}

View File

@@ -120,7 +120,7 @@ class PM2HPMapFragment :
val removeMapMarkerRunnable = Runnable {
d("RemoveMapMaker=" + Thread.currentThread().name, uuid)
val overlayManager = getOverlayManager()
overlayManager?.removePoint(uuid)
overlayManager?.removeAllPointsInOwner(TYPE_MARKER_M2_LINE)
}
OCHThreadPoolManager.getsInstance().execute(removeMapMarkerRunnable)
}

View File

@@ -47,9 +47,14 @@ public class ObjectUtils {
descriptors.add(new BitmapDescriptor(icon));
}
}
MarkerOptions markerOptions;
if(TextUtils.isEmpty(opt.getId())){
markerOptions = new MarkerOptions();
}else{
markerOptions = new MarkerOptions(opt.getId());
}
MarkerOptions markerOptions = new MarkerOptions()
.setGps(opt.isGps())
markerOptions.setGps(opt.isGps())
.position(new LonLatPoint(opt.getLongitude(), opt.getLatitude()))
.anchor(opt.getU(), opt.getV())
.icons(descriptors)