侧方识别物与预碰撞点之间添加箭头

This commit is contained in:
liujing
2021-04-15 17:58:57 +08:00
parent 3ff6b3d423
commit 4ea5137cdf
5 changed files with 35 additions and 22 deletions

View File

@@ -23,7 +23,11 @@ enum AdasRecognizedType {
//bus
classIdTrafficBus( "traffic_bus", 6 ),
//truck
classIdTrafficTruck( "traffic_truck", 8 );
classIdTrafficTruck( "traffic_truck", 8 ),
//stopLine
classIdStopLine("warning_stop_line",9),
//预警箭头
classIdWarningArrows("warning_arrows",10);
AdasRecognizedType( int code ) {
this.code = code;
@@ -45,8 +49,10 @@ enum AdasRecognizedType {
classIdMoto,
classIdTrafficSign,
classIdTrafficBus,
null,
classIdTrafficTruck,
classIdStopLine,
classIdWarningArrows,
null,
};
public String getRes() {

View File

@@ -125,17 +125,13 @@ public class V2XWarnDataDrawer extends BaseDrawer implements IMogoStatusChangedL
return marker;
}
public void drawerMarkerWithLocation(MarkerShowEntity markerShowEntity, MogoLatLng location) {
public void drawerArrowsMarkerWithLocation(MogoLatLng location, String markerType, int type) {
MogoMarkerOptions options = new MogoMarkerOptions()
.object(markerShowEntity)
.latitude(location.getLat())
.longitude(location.getLon());
IMarkerView iMarkerView = MapMarkerAdapter.getMarkerView(mContext, markerShowEntity, options);
options.icon3DRes(getModelRes(2)); //TODO
options.icon3DRes(getModelRes(type)); //TODO
options.anchorColor("#FB3C3CFF"); //红色#FF3036 蓝色:#256BFF
IMogoMarker marker = MogoApisHandler.getInstance().getApis().getMapServiceApi().getMarkerManager(mContext).addMarker(markerShowEntity.getMarkerType(), options);
iMarkerView.setMarker(marker);
IMogoMarker marker = MogoApisHandler.getInstance().getApis().getMapServiceApi().getMarkerManager(mContext).addMarker(markerType, options);
marker.setToTop();
}