Merge branch 'qa_yingyan_custom' into dev2_aiSdk
# Conflicts: # foudations/mogo-commons/src/main/java/com/mogo/commons/debug/DebugConfig.java # modules/mogo-module-common/src/main/java/com/mogo/module/common/drawer/V2XWarnDataDrawer.java # modules/mogo-module-v2x/src/main/java/com/mogo/module/v2x/scenario/scene/warning/V2XWarningWindow.java
This commit is contained in:
@@ -470,7 +470,7 @@ public class DebugConfig {
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
|
||||
public synchronized static String getStatusData(int type){
|
||||
if(type > 4){
|
||||
return sStatus[type].toString();
|
||||
|
||||
@@ -94,7 +94,8 @@ 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(
|
||||
data.getDirection() == 1 ? data.getStopLines().get(1).lat : data.getCollisionLat(),
|
||||
@@ -111,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);
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
@@ -33,7 +33,7 @@
|
||||
android:paddingLeft="@dimen/dp_40"
|
||||
android:paddingRight="@dimen/dp_40"
|
||||
android:text="正在为您发起求助"
|
||||
android:textColor="@color/v2x_white"
|
||||
android:textColor="@color/v2x_white_color"
|
||||
android:textSize="@dimen/dp_32"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintStart_toEndOf="@+id/iv_event"
|
||||
|
||||
@@ -1,13 +1,13 @@
|
||||
{
|
||||
"type": 10013,
|
||||
"lat": 26.88008302,
|
||||
"type": 2,
|
||||
"lat": 26.88008312,
|
||||
"lon": 112.57147295,
|
||||
"distance": 2,
|
||||
"collisionLat": 26.88008302,
|
||||
"collisionLat": 26.88008312,
|
||||
"collisionLon": 112.57147295,
|
||||
"stopLines": [
|
||||
{
|
||||
"lat": 26.88008302,
|
||||
"lat": 26.88008312,
|
||||
"lon": 112.57147295
|
||||
},
|
||||
{
|
||||
@@ -21,7 +21,7 @@
|
||||
"speed": 11.108121,
|
||||
"targetColor": "#FF4040",
|
||||
"stopLineDistance": 60,
|
||||
"warningContent": "小心行人",
|
||||
"warningContent": "注意摩托车",
|
||||
"heading": 0,
|
||||
"showTime": 8000,
|
||||
"roadwidth": 4.0
|
||||
|
||||
@@ -1,13 +1,13 @@
|
||||
{
|
||||
"type": 10013,
|
||||
"lat": 26.88008302,
|
||||
"type": 1,
|
||||
"lat": 26.88008312,
|
||||
"lon": 112.57147295,
|
||||
"distance": 2,
|
||||
"collisionLat": 26.88008302,
|
||||
"collisionLat": 26.88008312,
|
||||
"collisionLon": 112.57147295,
|
||||
"stopLines": [
|
||||
{
|
||||
"lat": 26.88008302,
|
||||
"lat": 26.88008312,
|
||||
"lon": 112.57147295
|
||||
},
|
||||
{
|
||||
@@ -21,7 +21,7 @@
|
||||
"speed": 11.108121,
|
||||
"targetColor": "#FF4040",
|
||||
"stopLineDistance": 60,
|
||||
"warningContent": "小心行人",
|
||||
"warningContent": "注意自行车",
|
||||
"heading": 0,
|
||||
"showTime": 8000,
|
||||
"roadwidth": 4.0
|
||||
|
||||
@@ -1,13 +1,13 @@
|
||||
{
|
||||
"type": 10013,
|
||||
"lat": 26.88008302,
|
||||
"type": 0,
|
||||
"lat": 26.88008312,
|
||||
"lon": 112.57147295,
|
||||
"distance": 2,
|
||||
"collisionLat": 26.88008302,
|
||||
"collisionLat": 26.88008312,
|
||||
"collisionLon": 112.57147295,
|
||||
"stopLines": [
|
||||
{
|
||||
"lat": 26.88008302,
|
||||
"lat": 26.88008312,
|
||||
"lon": 112.57147295
|
||||
},
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user