This commit is contained in:
lixiaopeng
2021-04-13 12:21:42 +08:00
parent 92cba09cef
commit 69885374eb
2 changed files with 7 additions and 9 deletions

View File

@@ -49,7 +49,6 @@ public class MoGoV2XCloundDataManager implements IMoGoV2XCloundDataManager, IMog
private List fillPoints = new ArrayList();//停止线经纬度合集
private boolean isFirstLocation = false;
private MogoLatLng mNewLocation;
private static long showTime = 0;
@Override
@@ -81,7 +80,7 @@ public class MoGoV2XCloundDataManager implements IMoGoV2XCloundDataManager, IMog
//绘制识别物与交汇点连线,并且更新连线数据
drawStopLine(cloundWarningInfo, newLocation);
//添加停止线marker
handleStopLine();
// handleStopLine();
}, 800);
UiThreadHandler.postDelayed(() -> {
@@ -172,7 +171,7 @@ public class MoGoV2XCloundDataManager implements IMoGoV2XCloundDataManager, IMog
lineInfo.setEndLocation(endLatlng);
lineInfo.setHeading(info.heading);
Log.d(V2XConst.LOG_NAME_WARN, "drawStopLine width = " + info.getRoadwidth());
lineInfo.setWidth(info.getRoadwidth());
lineInfo.setWidth(info.getRoadwidth() * 10 + 5);
V2XServiceManager.getMoGoStopPolylineManager().drawStopPolyline(getContext(), lineInfo);
}
} else {
@@ -201,7 +200,7 @@ public class MoGoV2XCloundDataManager implements IMoGoV2XCloundDataManager, IMog
lineInfo.setEndLocation(endLatlng);
lineInfo.setHeading(info.heading);
Log.d(V2XConst.LOG_NAME_WARN, "drawOtherObjectLine width = " + info.getRoadwidth());
lineInfo.setWidth(info.getRoadwidth());
lineInfo.setWidth(info.getRoadwidth() * 10 + 5);
V2XServiceManager.getMoGoPersonWarnPolylineManager().drawPersonWarnPolyline(getContext(), lineInfo);
}
} else {
@@ -249,7 +248,6 @@ public class MoGoV2XCloundDataManager implements IMoGoV2XCloundDataManager, IMog
mCloundWarningInfo.getDirection() == 1 ? mNewLocation.lon : mCloundWarningInfo.getCollisionLon())));
mogoPolyline.setTransparency(0.5f);
} else {
// Log.e(V2XConst.LOG_NAME_WARN, "onCarLocationChanged2 mogoPolyline == null width = " + mCloundWarningInfo.getRoadwidth());
DrawLineInfo info = new DrawLineInfo(); // 对象
MogoLatLng startLatlng = new MogoLatLng(latLng.getLatitude(), latLng.getLongitude());
MogoLatLng endLatlng = new MogoLatLng(mCloundWarningInfo.getDirection() == 1 ? mNewLocation.lat : mCloundWarningInfo.getCollisionLat(),
@@ -257,7 +255,7 @@ public class MoGoV2XCloundDataManager implements IMoGoV2XCloundDataManager, IMog
info.setHeading(latLng.getBearing());
info.setStartLocation(startLatlng);
info.setEndLocation(endLatlng);
info.setWidth(mCloundWarningInfo.getRoadwidth()); //TODO 还需要转换比例尺
info.setWidth(mCloundWarningInfo.getRoadwidth() * 10 + 5);
info.setDirection(mCloundWarningInfo.getDirection());
V2XServiceManager.getMoGoWarnPolylineManager().drawWarnPolyline(getContext(), info);
}
@@ -297,7 +295,7 @@ public class MoGoV2XCloundDataManager implements IMoGoV2XCloundDataManager, IMog
}
private MogoLatLng getMogoLat(MogoLatLng latlng) {
MogoLatLng newLocation = LocationUtils.getNewLocation(latlng, mCloundWarningInfo.getDistance(), mCloundWarningInfo.getDirection());
MogoLatLng newLocation = LocationUtils.getNewLocation(latlng, mCloundWarningInfo.getStopLineDistance(), mCloundWarningInfo.getDirection());
return newLocation;
}