侧方识别物与预碰撞点之间添加箭头marker
This commit is contained in:
@@ -11,6 +11,7 @@ import com.mogo.map.navi.IMogoCarLocationChangedListener2;
|
||||
import com.mogo.map.overlay.IMogoPolyline;
|
||||
import com.mogo.module.common.MogoApisHandler;
|
||||
import com.mogo.module.common.drawer.V2XWarnDataDrawer;
|
||||
import com.mogo.module.common.entity.MarkerShowEntity;
|
||||
import com.mogo.module.common.entity.V2XWarningEntity;
|
||||
import com.mogo.module.common.utils.Trigonometric;
|
||||
import com.mogo.module.service.MarkerServiceHandler;
|
||||
@@ -119,7 +120,7 @@ public class MoGoV2XCloundDataManager implements IMoGoV2XCloundDataManager, IMog
|
||||
}
|
||||
|
||||
/**
|
||||
* 绘制红色区域(停止线继续前行的预警区域) TODO 需要实时给行人当前位置
|
||||
* 车辆行驶正前方绘制红色区域(停止线继续前行的预警区域) TODO 需要实时给行人当前位置
|
||||
*/
|
||||
private void drawStopLine(V2XWarningEntity info, MogoLatLng mogoLatLng) {
|
||||
if (info != null) {
|
||||
@@ -153,7 +154,7 @@ public class MoGoV2XCloundDataManager implements IMoGoV2XCloundDataManager, IMog
|
||||
|
||||
|
||||
/**
|
||||
* 目标物与预碰撞点连线,并且更新数据 TODO 需要实时给行人当前位置
|
||||
* 侧方目标物与预碰撞点连线,并且更新数据 TODO 需要实时给行人当前位置
|
||||
*/
|
||||
private void drawOtherObjectLine(V2XWarningEntity info) {
|
||||
if (info != null) {
|
||||
@@ -185,6 +186,21 @@ public class MoGoV2XCloundDataManager implements IMoGoV2XCloundDataManager, IMog
|
||||
}
|
||||
}
|
||||
|
||||
//侧面目标物与碰撞点之间添加多个小箭头
|
||||
private void addArrows(MogoLatLng startLatLng, MogoLatLng endLatLng) {
|
||||
MarkerShowEntity markerShowEntity = new MarkerShowEntity();
|
||||
float distance = CoordinateUtils.calculateLineDistance(
|
||||
startLatLng.lon, startLatLng.lat, endLatLng.lon, endLatLng.lat);
|
||||
if (distance > 5) {
|
||||
int count = (int) (distance / 5);
|
||||
for (int i = 0; i < count; i++) {
|
||||
MogoLatLng newLo = Trigonometric.getNewLocation(
|
||||
startLatLng, 5 * i, mCloundWarningInfo.getAngle());
|
||||
V2XWarnDataDrawer.getInstance().drawerMarkerWithLocation(markerShowEntity, newLo);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void clearALLPOI() {
|
||||
|
||||
|
||||
Reference in New Issue
Block a user