弹框时间模拟数据内测,修改弹框取消时机

This commit is contained in:
liujing
2021-07-15 19:54:26 +08:00
parent 7d95479bcc
commit bf09b5a61a
5 changed files with 51 additions and 89 deletions

View File

@@ -74,7 +74,7 @@ public class V2XWarnDataDrawer extends BaseDrawer implements IMogoStatusChangedL
/**
* 绘制行人和二轮车,前方和左右
* 识别物移动
*
* @param data
*/
@@ -87,12 +87,10 @@ public class V2XWarnDataDrawer extends BaseDrawer implements IMogoStatusChangedL
markerShowEntity.setMarkerLocation(location);
markerShowEntity.setMarkerType(TYPE_MARKER_CLOUD_WARN_DATA);
IMogoMarker marker = drawMarker(markerShowEntity, modeResType(data.getType()));
//识别物
marker.addDynamicAnchorPosition(new MogoLatLng(data.getCollisionLat(), data.getCollisionLon()), (float) data.getHeading(), 5000);
//移动完成以后3s后消失
marker.addDynamicAnchorPosition(new MogoLatLng(data.getCollisionLat(), data.getCollisionLon()), (float) data.getHeading(), (long) (data.getShowTime() * 1000));
UiThreadHandler.postDelayed(() -> {
marker.remove();
}, data.getShowTime());
}, data.getShowTime() * 1000);
}