[MAP] 高精地图Marker绘制逻辑重构

This commit is contained in:
renwj
2023-05-08 14:46:29 +08:00
parent eecea49493
commit 22cf999031
97 changed files with 3615 additions and 6757 deletions

View File

@@ -0,0 +1,75 @@
package com.mogo.map.identify;
import android.content.Context;
import com.mogo.map.MogoMap;
import com.mogo.map.identity.IMogoIdentifyManager;
import java.util.HashMap;
import mogo.telematics.pad.MessagePad;
import mogo.yycp.api.proto.SocketDownData;
/**
* @author congtaowang
* @since 2019-12-20
* <p>
* marker 管理实现
*/
public class MogoIdentifyManager implements IMogoIdentifyManager {
private static final String TAG = "MogoIdentifyManager";
private static volatile MogoIdentifyManager sInstance;
private MogoIdentifyManager(Context context) {}
public static MogoIdentifyManager getInstance(Context context) {
if (sInstance == null) {
synchronized (MogoIdentifyManager.class) {
if (sInstance == null) {
sInstance = new MogoIdentifyManager(context);
}
}
}
return sInstance;
}
@Override
public void removeMarker(String uuidString) {
try {
MogoMap.getInstance().getMogoMap().removeMarker(uuidString);
} catch (Exception e) {
e.printStackTrace();
}
}
public synchronized void release() {
sInstance = null;
}
@Override
public void updateBatchMarkerPosition(HashMap<String, MessagePad.TrackedObject> optionsArrayList) {
try {
MogoMap.getInstance().getMogoMap().updateBatchMarkerPosition(optionsArrayList);
} catch (Exception e) {
e.printStackTrace();
}
}
@Override
public void updateBatchAiMarkerPosition(HashMap<String, SocketDownData.CloudRoadDataProto> optionsArrayList) {
try {
MogoMap.getInstance().getMogoMap().updateBatchAiMarkerPosition(optionsArrayList);
} catch (Exception e) {
e.printStackTrace();
}
}
@Override
public String addPreVehicleModel(int type, int modelRes) {
try {
return MogoMap.getInstance().getMogoMap().addPreVehicleModel(type, modelRes);
} catch (Exception e) {
e.printStackTrace();
}
return null;
}
}