Merge branch 'master' into dev_MogoAP_eagle-220_211207_8.0.17
# Conflicts: # gradle.properties
This commit is contained in:
@@ -34,6 +34,11 @@ public class IdentifyDataDrawer {
|
||||
*/
|
||||
private final ConcurrentHashMap<String, TrafficData> mDirtyPositions = new ConcurrentHashMap<>();
|
||||
|
||||
/**
|
||||
* 过滤后的数据集合
|
||||
*/
|
||||
private final ArrayList<TrafficData> mFilterTrafficData = new ArrayList<>();
|
||||
|
||||
private IdentifyDataDrawer() {
|
||||
mContext = AbsMogoApplication.getApp();
|
||||
addPreVehicleModel();
|
||||
@@ -73,18 +78,21 @@ public class IdentifyDataDrawer {
|
||||
}
|
||||
|
||||
// 循环将集合中的数据提取记录
|
||||
ArrayList<String> trafficDataUuidList = new ArrayList<>();
|
||||
for (TrafficData trafficData : resultList) {
|
||||
trafficDataUuidList.add(trafficData.getUuid());
|
||||
}
|
||||
|
||||
// 找出上一针数据中已经不在本次数据中存在的数据
|
||||
for (String uuid : mMarkersCaches.keySet()) {
|
||||
if (!trafficDataUuidList.contains(uuid)) {
|
||||
mDirtyPositions.put(uuid, mMarkersCaches.get(uuid));
|
||||
}
|
||||
}
|
||||
|
||||
// ArrayList<String> trafficDataUuidList = new ArrayList<>();
|
||||
// for (TrafficData trafficData : resultList) {
|
||||
// // 过滤掉未知感知数据
|
||||
// if (trafficData.getType() == TrafficTypeEnum.TYPE_TRAFFIC_ID_WEI_ZHI) {
|
||||
// //Logger.w(TAG, "未知感知类型数据,丢弃,不渲染");
|
||||
// continue;
|
||||
// }
|
||||
// trafficDataUuidList.add(trafficData.getUuid());
|
||||
// }
|
||||
// // 找出上一针数据中已经不在本次数据中存在的数据
|
||||
// for (String uuid : mMarkersCaches.keySet()) {
|
||||
// if (!trafficDataUuidList.contains(uuid)) {
|
||||
// mDirtyPositions.put(uuid, mMarkersCaches.get(uuid));
|
||||
// }
|
||||
// }
|
||||
// // 移除脏数据
|
||||
// for (String uuid : mDirtyPositions.keySet()) {
|
||||
// MogoApisHandler.getInstance().getApis()
|
||||
@@ -97,10 +105,28 @@ public class IdentifyDataDrawer {
|
||||
MogoApisHandler.getInstance().getApis()
|
||||
.getMapServiceApi()
|
||||
.getMarkerManager(mContext)
|
||||
.updateBatchMarkerPosition(resultList);
|
||||
.updateBatchMarkerPosition(filterTrafficData(resultList));
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* 数据过滤器
|
||||
*
|
||||
* @return 过滤后的数据集合
|
||||
*/
|
||||
private ArrayList<TrafficData> filterTrafficData(ArrayList<TrafficData> trafficData) {
|
||||
mFilterTrafficData.clear();
|
||||
for (TrafficData data : trafficData) {
|
||||
// 过滤掉未知感知数据
|
||||
if (data.getType() == TrafficTypeEnum.TYPE_TRAFFIC_ID_WEI_ZHI) {
|
||||
//Logger.w(TAG, "未知感知类型数据,丢弃,不渲染");
|
||||
continue;
|
||||
}
|
||||
mFilterTrafficData.add(data);
|
||||
}
|
||||
return mFilterTrafficData;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 清除旧的 marker 数据
|
||||
|
||||
Reference in New Issue
Block a user