修改绘制感知数据方式为批量更新数据,尝试解决绘制卡顿的问题

Signed-off-by: donghongyu <donghongyu@zhidaoauto.com>
This commit is contained in:
donghongyu
2022-01-12 17:57:36 +08:00
parent 351bda6e8a
commit 2856494644
10 changed files with 250 additions and 192 deletions

View File

@@ -3,6 +3,7 @@ package com.mogo.map;
import android.content.Context;
import com.mogo.eagle.core.data.map.MogoLatLng;
import com.mogo.eagle.core.data.traffic.TrafficData;
import com.mogo.map.marker.IMogoMarker;
import com.mogo.map.marker.IMogoMarkerManager;
import com.mogo.map.marker.MogoMarkerOptions;
@@ -51,6 +52,7 @@ public class MogoMarkerManager implements IMogoMarkerManager {
try {
return MogoMap.getInstance().getMogoMap().addMarker( tag, options );
} catch ( Exception e ) {
e.printStackTrace();
return null;
}
}
@@ -60,10 +62,38 @@ public class MogoMarkerManager implements IMogoMarkerManager {
try {
return MogoMap.getInstance().getMogoMap().addMarkers( tag, options, moveToCenter );
} catch ( Exception e ) {
e.printStackTrace();
return null;
}
}
@Override
public void updateBatchMarkerPosition(ArrayList<TrafficData> optionsArrayList) {
try {
MogoMap.getInstance().getMogoMap().updateBatchMarkerPositon(optionsArrayList);
} catch (Exception e) {
e.printStackTrace();
}
}
@Override
public void addPreVehicleModel(int type, int modelRes) {
try {
MogoMap.getInstance().getMogoMap().addPreVehicleModel(type, modelRes);
} catch (Exception e) {
e.printStackTrace();
}
}
@Override
public void removeMarker(String uuidString) {
try {
MogoMap.getInstance().getMogoMap().removeMarker(uuidString);
} catch (Exception e) {
e.printStackTrace();
}
}
@Override
public void removeMarkers( String tag ) {