Merge branch 'jj' into qa_yingyan_custom

This commit is contained in:
修改测试数据
2021-04-25 13:19:22 +08:00
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);

View File

@@ -59,6 +59,7 @@ public class V2XWarningWindow extends V2XBasWindow implements IV2XWindow {
private void initView(Context context) {
LayoutInflater.from(context).inflate(R.layout.v2x_road_front_warning_vr, this);
typeImage = findViewById(R.id.warning_type_image);
warningTextView = findViewById(R.id.warning_content_text);
distance = findViewById(R.id.warning_distance);
}
@@ -81,7 +82,6 @@ public class V2XWarningWindow extends V2XBasWindow implements IV2XWindow {
}
distance.setText(String.valueOf(mV2XWarningEntity.getDistance()) + "");
warningTextView.setText(mV2XWarningEntity.getWarningContent());
mV2XWarningEntity.setTts(0);
AIAssist.getInstance(V2XUtils.getApp()).speakTTSVoice(mV2XWarningEntity.getTts());
}
//3秒后移除提示弹框

View File

@@ -1,5 +1,5 @@
{
"type": 10013,
"type": 2,
"lat": 26.88008312,
"lon": 112.57147295,
"distance": 2,
@@ -21,7 +21,7 @@
"speed": 11.108121,
"targetColor": "#FF4040",
"stopLineDistance": 60,
"warningContent": "小心行人",
"warningContent": "注意摩托车",
"heading": 0,
"showTime": 8000,
"roadwidth": 4.0

View File

@@ -1,5 +1,5 @@
{
"type": 10013,
"type": 1,
"lat": 26.88008312,
"lon": 112.57147295,
"distance": 2,
@@ -21,7 +21,7 @@
"speed": 11.108121,
"targetColor": "#FF4040",
"stopLineDistance": 60,
"warningContent": "小心行人",
"warningContent": "注意自行车",
"heading": 0,
"showTime": 8000,
"roadwidth": 4.0

View File

@@ -1,5 +1,5 @@
{
"type": 10013,
"type": 0,
"lat": 26.88008312,
"lon": 112.57147295,
"distance": 2,