This commit is contained in:
lixiaopeng
2021-04-13 17:18:54 +08:00
parent 84db2cd8f5
commit 3ae3fca09d
2 changed files with 16 additions and 13 deletions

1
.idea/gradle.xml generated
View File

@@ -91,6 +91,7 @@
</set>
</option>
<option name="resolveModulePerSourceSet" value="false" />
<option name="useQualifiedModuleNames" value="true" />
</GradleProjectSettings>
</option>
</component>

View File

@@ -71,7 +71,7 @@ public class MoGoV2XCloundDataManager implements IMoGoV2XCloundDataManager, IMog
drawStopLine(cloundWarningInfo, newLocation);
//添加停止线marker
handleStopLine();
}, 800);
}, 600);
UiThreadHandler.postDelayed(() -> {
V2XServiceManager.getMoGoPersonWarnPolylineManager().clearLine();
@@ -99,15 +99,17 @@ public class MoGoV2XCloundDataManager implements IMoGoV2XCloundDataManager, IMog
private void handleStopLine() {
for (int i = 0; i < fillPoints.size(); i++) {
V2XWarningEntity entity = new V2XWarningEntity();
MogoLatLng latLng = (MogoLatLng) fillPoints.get(i);
entity.setLat(latLng.lat);
entity.setLon(latLng.lon);
entity.setCollisionLat(mCloundWarningInfo.getCollisionLat());
entity.setCollisionLon(mCloundWarningInfo.getCollisionLon());
entity.heading = mCloundWarningInfo.heading;
V2XWarnDataDrawer.getInstance().renderStopLineData(entity);
if (mCloundWarningInfo != null) {
for (int i = 0; i < fillPoints.size(); i++) {
V2XWarningEntity entity = new V2XWarningEntity();
MogoLatLng latLng = (MogoLatLng) fillPoints.get(i);
entity.setLat(latLng.lat);
entity.setLon(latLng.lon);
entity.setCollisionLat(mCloundWarningInfo.getCollisionLat());
entity.setCollisionLon(mCloundWarningInfo.getCollisionLon());
entity.heading = mCloundWarningInfo.heading;
V2XWarnDataDrawer.getInstance().renderStopLineData(entity);
}
}
}
@@ -140,7 +142,6 @@ public class MoGoV2XCloundDataManager implements IMoGoV2XCloundDataManager, IMog
V2XServiceManager.getMoGoStopPolylineManager().drawStopPolyline(getContext(), lineInfo);
}
} else {
Log.e(V2XConst.LOG_NAME_WARN, "drawStopLine info == null");
V2XServiceManager.getMoGoPersonWarnPolylineManager().clearLine();
}
}
@@ -191,7 +192,9 @@ public class MoGoV2XCloundDataManager implements IMoGoV2XCloundDataManager, IMog
public void onCarLocationChanged2(Location latLng) {
// Log.d(V2XConst.LOG_NAME_WARN, "onCarLocationChanged2 latLng = " + latLng.getLatitude() + "--" + latLng.getLongitude() + "---isSelfLineClear = " + isSelfLineClear);
//当行人经纬度交点 开始画线,否则清理
mCloundWarningInfo.setCarLocation(new MogoLatLng(latLng.getLatitude(), latLng.getLongitude()));
if (mCloundWarningInfo != null) {
mCloundWarningInfo.setCarLocation(new MogoLatLng(latLng.getLatitude(), latLng.getLongitude()));
}
drawSlefCarLine(latLng);
}
@@ -237,7 +240,6 @@ public class MoGoV2XCloundDataManager implements IMoGoV2XCloundDataManager, IMog
V2XServiceManager.getMoGoWarnPolylineManager().drawWarnPolyline(getContext(), info);
}
} else {
Log.e(V2XConst.LOG_NAME_WARN, "onCarLocationChanged2 mCloundWarningInfo == null");
V2XServiceManager.getMoGoWarnPolylineManager().clearLine();
}
}