修改绘制感知数据方式为批量更新数据,尝试解决绘制卡顿的问题
Signed-off-by: donghongyu <donghongyu@zhidaoauto.com>
This commit is contained in:
@@ -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 ) {
|
||||
|
||||
Reference in New Issue
Block a user