修改测试数据

This commit is contained in:
修改测试数据
2021-04-25 13:18:57 +08:00
parent 24e81b73c8
commit 3a252c0a75
5 changed files with 26 additions and 9 deletions

View File

@@ -94,7 +94,7 @@ public class V2XWarnDataDrawer extends BaseDrawer implements IMogoStatusChangedL
MogoLatLng stopLineNew = Trigonometric.getNewLocation(data.getStopLines().get(1), 5, 180);
MogoLatLng newLocation = Trigonometric.getNewLocation(mogoLatLng, 5, 180);
IMogoMarker marker = drawMarker(markerShowEntity);
IMogoMarker marker = drawMarker(markerShowEntity, modeResType(data.getType()));
Log.d("liyz", "renderWarnData marker != null direction = " + data.getDirection());
//识别物
marker.addDynamicAnchorPosition(new MogoLatLng(
@@ -112,14 +112,31 @@ public class V2XWarnDataDrawer extends BaseDrawer implements IMogoStatusChangedL
}
//根据识别物类型 (行人0/自行车1/摩托车2/小汽车3/公交车4)获取3D模型(对应查看getModelRes)
private int modeResType(int dataType) {
switch (dataType) {
case 0:
return 1;
case 1:
return 2;
case 2:
return 4;
case 3:
return 3;
case 4:
return 6;
}
return 1;
}
public IMogoMarker drawMarker(MarkerShowEntity markerShowEntity) {
public IMogoMarker drawMarker(MarkerShowEntity markerShowEntity, int modeResType) {
MogoMarkerOptions options = new MogoMarkerOptions()
.object(markerShowEntity)
.latitude(markerShowEntity.getMarkerLocation().getLat())
.longitude(markerShowEntity.getMarkerLocation().getLon());
IMarkerView iMarkerView = MapMarkerAdapter.getMarkerView(mContext, markerShowEntity, options);
options.icon3DRes(getModelRes(1)); //TODO
options.icon3DRes(getModelRes(modeResType)); //TODO
options.anchorColor("#FB3C3CFF"); //红色#FF3036 蓝色:#256BFF
IMogoMarker marker = MogoApisHandler.getInstance().getApis().getMapServiceApi().getMarkerManager(mContext).addMarker(markerShowEntity.getMarkerType(), options);