增加针对场景的贴图替换
This commit is contained in:
@@ -5,6 +5,7 @@ import android.graphics.Bitmap;
|
||||
|
||||
import com.mogo.module.common.entity.MarkerShowEntity;
|
||||
import com.mogo.module.common.entity.V2XPoiTypeEnum;
|
||||
import com.mogo.module.common.entity.V2XPushMessageEntity;
|
||||
import com.mogo.module.common.entity.V2XRoadEventEntity;
|
||||
import com.mogo.module.v2x.R;
|
||||
import com.mogo.module.v2x.utils.ImageUtil;
|
||||
@@ -149,14 +150,38 @@ public class V2XMarkerAdapter {
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* TODO 都是模拟数据
|
||||
* 获取VR道路事件
|
||||
*/
|
||||
public static Bitmap getV2XVRRoadEventViewPng() {
|
||||
Bitmap bitmap = ImageUtil.createBitmap(V2XUtils.getApp(),R.drawable.v2x_duixiang_laiche_che_xian);
|
||||
public static Bitmap getV2XVRRoadEventViewPng(V2XPushMessageEntity alarmMessage) {
|
||||
Bitmap bitmap = ImageUtil.createBitmap(V2XUtils.getApp(),
|
||||
R.drawable.v2x_vr_ziche);
|
||||
switch (alarmMessage.getSceneId()) {
|
||||
case "200001"://后方VIP车辆提示
|
||||
bitmap = ImageUtil.createBitmap(V2XUtils.getApp(),
|
||||
R.drawable.v2x_duixiang_laiche_che);
|
||||
break;
|
||||
case "200002"://前车急刹
|
||||
break;
|
||||
case "200003"://后方危险车辆预警
|
||||
break;
|
||||
case "200004"://逆向车辆路线预判
|
||||
bitmap = ImageUtil.createBitmap(V2XUtils.getApp(),
|
||||
R.drawable.v2x_duixiang_laiche_che);
|
||||
break;
|
||||
case "200005"://VIP变灯通行
|
||||
break;
|
||||
case "200006"://障碍物绕行
|
||||
break;
|
||||
case "200007"://行人预警,行人路线预测
|
||||
break;
|
||||
case "200008"://拥堵路线推荐
|
||||
break;
|
||||
case "200009"://双闪车辆,自动绕行
|
||||
break;
|
||||
}
|
||||
|
||||
return bitmap;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -53,7 +53,7 @@ public class V2XPushVREventMarker implements IV2XMarker<V2XPushMessageEntity> {
|
||||
.longitude(entity.getLon());
|
||||
optionsRipple.anchor(0.5f, 0.5f);
|
||||
|
||||
optionsRipple.icon(V2XMarkerAdapter.getV2XVRRoadEventViewPng());
|
||||
optionsRipple.icon(V2XMarkerAdapter.getV2XVRRoadEventViewPng(entity));
|
||||
mAlarmInfoMarker = V2XServiceManager.getMarkerManager().addMarker(V2X_EVENT_ALARM_POI, optionsRipple);
|
||||
|
||||
drawablePloyLine(entity);
|
||||
|
||||
Reference in New Issue
Block a user