删除无用的资源
26
.idea/misc.xml
generated
@@ -16,6 +16,9 @@
|
||||
<entry key="../../../../layout/custom_preview.xml" value="0.14635416666666667" />
|
||||
<entry key="OCH/mogo-och/src/main/res/layout/module_mogo_och_base_fragment.xml" value="0.1953125" />
|
||||
<entry key="modules/mogo-module-authorize/src/main/res/layout/module_authorize_fragment.xml" value="0.273046875" />
|
||||
<entry key="modules/mogo-module-common/src/main/res-warning/drawable/bg_waring_limiting_velocity.xml" value="0.109375" />
|
||||
<entry key="modules/mogo-module-common/src/main/res-warning/drawable/bg_waring_traffic_light_vr.xml" value="0.109375" />
|
||||
<entry key="modules/mogo-module-common/src/main/res-warning/drawable/bg_warning_bg.xml" value="0.109375" />
|
||||
<entry key="modules/mogo-module-common/src/main/res/drawable/bg_v2x_event_type_blue.xml" value="0.1390625" />
|
||||
<entry key="modules/mogo-module-common/src/main/res/drawable/bg_v2x_event_type_red_vr.xml" value="0.2421875" />
|
||||
<entry key="modules/mogo-module-extensions/src/main/res/layout/camera_item_v2x_live_video.xml" value="0.28854166666666664" />
|
||||
@@ -24,6 +27,7 @@
|
||||
<entry key="modules/mogo-module-extensions/src/main/res/layout/include_debug_panel.xml" value="0.28854166666666664" />
|
||||
<entry key="modules/mogo-module-extensions/src/main/res/layout/merge_vertical_traffic_light_in_vr.xml" value="0.27447916666666666" />
|
||||
<entry key="modules/mogo-module-extensions/src/main/res/layout/module_ext_include_seeking_help_notice.xml" value="0.28854166666666664" />
|
||||
<entry key="modules/mogo-module-extensions/src/main/res/layout/module_ext_layout_crash_threshold_set.xml" value="0.11979166666666667" />
|
||||
<entry key="modules/mogo-module-extensions/src/main/res/layout/module_ext_layout_entrance.xml" value="0.2953125" />
|
||||
<entry key="modules/mogo-module-extensions/src/main/res/layout/module_ext_layout_entrance_no_map.xml" value="0.28854166666666664" />
|
||||
<entry key="modules/mogo-module-extensions/src/main/res/layout/module_ext_layout_extensions.xml" value="0.28854166666666664" />
|
||||
@@ -54,12 +58,34 @@
|
||||
<entry key="modules/mogo-module-service/src/main/res/layout/module_services_fragment_online_car_panel.xml" value="0.28919677734374993" />
|
||||
<entry key="modules/mogo-module-share/src/main/res/layout/launcher_dialog_share.xml" value="0.25416666666666665" />
|
||||
<entry key="modules/mogo-module-smp/src/main/res/layout/module_small_map_view.xml" value="0.3338541666666667" />
|
||||
<entry key="modules/mogo-module-v2x/src/main/res/drawable/bg_live_video.xml" value="0.1" />
|
||||
<entry key="modules/mogo-module-v2x/src/main/res/drawable/bg_v2x_cancel_help.xml" value="0.2421875" />
|
||||
<entry key="modules/mogo-module-v2x/src/main/res/drawable/bg_v2x_event_surrounding_item.xml" value="0.1" />
|
||||
<entry key="modules/mogo-module-v2x/src/main/res/drawable/bg_v2x_event_surrounding_item_bottom.xml" value="0.1" />
|
||||
<entry key="modules/mogo-module-v2x/src/main/res/drawable/bg_v2x_event_type_blue.xml" value="0.1390625" />
|
||||
<entry key="modules/mogo-module-v2x/src/main/res/drawable/bg_v2x_event_type_orange.xml" value="0.1359375" />
|
||||
<entry key="modules/mogo-module-v2x/src/main/res/drawable/bg_v2x_event_type_orange_vr.xml" value="0.1359375" />
|
||||
<entry key="modules/mogo-module-v2x/src/main/res/drawable/bg_v2x_event_type_read.xml" value="0.2421875" />
|
||||
<entry key="modules/mogo-module-v2x/src/main/res/drawable/bg_v2x_event_type_red_vr.xml" value="0.2421875" />
|
||||
<entry key="modules/mogo-module-v2x/src/main/res/drawable/bg_v2x_surrounding_road_type.xml" value="0.1" />
|
||||
<entry key="modules/mogo-module-v2x/src/main/res/drawable/bgg_v2x_event_eva.xml" value="0.1" />
|
||||
<entry key="modules/mogo-module-v2x/src/main/res/drawable/selector_zan_btn.xml" value="0.1" />
|
||||
<entry key="modules/mogo-module-v2x/src/main/res/drawable/v2x_cover_bg.xml" value="0.1" />
|
||||
<entry key="modules/mogo-module-v2x/src/main/res/drawable/v2x_event_type_title_bg.xml" value="0.1" />
|
||||
<entry key="modules/mogo-module-v2x/src/main/res/drawable/v2x_fault_help_bg.xml" value="0.1" />
|
||||
<entry key="modules/mogo-module-v2x/src/main/res/drawable/v2x_fault_help_title_bg.xml" value="0.1" />
|
||||
<entry key="modules/mogo-module-v2x/src/main/res/drawable/v2x_feedback_bg.xml" value="0.1" />
|
||||
<entry key="modules/mogo-module-v2x/src/main/res/drawable/v2x_gas_station_title_bg.xml" value="0.1" />
|
||||
<entry key="modules/mogo-module-v2x/src/main/res/drawable/v2x_help_btn_cancel_bg.xml" value="0.1" />
|
||||
<entry key="modules/mogo-module-v2x/src/main/res/drawable/v2x_help_btn_ok_bg.xml" value="0.1" />
|
||||
<entry key="modules/mogo-module-v2x/src/main/res/drawable/v2x_help_info_speed_bg.xml" value="0.1" />
|
||||
<entry key="modules/mogo-module-v2x/src/main/res/drawable/v2x_help_info_title_bg.xml" value="0.1" />
|
||||
<entry key="modules/mogo-module-v2x/src/main/res/layout/item_v2x_event_detail_stub_live.xml" value="0.1" />
|
||||
<entry key="modules/mogo-module-v2x/src/main/res/layout/item_v2x_fatigue_driving_vr.xml" value="0.1" />
|
||||
<entry key="modules/mogo-module-v2x/src/main/res/layout/view_marker_event_car_vr.xml" value="0.1" />
|
||||
<entry key="modules/mogo-module-v2x/src/main/res/layout/window_prejected_road_event_detail.xml" value="0.1" />
|
||||
<entry key="modules/mogo-module-v2x/src/main/res/layout/window_simple_obu_event_detail.xml" value="0.1" />
|
||||
<entry key="modules/mogo-module-v2x/src/main/res/layout/window_test_console.xml" value="0.1" />
|
||||
<entry key="modules/mogo-module-widgets/src/main/res/layout/module_widgets_app_entrance.xml" value="0.2838541666666667" />
|
||||
</map>
|
||||
</option>
|
||||
|
||||
@@ -18,7 +18,7 @@ import com.mogo.module.common.entity.MarkerNoveltyInfo;
|
||||
import com.mogo.module.common.entity.MarkerOnlineCar;
|
||||
import com.mogo.module.common.entity.MarkerShareMusic;
|
||||
import com.mogo.module.common.entity.MarkerShowEntity;
|
||||
import com.mogo.module.common.enums.SceneTypeEnum;
|
||||
import com.mogo.module.common.enums.EventTypeEnum;
|
||||
import com.mogo.utils.logger.Logger;
|
||||
|
||||
import java.util.HashMap;
|
||||
@@ -90,7 +90,7 @@ class MarkerDrawer {
|
||||
Object bindObj = markerShowEntity.getBindObj();
|
||||
if (bindObj instanceof MarkerExploreWay && ((MarkerExploreWay) bindObj).getPoiType() != null) {
|
||||
String poiType = ((MarkerExploreWay) bindObj).getPoiType();
|
||||
options.icon3DRes(SceneTypeEnum.getMarker3DRes(poiType));
|
||||
options.icon3DRes(EventTypeEnum.getMarker3DRes(poiType));
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -3,7 +3,7 @@ package com.mogo.module.common.entity;
|
||||
|
||||
import android.text.TextUtils;
|
||||
|
||||
import com.mogo.module.common.enums.SceneTypeEnum;
|
||||
import com.mogo.module.common.enums.EventTypeEnum;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.List;
|
||||
@@ -15,7 +15,7 @@ public class MarkerExploreWay implements Serializable {
|
||||
private String infoId;
|
||||
private String type;//卡片类型,
|
||||
/**
|
||||
* @see SceneTypeEnum
|
||||
* @see EventTypeEnum
|
||||
*/
|
||||
private String poiType;
|
||||
private String sn;
|
||||
@@ -156,7 +156,7 @@ public class MarkerExploreWay implements Serializable {
|
||||
|
||||
public String getPoiType() {
|
||||
if (TextUtils.isEmpty(poiType)) {
|
||||
return SceneTypeEnum.FOURS_BLOCK_UP.getPoiType();
|
||||
return EventTypeEnum.FOURS_BLOCK_UP.getPoiType();
|
||||
}
|
||||
return poiType;
|
||||
}
|
||||
|
||||
@@ -9,7 +9,7 @@ public class MarkerNoveltyInfo {
|
||||
private String sn;
|
||||
private MarkerLocation location;
|
||||
/**
|
||||
* @see MarkerPoiTypeEnum
|
||||
* @see com.mogo.module.common.enums.EventTypeEnum
|
||||
*/
|
||||
private String poiType;
|
||||
private ContentData contentData;
|
||||
|
||||
@@ -1,55 +0,0 @@
|
||||
package com.mogo.module.common.entity;
|
||||
|
||||
/**
|
||||
* author : donghongyu
|
||||
* e-mail : 1358506549@qq.com
|
||||
* date : 2020-01-1514:47
|
||||
* desc : 车机启动状态
|
||||
* version: 1.0
|
||||
*/
|
||||
public interface MarkerPoiTypeEnum {
|
||||
//加油站
|
||||
String GAS_STATION = "10001";
|
||||
//交通检查
|
||||
String TRAFFIC_CHECK = "10002";
|
||||
//封路
|
||||
String ROAD_CLOSED = "10003";
|
||||
//商场打折
|
||||
String SHOP_DISCOUNT = "10004";
|
||||
//4S店
|
||||
String FOURS_4S = "10005";
|
||||
//施工
|
||||
String FOURS_ROAD_WORK = "10006";
|
||||
//拥堵
|
||||
String FOURS_BLOCK_UP = "10007";
|
||||
//积水
|
||||
String FOURS_PONDING = "10008";
|
||||
//超市打折
|
||||
String FOURS_SHOP_FREE = "10009";
|
||||
//浓雾
|
||||
String FOURS_FOG = "10010";
|
||||
//结冰
|
||||
String FOURS_ICE = "10011";
|
||||
//停车场
|
||||
String FOURS_PARKING = "10012";
|
||||
//事故
|
||||
String FOURS_ACCIDENT = "10013";
|
||||
//重大事故
|
||||
String FOURS_ACCIDENT_01 = "1001301";
|
||||
//特大事故
|
||||
String FOURS_ACCIDENT_02 = "1001302";
|
||||
//较大事故
|
||||
String FOURS_ACCIDENT_03 = "1001303";
|
||||
//一般事故
|
||||
String FOURS_ACCIDENT_04 = "1001304";
|
||||
//轻微事故
|
||||
String FOURS_ACCIDENT_05 = "1001305";
|
||||
//身边
|
||||
String FOURS_NEALY = "10014";
|
||||
//实时路况
|
||||
String FOURS_LIVING = "10015";
|
||||
//违章停车
|
||||
String ILLEGAL_PARK_LIVING = "10016";
|
||||
//路面湿滑
|
||||
String ROAD_SLIPPERY = "10021";
|
||||
}
|
||||
@@ -1,31 +0,0 @@
|
||||
package com.mogo.module.common.entity;
|
||||
|
||||
/**
|
||||
* author : donghongyu
|
||||
* e-mail : 1358506549@qq.com
|
||||
* date : 2020/3/31 4:53 PM
|
||||
* desc : V2X 道路事件类型
|
||||
* version: 1.0
|
||||
*/
|
||||
public interface V2XPoiTypeEnum extends MarkerPoiTypeEnum {
|
||||
// 前方静止or慢速车辆报警
|
||||
String ALERT_FRONT_CAR = "99999";
|
||||
// 限行管理
|
||||
String ALERT_TRAFFIC_CONTROL = "99998";
|
||||
// 红绿灯事件、是建议以多少速度驶过
|
||||
String ALERT_TRAFFIC_LIGHT_SUGGEST = "99997";
|
||||
// 红绿灯事件、一种是绿灯不足3秒
|
||||
String ALERT_TRAFFIC_LIGHT_WARNING = "99996";
|
||||
// 故障车辆
|
||||
int ALERT_CAR_TROUBLE_WARNING = 20007;
|
||||
// 疲劳驾驶
|
||||
String ALERT_FATIGUE_DRIVING = "99993";
|
||||
// 违章停车
|
||||
String ALERT_ILLEGAL_PARK = "99992";
|
||||
|
||||
// TODO 这里目前是演示DEMO会用到,想着是打算商用,先这么处理的
|
||||
// 取快递
|
||||
String ALERT_TRAFFIC_EXPRESS = "99995";
|
||||
// 顺风车
|
||||
String ALERT_TRAFFIC_TAXI = "99994";
|
||||
}
|
||||
@@ -2,7 +2,7 @@ package com.mogo.module.common.entity;
|
||||
|
||||
import android.text.TextUtils;
|
||||
|
||||
import com.mogo.module.common.enums.SceneTypeEnum;
|
||||
import com.mogo.module.common.enums.EventTypeEnum;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.Objects;
|
||||
@@ -16,7 +16,7 @@ import java.util.Objects;
|
||||
*/
|
||||
public class V2XRoadEventEntity implements Serializable {
|
||||
/**
|
||||
* @see MarkerPoiTypeEnum
|
||||
* @see EventTypeEnum
|
||||
*/
|
||||
// 事件类型
|
||||
private String poiType;
|
||||
@@ -59,7 +59,7 @@ public class V2XRoadEventEntity implements Serializable {
|
||||
|
||||
public String getTts(boolean haveLiveCar) {
|
||||
tts = "前方#" + (int) getDistance() + "米#";
|
||||
tts += SceneTypeEnum.getTts(getPoiType());
|
||||
tts += EventTypeEnum.getTts(getPoiType());
|
||||
if (haveLiveCar) {
|
||||
tts += ",查看实况请说确定。";
|
||||
setShowEventButton(true);
|
||||
@@ -75,7 +75,7 @@ public class V2XRoadEventEntity implements Serializable {
|
||||
*/
|
||||
public String getTtsWithFeedback() {
|
||||
tts = "检测到附近";
|
||||
tts += SceneTypeEnum.getTtsWithFeedback(getPoiType());
|
||||
tts += EventTypeEnum.getTtsWithFeedback(getPoiType());
|
||||
tts += ",确认该信息是否正确?您可以说“正确”或“错误”帮助其他车友。";
|
||||
return tts;
|
||||
}
|
||||
@@ -97,7 +97,7 @@ public class V2XRoadEventEntity implements Serializable {
|
||||
}
|
||||
|
||||
public String getAlarmContent() {
|
||||
alarmContent = SceneTypeEnum.getAlarmContent(getPoiType());
|
||||
alarmContent = EventTypeEnum.getAlarmContent(getPoiType());
|
||||
return alarmContent;
|
||||
}
|
||||
|
||||
|
||||
@@ -0,0 +1,852 @@
|
||||
package com.mogo.module.common.enums
|
||||
|
||||
import com.mogo.module.common.R
|
||||
import com.mogo.module.common.utils.CloudPoiManager
|
||||
import com.mogo.module.common.utils.Const.*
|
||||
import com.zhidao.support.obu.constants.ObuConstants
|
||||
|
||||
/**
|
||||
* OBU、V2N事件类型枚举类
|
||||
*/
|
||||
enum class EventTypeEnum(
|
||||
val poiType: String, val poiTypeStr: String = "",
|
||||
val poiTypeStrVr: String = "",
|
||||
val poiTypeSrcVr: Int = R.drawable.v2x_icon_live_logo,
|
||||
val content: String = "", val tts: String = ""
|
||||
) {
|
||||
//加油站
|
||||
GAS_STATION("10001", "加油站", content = "加油站附近", tts = "加油站"),
|
||||
|
||||
//交通检查
|
||||
TRAFFIC_CHECK("10002", "交通检查", "前方交通检查",
|
||||
R.drawable.v2x_icon_jiaotongjiancha_vr, "前方交通检查", "交通检查"),
|
||||
|
||||
//封路
|
||||
ROAD_CLOSED("10003", "封路", "前方封路", R.drawable.v2x_icon_fenglu_vr,
|
||||
"前方封路", "道路封路"),
|
||||
|
||||
//商场打折
|
||||
SHOP_DISCOUNT("10004", ""),
|
||||
|
||||
//4S店
|
||||
FOURS_4S("10005", ""),
|
||||
|
||||
//施工
|
||||
FOURS_ROAD_WORK("10006", "道路施工", "前方施工", R.drawable.v2x_icon_daolushigong_vr,
|
||||
"前方施工", "道路施工"),
|
||||
|
||||
//拥堵
|
||||
FOURS_BLOCK_UP("10007", "道路拥堵", "前方拥堵", R.drawable.v2x_icon_yongdu_vr,
|
||||
"前方道路拥堵", "道路拥堵"),
|
||||
|
||||
//积水
|
||||
FOURS_PONDING("10008", "道路积水", "前方道路积水", R.drawable.v2x_icon_jishui_vr,
|
||||
"前方道路积水", "道路积水"),
|
||||
|
||||
//超市打折
|
||||
FOURS_SHOP_FREE("10009", ""),
|
||||
|
||||
//浓雾
|
||||
FOURS_FOG("10010", "出现浓雾", "浓雾预警", R.drawable.v2x_icon_nongwu_vr,
|
||||
"前方出现浓雾", "出现浓雾"),
|
||||
|
||||
//结冰
|
||||
FOURS_ICE("10011", "路面结冰", content = "前方路面结冰", tts = "路面结冰"),
|
||||
|
||||
//停车场
|
||||
FOURS_PARKING("10012", "停车场", content = "停车场附近", tts = "停车场"),
|
||||
|
||||
//事故
|
||||
FOURS_ACCIDENT("10013", "交通事故", "前方交通事故", R.drawable.v2x_icon_jiaotongshigu_vr,
|
||||
"前方交通事故", "交通事故"),
|
||||
|
||||
//重大事故
|
||||
FOURS_ACCIDENT_01("1001301", "交通事故", "前方交通事故", R.drawable.v2x_icon_jiaotongshigu_vr,
|
||||
"前方交通事故", "交通事故"),
|
||||
|
||||
//特大事故
|
||||
FOURS_ACCIDENT_02("1001302", "交通事故", "前方交通事故", R.drawable.v2x_icon_jiaotongshigu_vr,
|
||||
"前方交通事故", "交通事故"),
|
||||
|
||||
//较大事故
|
||||
FOURS_ACCIDENT_03("1001303", "交通事故", "前方交通事故", R.drawable.v2x_icon_jiaotongshigu_vr,
|
||||
"前方交通事故", "交通事故"),
|
||||
|
||||
//一般事故
|
||||
FOURS_ACCIDENT_04("1001304", "交通事故", "前方交通事故", R.drawable.v2x_icon_jiaotongshigu_vr,
|
||||
"前方交通事故", "交通事故"),
|
||||
|
||||
//轻微事故
|
||||
FOURS_ACCIDENT_05("1001305", "交通事故", "前方交通事故", R.drawable.v2x_icon_jiaotongshigu_vr,
|
||||
"前方交通事故", "交通事故"),
|
||||
|
||||
//身边
|
||||
FOURS_NEALY("10014", "身边事件"),
|
||||
|
||||
//实时路况
|
||||
FOURS_LIVING("10015", "实时路况"),
|
||||
|
||||
//违章停车
|
||||
ILLEGAL_PARK_LIVING("10016"),
|
||||
|
||||
//路面湿滑
|
||||
ROAD_SLIPPERY("10021"),
|
||||
|
||||
// 前方静止or慢速车辆报警
|
||||
ALERT_FRONT_CAR("99999"),
|
||||
|
||||
// 限行管理
|
||||
ALERT_TRAFFIC_CONTROL("99998"),
|
||||
|
||||
// 红绿灯事件、是建议以多少速度驶过
|
||||
ALERT_TRAFFIC_LIGHT_SUGGEST("99997"),
|
||||
|
||||
// 红绿灯事件、一种是绿灯不足3秒
|
||||
ALERT_TRAFFIC_LIGHT_WARNING("99996"),
|
||||
|
||||
// 故障车辆
|
||||
ALERT_CAR_TROUBLE_WARNING("20007"),
|
||||
|
||||
// 疲劳驾驶
|
||||
ALERT_FATIGUE_DRIVING("99993"),
|
||||
|
||||
// 违章停车
|
||||
ALERT_ILLEGAL_PARK("99992"),
|
||||
|
||||
// TODO 这里目前是演示DEMO会用到,想着是打算商用,先这么处理的
|
||||
// 取快递
|
||||
ALERT_TRAFFIC_EXPRESS("99995"),
|
||||
|
||||
// 顺风车
|
||||
ALERT_TRAFFIC_TAXI("99994"),
|
||||
|
||||
TYPE_USECASE_ID_EBW(
|
||||
ObuConstants.USE_CASE_ID.EBW.toString(),
|
||||
"紧急制动预警",
|
||||
poiTypeSrcVr=R.drawable.icon_warning_v2x_emergency_brake,
|
||||
content="前车急刹车",
|
||||
tts = "前车急刹车"
|
||||
),
|
||||
TYPE_USECASE_ID_FCW(
|
||||
ObuConstants.USE_CASE_ID.FCW.toString(),
|
||||
"前向碰撞预警",
|
||||
poiTypeSrcVr=R.drawable.icon_warning_v2x_collision_warning,
|
||||
content="前车碰撞预警",
|
||||
tts="小心前车"
|
||||
),
|
||||
TYPE_USECASE_ID_ICW(
|
||||
ObuConstants.USE_CASE_ID.ICW.toString(),
|
||||
"交叉路口碰撞预警",
|
||||
poiTypeSrcVr=R.drawable.icon_warning_v2x_collision_warning,
|
||||
content="交叉路口碰撞预警",
|
||||
tts="注意交叉路口车辆"
|
||||
),
|
||||
TYPE_USECASE_ID_CLW(
|
||||
ObuConstants.USE_CASE_ID.CLW.toString(),
|
||||
"车辆失控预警",
|
||||
poiTypeSrcVr=R.drawable.icon_warning_v2x_vehicle_control,
|
||||
content="前车失控预警",
|
||||
tts="小心前方失控车辆"
|
||||
),
|
||||
TYPE_USECASE_ID_DNPW(
|
||||
ObuConstants.USE_CASE_ID.DNPW.toString(),
|
||||
"逆向超车预警",
|
||||
poiTypeSrcVr=R.drawable.icon_warning_v2x_reverse_overtaking,
|
||||
content="逆向超车预警",
|
||||
tts="注意对向来车"
|
||||
),
|
||||
TYPE_USECASE_ID_AVW(
|
||||
ObuConstants.USE_CASE_ID.AVW.toString(),
|
||||
"异常车辆提醒",
|
||||
poiTypeSrcVr=R.drawable.icon_warning_v2x_abnormal_vehicle,
|
||||
content="前车异常",
|
||||
tts="小心前方异常车辆"
|
||||
),
|
||||
TYPE_USECASE_ID_BSW(
|
||||
ObuConstants.USE_CASE_ID.BSW.toString(),
|
||||
"盲区预警",
|
||||
poiTypeSrcVr=R.drawable.icon_warning_v2x_blind_area_collision,
|
||||
content="%s后盲区预警",
|
||||
tts="注意%s后车辆"
|
||||
),
|
||||
TYPE_USECASE_ID_LCW(
|
||||
ObuConstants.USE_CASE_ID.LCW.toString(),
|
||||
"变道预警",
|
||||
poiTypeSrcVr=R.drawable.icon_warning_v2x_reverse_overtaking,
|
||||
content="%s向变道预警",
|
||||
tts="注意%s后车辆"
|
||||
),//注意左后车辆/注意右后车辆
|
||||
TYPE_USECASE_ID_EVW(
|
||||
ObuConstants.USE_CASE_ID.EVW.toString(),
|
||||
"紧急车辆提醒",
|
||||
poiTypeSrcVr=R.drawable.icon_warning_v2x_special_vehicle_access,
|
||||
content="请避让特种车辆",
|
||||
tts="后方特种车辆请避让"
|
||||
),
|
||||
TYPE_USECASE_ID_VRUCW_PERSON(
|
||||
0X2B0201.toString(),
|
||||
"弱势交通参与者碰撞预警",
|
||||
poiTypeSrcVr=R.drawable.icon_warning_v2x_pedestrian_crossing,
|
||||
content="行人碰撞预警",
|
||||
tts="行人碰撞预警"
|
||||
),//行人/摩托车碰撞预警
|
||||
TYPE_USECASE_ID_VRUCW_MOTORBIKE(
|
||||
0X2B0202.toString(),
|
||||
"弱势交通参与者碰撞预警",
|
||||
poiTypeSrcVr=R.drawable.icon_warning_v2x_motorcycle_collision,
|
||||
content="摩托车碰撞预警",
|
||||
tts="摩托车碰撞预警"
|
||||
),//摩托车碰撞预警
|
||||
TYPE_USECASE_ID_SLW(
|
||||
ObuConstants.USE_CASE_ID.SLW.toString(),
|
||||
"限速预警",
|
||||
poiTypeSrcVr=R.drawable.icon_warning_v2x_over_speed,
|
||||
content="已超速",
|
||||
tts=""
|
||||
),
|
||||
TYPE_USECASE_ID_LTA(
|
||||
ObuConstants.USE_CASE_ID.LTA.toString(),
|
||||
"左转辅助",
|
||||
poiTypeSrcVr=R.drawable.icon_warning_v2x_collision_warning,
|
||||
content="左转碰撞预警",
|
||||
tts="注意%s后车辆"
|
||||
),
|
||||
TYPE_USECASE_ID_HLW(
|
||||
ObuConstants.USE_CASE_ID.HLW.toString(),
|
||||
"道路危险情况预警",
|
||||
poiTypeSrcVr=R.drawable.icon_warning_v2x_road_dangerous,
|
||||
content="道路危险情况预警",
|
||||
tts="前方路况危险,小心行驶"
|
||||
),//(如果能给出具体的类别,则播报具体危险类别)
|
||||
TYPE_USECASE_ID_IVS(
|
||||
ObuConstants.USE_CASE_ID.IVS.toString(),
|
||||
"车内标牌",
|
||||
poiTypeSrcVr=R.drawable.icon_warning_v2x_road_construction,
|
||||
content="前方施工",
|
||||
tts=""
|
||||
),
|
||||
TYPE_USECASE_ID_TJW(
|
||||
ObuConstants.USE_CASE_ID.TJW.toString(),
|
||||
"前方拥堵提醒",
|
||||
poiTypeSrcVr=R.drawable.icon_warning_v2x_congestion,
|
||||
content="前方道路拥堵",
|
||||
tts="前方%d米道路拥堵,请减速慢行"
|
||||
),
|
||||
TYPE_USECASE_ID_IVP(
|
||||
ObuConstants.USE_CASE_ID.IVP.toString(),
|
||||
"闯红灯预警",
|
||||
poiTypeSrcVr=R.drawable.icon_warning_v2x_traffic_lights_red,
|
||||
content="路口红灯,禁止通行",
|
||||
tts="路口红灯,禁止通行"
|
||||
),
|
||||
TYPE_USECASE_ID_IVP_GREEN(
|
||||
0x2B091.toString(),
|
||||
"绿波通行",
|
||||
poiTypeSrcVr=R.drawable.icon_warning_v2x_traffic_lights_green,
|
||||
content="绿波通行 %s km/h",
|
||||
tts="前方路口建议车速 %s 公里每小时"
|
||||
),
|
||||
TYPE_USECASE_ID_COC(
|
||||
ObuConstants.USE_CASE_ID.COC.toString(),
|
||||
"预留",
|
||||
poiTypeSrcVr=R.drawable.icon_warning_v2x_abnormal_vehicle,
|
||||
content="路况预警",
|
||||
tts="路况预警"
|
||||
),
|
||||
TYPE_USECASE_ID_ROAD_TRAMCAR(
|
||||
0x2C01.toString(),
|
||||
"前方有轨电车提醒",
|
||||
poiTypeSrcVr=R.drawable.icon_warning_v2x_tramcar,
|
||||
content="前方有轨电车提醒",
|
||||
tts="前方有轨电车经过,请注意行驶安全"
|
||||
),
|
||||
TYPE_USECASE_ID_ROAD_TURN_LEFT_SHARP(
|
||||
0x2C02.toString(),
|
||||
"前方左转急弯",
|
||||
poiTypeSrcVr=R.drawable.icon_warning_v2x_turn_left_sharp,
|
||||
content="前方左转急弯",
|
||||
tts="前方路口左转急弯,请减速慢行",
|
||||
),
|
||||
TYPE_USECASE_ID_ROAD_TURN_RIGHT_SHARP(
|
||||
0x2C03.toString(),
|
||||
"前方右转急弯",
|
||||
poiTypeSrcVr=R.drawable.icon_warning_v2x_turn_right_sharp,
|
||||
content="前方右转急弯",
|
||||
tts="前方路口右转急弯,请减速慢行"
|
||||
),
|
||||
TYPE_USECASE_ID_ROAD_PEDESTRIAN_CROSSING(
|
||||
0x2C04.toString(),
|
||||
"人行横道",
|
||||
poiTypeSrcVr=R.drawable.icon_warning_v2x_pedestrian_crossing,
|
||||
content="前方人行横道",
|
||||
tts="前方人行横道"
|
||||
),
|
||||
TYPE_USECASE_ID_ROAD_PEDESTRIAN_SCHOOL(
|
||||
0x2C05.toString(),
|
||||
"学校",
|
||||
poiTypeSrcVr=R.drawable.icon_warning_v2x_school,
|
||||
content="前方学校,减速慢行",
|
||||
tts="前方人行横道,请减速慢行"
|
||||
),
|
||||
TYPE_USECASE_ID_ROAD_COLLISION_WARNING(
|
||||
0x2C06.toString(),
|
||||
"事故易发路段",
|
||||
poiTypeSrcVr=R.drawable.icon_warning_v2x_collision_warning,
|
||||
content="当前路段事故多发",
|
||||
tts="当前路段事故多发,请谨慎行驶"
|
||||
),
|
||||
TYPE_USECASE_ID_ROAD_ROUNDABOUTPNG(
|
||||
0x2C07.toString(),
|
||||
"环岛行驶",
|
||||
poiTypeSrcVr=R.drawable.icon_warning_v2x_roundaboutpng,
|
||||
content="前方驶入环岛",
|
||||
tts="前方驶入环岛,请谨慎行驶"
|
||||
),
|
||||
TYPE_USECASE_ID_ROAD_TEST_SECTION(
|
||||
0x2C08.toString(),
|
||||
"驾校考试路段",
|
||||
poiTypeSrcVr=R.drawable.icon_warning_v2x_test_section,
|
||||
content="前方考试路段",
|
||||
tts="前方考试路段,减速慢行"
|
||||
),
|
||||
TYPE_USECASE_ID_ROAD_HUMP_BRIDGE(
|
||||
0x2C09.toString(),
|
||||
"驼峰桥",
|
||||
poiTypeSrcVr=R.drawable.icon_warning_v2x_hump_bridge,
|
||||
content="前方驼峰桥",
|
||||
tts="即将驶入桥梁,请减速慢行"
|
||||
),
|
||||
TYPE_USECASE_ID_ROAD_NO_PARKING(
|
||||
0x2C10.toString(),
|
||||
"禁止停车",
|
||||
poiTypeSrcVr=R.drawable.icon_warning_v2x_no_parking,
|
||||
content="当前路段禁止停车",
|
||||
tts="当前路段,禁止停车"
|
||||
),
|
||||
TYPE_USECASE_ID_ROAD_GIVE_WAY(
|
||||
0x2C11.toString(),
|
||||
"减速慢行",
|
||||
poiTypeSrcVr=R.drawable.icon_warning_v2x_give_way,
|
||||
content="有车出入,减速慢行",
|
||||
tts="有车出入,减速慢行"
|
||||
),
|
||||
TYPE_ERROR(
|
||||
ObuConstants.USE_CASE_ID.ERROR.toString(),
|
||||
"未知/错误/异常",
|
||||
poiTypeSrcVr=R.drawable.icon_warning_v2x_abnormal_vehicle,
|
||||
content="",
|
||||
tts=""
|
||||
);
|
||||
|
||||
companion object {
|
||||
@JvmStatic
|
||||
fun getPoiTypeStr(poiType: String): String {
|
||||
// 先获取网络配置的poi对应的名称
|
||||
CloudPoiManager.getInstance().getWrapperByPoiType(poiType)?.let {
|
||||
return it.title
|
||||
}
|
||||
// 如果获取不到,那么就用本地默认的
|
||||
return when (poiType) {
|
||||
GAS_STATION.poiType -> GAS_STATION.poiTypeStr
|
||||
TRAFFIC_CHECK.poiType -> TRAFFIC_CHECK.poiTypeStr
|
||||
ROAD_CLOSED.poiType -> ROAD_CLOSED.poiTypeStr
|
||||
SHOP_DISCOUNT.poiType -> SHOP_DISCOUNT.poiTypeStr
|
||||
FOURS_4S.poiType -> FOURS_4S.poiTypeStr
|
||||
FOURS_ROAD_WORK.poiType -> FOURS_ROAD_WORK.poiTypeStr
|
||||
FOURS_BLOCK_UP.poiType -> FOURS_BLOCK_UP.poiTypeStr
|
||||
FOURS_PONDING.poiType -> FOURS_PONDING.poiTypeStr
|
||||
FOURS_SHOP_FREE.poiType -> FOURS_SHOP_FREE.poiTypeStr
|
||||
FOURS_FOG.poiType -> FOURS_FOG.poiTypeStr
|
||||
FOURS_ICE.poiType -> FOURS_ICE.poiTypeStr
|
||||
FOURS_PARKING.poiType -> FOURS_PARKING.poiTypeStr
|
||||
|
||||
FOURS_ACCIDENT.poiType, FOURS_ACCIDENT_01.poiType,
|
||||
FOURS_ACCIDENT_02.poiType, FOURS_ACCIDENT_03.poiType,
|
||||
FOURS_ACCIDENT_04.poiType, FOURS_ACCIDENT_05.poiType -> FOURS_ACCIDENT.poiTypeStr
|
||||
|
||||
FOURS_NEALY.poiType -> FOURS_NEALY.poiTypeStr
|
||||
FOURS_LIVING.poiType -> FOURS_LIVING.poiTypeStr
|
||||
else -> "其它道路事件"
|
||||
}
|
||||
}
|
||||
|
||||
@JvmStatic
|
||||
fun getPoiTypeStrVr(poiType: String): String {
|
||||
return when (poiType) {
|
||||
GAS_STATION.poiType -> GAS_STATION.poiTypeStrVr
|
||||
TRAFFIC_CHECK.poiType -> TRAFFIC_CHECK.poiTypeStrVr
|
||||
ROAD_CLOSED.poiType -> ROAD_CLOSED.poiTypeStrVr
|
||||
SHOP_DISCOUNT.poiType -> SHOP_DISCOUNT.poiTypeStrVr
|
||||
FOURS_4S.poiType -> FOURS_4S.poiTypeStrVr
|
||||
FOURS_ROAD_WORK.poiType -> FOURS_ROAD_WORK.poiTypeStrVr
|
||||
FOURS_BLOCK_UP.poiType -> FOURS_BLOCK_UP.poiTypeStrVr
|
||||
FOURS_PONDING.poiType -> FOURS_PONDING.poiTypeStrVr
|
||||
FOURS_SHOP_FREE.poiType -> FOURS_SHOP_FREE.poiTypeStrVr
|
||||
FOURS_FOG.poiType -> FOURS_FOG.poiTypeStrVr
|
||||
FOURS_ICE.poiType -> FOURS_ICE.poiTypeStrVr
|
||||
FOURS_PARKING.poiType -> FOURS_PARKING.poiTypeStrVr
|
||||
|
||||
FOURS_ACCIDENT.poiType, FOURS_ACCIDENT_01.poiType,
|
||||
FOURS_ACCIDENT_02.poiType, FOURS_ACCIDENT_03.poiType,
|
||||
FOURS_ACCIDENT_04.poiType, FOURS_ACCIDENT_05.poiType -> FOURS_ACCIDENT.poiTypeStrVr
|
||||
|
||||
FOURS_NEALY.poiType -> FOURS_NEALY.poiTypeStrVr
|
||||
FOURS_LIVING.poiType -> FOURS_LIVING.poiTypeStrVr
|
||||
else -> "其它道路事件"
|
||||
}
|
||||
}
|
||||
|
||||
@JvmStatic
|
||||
fun getPoiTypeSrcVr(poiType: String): Int {
|
||||
return when (poiType) {
|
||||
TRAFFIC_CHECK.poiType -> TRAFFIC_CHECK.poiTypeSrcVr
|
||||
ROAD_CLOSED.poiType -> ROAD_CLOSED.poiTypeSrcVr
|
||||
FOURS_4S.poiType -> FOURS_4S.poiTypeSrcVr
|
||||
FOURS_ROAD_WORK.poiType -> FOURS_ROAD_WORK.poiTypeSrcVr
|
||||
FOURS_BLOCK_UP.poiType -> FOURS_BLOCK_UP.poiTypeSrcVr
|
||||
FOURS_PONDING.poiType -> FOURS_PONDING.poiTypeSrcVr
|
||||
FOURS_SHOP_FREE.poiType -> FOURS_SHOP_FREE.poiTypeSrcVr
|
||||
FOURS_FOG.poiType -> FOURS_FOG.poiTypeSrcVr
|
||||
FOURS_ICE.poiType -> FOURS_ICE.poiTypeSrcVr
|
||||
FOURS_PARKING.poiType -> FOURS_PARKING.poiTypeSrcVr
|
||||
|
||||
FOURS_ACCIDENT.poiType, FOURS_ACCIDENT_01.poiType,
|
||||
FOURS_ACCIDENT_02.poiType, FOURS_ACCIDENT_03.poiType,
|
||||
FOURS_ACCIDENT_04.poiType, FOURS_ACCIDENT_05.poiType -> FOURS_ACCIDENT.poiTypeSrcVr
|
||||
|
||||
FOURS_NEALY.poiType -> FOURS_NEALY.poiTypeSrcVr
|
||||
FOURS_LIVING.poiType -> FOURS_LIVING.poiTypeSrcVr
|
||||
else -> R.drawable.v2x_icon_live_logo
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取道路事件的背景色
|
||||
*/
|
||||
@JvmStatic
|
||||
fun getPoiTypeBg(poiType: String, isVrMode: Boolean): Int {
|
||||
return when (poiType) {
|
||||
FOURS_PARKING.poiType, GAS_STATION.poiType -> R.drawable.bg_v2x_event_type_blue
|
||||
FOURS_BLOCK_UP.poiType, FOURS_LIVING.poiType, FOURS_NEALY.poiType -> if (isVrMode) R.drawable.bg_v2x_event_type_orange_vr else R.drawable.bg_v2x_event_type_orange
|
||||
TRAFFIC_CHECK.poiType, ROAD_CLOSED.poiType, FOURS_ROAD_WORK.poiType,
|
||||
FOURS_PONDING.poiType, FOURS_FOG.poiType, FOURS_ICE.poiType, FOURS_ACCIDENT.poiType,
|
||||
FOURS_ACCIDENT_01.poiType, FOURS_ACCIDENT_02.poiType, FOURS_ACCIDENT_03.poiType,
|
||||
FOURS_ACCIDENT_04.poiType, FOURS_ACCIDENT_05.poiType -> if (isVrMode) R.drawable.bg_v2x_event_type_red_vr else R.drawable.bg_v2x_event_type_read
|
||||
else -> {
|
||||
if (isVrMode) R.drawable.bg_v2x_event_type_red_vr else R.drawable.bg_v2x_event_type_read
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@JvmStatic
|
||||
fun getPoiTypeBgForShareItem(poiType: String): Int {
|
||||
return when (poiType) {
|
||||
FOURS_PARKING.poiType, GAS_STATION.poiType ->
|
||||
R.drawable.bg_v2x_event_type_blue
|
||||
FOURS_BLOCK_UP.poiType, FOURS_LIVING.poiType, FOURS_NEALY.poiType ->
|
||||
R.drawable.bg_v2x_event_type_orange
|
||||
TRAFFIC_CHECK.poiType, ROAD_CLOSED.poiType,
|
||||
FOURS_ROAD_WORK.poiType, FOURS_PONDING.poiType,
|
||||
FOURS_FOG.poiType, FOURS_ICE.poiType,
|
||||
FOURS_ACCIDENT.poiType, FOURS_ACCIDENT_01.poiType,
|
||||
FOURS_ACCIDENT_02.poiType, FOURS_ACCIDENT_03.poiType,
|
||||
FOURS_ACCIDENT_04.poiType, FOURS_ACCIDENT_05.poiType ->
|
||||
R.drawable.bg_v2x_event_type_read
|
||||
else -> R.drawable.bg_v2x_event_type_read
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 判断是否是道路预警事件
|
||||
*/
|
||||
@JvmStatic
|
||||
fun isRoadEvent(poiType: String?): Boolean {
|
||||
return when (poiType) {
|
||||
TRAFFIC_CHECK.poiType, ROAD_CLOSED.poiType,
|
||||
FOURS_ROAD_WORK.poiType, FOURS_BLOCK_UP.poiType,
|
||||
FOURS_PONDING.poiType, FOURS_FOG.poiType,
|
||||
FOURS_ICE.poiType, FOURS_ACCIDENT.poiType,
|
||||
FOURS_ACCIDENT_01.poiType, FOURS_ACCIDENT_02.poiType,
|
||||
FOURS_ACCIDENT_03.poiType, FOURS_ACCIDENT_04.poiType,
|
||||
FOURS_ACCIDENT_05.poiType -> true
|
||||
else -> false
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 是否需要UGC预警
|
||||
*/
|
||||
@JvmStatic
|
||||
fun isNeedRoadEventUgc(poiType: String?): Boolean {
|
||||
return when (poiType) {
|
||||
ROAD_CLOSED.poiType, FOURS_ROAD_WORK.poiType,
|
||||
FOURS_BLOCK_UP.poiType, FOURS_ACCIDENT.poiType,
|
||||
FOURS_ACCIDENT_01.poiType, FOURS_ACCIDENT_02.poiType,
|
||||
FOURS_ACCIDENT_03.poiType, FOURS_ACCIDENT_04.poiType,
|
||||
FOURS_ACCIDENT_05.poiType -> true
|
||||
else -> false
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取 UGC 问答使用的 Title 和 TTS 以及展示图表
|
||||
*/
|
||||
@JvmStatic
|
||||
fun getUgcTitleStr(poiType: String?): Array<Any?>? {
|
||||
val str = arrayOfNulls<Any>(5)
|
||||
when (poiType) {
|
||||
ROAD_CLOSED.poiType -> {
|
||||
str[0] = "你刚经过 #### \n封路吗?"
|
||||
str[1] = "你刚路过的路段封路吗?您可以直接对我说封路、或者不封路。"
|
||||
str[2] = R.drawable.v_to_x_event_ugc_fenglu
|
||||
str[3] = COMMAND_ZHIDAO_V2X_FEEDBACK_FENG_LU_YES_UN_WAKEUP
|
||||
str[4] = COMMAND_ZHIDAO_V2X_FEEDBACK_FENG_LU_NO_UN_WAKEUP
|
||||
}
|
||||
FOURS_ROAD_WORK.poiType -> {
|
||||
str[0] = "你刚经过 #### \n有道路施工吗?"
|
||||
str[1] = "你刚路过的路段道路施工吗?您可以直接对我说有施工、或者没有施工。"
|
||||
str[2] = R.drawable.bg_v2x_cancel_help
|
||||
str[3] = COMMAND_ZHIDAO_V2X_FEEDBACK_SHI_GONG_YES_UN_WAKEUP
|
||||
str[4] = COMMAND_ZHIDAO_V2X_FEEDBACK_SHI_GONG_NO_UN_WAKEUP
|
||||
}
|
||||
FOURS_BLOCK_UP.poiType -> {
|
||||
str[0] = "你刚路过 #### \n堵不堵?"
|
||||
str[1] = "你刚路过的路段堵不堵?您可以直接对我说拥赌、或者不堵。"
|
||||
str[2] = R.drawable.v_to_x_event_ugc_yongdu
|
||||
str[3] = COMMAND_ZHIDAO_V2X_FEEDBACK_YONG_DU_YES_UN_WAKEUP
|
||||
str[4] = COMMAND_ZHIDAO_V2X_FEEDBACK_YONG_DU_NO_UN_WAKEUP
|
||||
}
|
||||
FOURS_ACCIDENT.poiType, FOURS_ACCIDENT_01.poiType, FOURS_ACCIDENT_02.poiType,
|
||||
FOURS_ACCIDENT_03.poiType, FOURS_ACCIDENT_04.poiType, FOURS_ACCIDENT_05.poiType -> {
|
||||
str[0] = "你刚经过 #### \n有事故发生吗?"
|
||||
str[1] = "你刚路过的路段有交通事故吗?您可以直接对我说有事故、或者没有事故。"
|
||||
str[2] = R.drawable.v_to_x_event_ugc_shigu
|
||||
str[3] = COMMAND_ZHIDAO_V2X_FEEDBACK_SHI_GU_YES_UN_WAKEUP
|
||||
str[4] = COMMAND_ZHIDAO_V2X_FEEDBACK_SHI_GU_NO_UN_WAKEUP
|
||||
}
|
||||
else -> return null
|
||||
}
|
||||
return str
|
||||
}
|
||||
|
||||
@JvmStatic
|
||||
fun getTts(poiType: String?): String {
|
||||
return when (poiType) {
|
||||
FOURS_PARKING.poiType -> FOURS_PARKING.tts
|
||||
GAS_STATION.poiType -> GAS_STATION.tts
|
||||
TRAFFIC_CHECK.poiType -> TRAFFIC_CHECK.tts
|
||||
ROAD_CLOSED.poiType -> ROAD_CLOSED.tts
|
||||
FOURS_ROAD_WORK.poiType -> FOURS_ROAD_WORK.tts
|
||||
FOURS_BLOCK_UP.poiType -> FOURS_BLOCK_UP.tts
|
||||
FOURS_PONDING.poiType -> FOURS_PONDING.tts
|
||||
FOURS_FOG.poiType -> FOURS_FOG.tts
|
||||
FOURS_ICE.poiType -> FOURS_ICE.tts
|
||||
FOURS_ACCIDENT.poiType, FOURS_ACCIDENT_01.poiType, FOURS_ACCIDENT_02.poiType,
|
||||
FOURS_ACCIDENT_03.poiType, FOURS_ACCIDENT_04.poiType, FOURS_ACCIDENT_05.poiType -> FOURS_ACCIDENT.tts
|
||||
else -> "道路事件"
|
||||
}
|
||||
}
|
||||
|
||||
@JvmStatic
|
||||
fun getTtsWithFeedback(poiType: String?): String {
|
||||
return when (poiType) {
|
||||
FOURS_PARKING.poiType -> "有停车场"
|
||||
GAS_STATION.poiType -> "有加油站"
|
||||
TRAFFIC_CHECK.poiType -> "交通检查"
|
||||
ROAD_CLOSED.poiType -> "封路"
|
||||
FOURS_ROAD_WORK.poiType -> "施工"
|
||||
FOURS_BLOCK_UP.poiType -> "道路拥堵"
|
||||
FOURS_PONDING.poiType -> "道路积水"
|
||||
FOURS_FOG.poiType -> "出现浓雾"
|
||||
FOURS_ICE.poiType -> "路面结冰"
|
||||
FOURS_ACCIDENT.poiType, FOURS_ACCIDENT_01.poiType, FOURS_ACCIDENT_02.poiType,
|
||||
FOURS_ACCIDENT_03.poiType, FOURS_ACCIDENT_04.poiType, FOURS_ACCIDENT_05.poiType -> "交通事故"
|
||||
else -> "道路事件"
|
||||
}
|
||||
}
|
||||
|
||||
@JvmStatic
|
||||
fun getAlarmContent(poiType: String?): String {
|
||||
return when (poiType) {
|
||||
FOURS_PARKING.poiType -> FOURS_PARKING.content
|
||||
GAS_STATION.poiType -> GAS_STATION.content
|
||||
TRAFFIC_CHECK.poiType -> TRAFFIC_CHECK.content
|
||||
ROAD_CLOSED.poiType -> ROAD_CLOSED.content
|
||||
FOURS_ROAD_WORK.poiType -> FOURS_ROAD_WORK.content
|
||||
FOURS_BLOCK_UP.poiType -> FOURS_BLOCK_UP.content
|
||||
FOURS_PONDING.poiType -> FOURS_PONDING.content
|
||||
FOURS_FOG.poiType -> FOURS_FOG.content
|
||||
FOURS_ICE.poiType -> FOURS_ICE.content
|
||||
FOURS_ACCIDENT.poiType, FOURS_ACCIDENT_01.poiType, FOURS_ACCIDENT_02.poiType,
|
||||
FOURS_ACCIDENT_03.poiType, FOURS_ACCIDENT_04.poiType, FOURS_ACCIDENT_05.poiType ->
|
||||
FOURS_ACCIDENT.content
|
||||
else -> "道路事件"
|
||||
}
|
||||
}
|
||||
|
||||
@JvmStatic
|
||||
fun getTypeSmallRes(type: String): Int {
|
||||
return when (type) {
|
||||
TRAFFIC_CHECK.poiType ->
|
||||
R.drawable.mogo_image_jiaotongjiancha_small
|
||||
ROAD_CLOSED.poiType -> R.drawable.mogo_image_fenglu_small
|
||||
FOURS_ROAD_WORK.poiType -> R.drawable.mogo_image_daolushigong_small
|
||||
FOURS_BLOCK_UP.poiType -> R.drawable.mogo_image_yongdu_small
|
||||
FOURS_PONDING.poiType -> R.drawable.mogo_image_jishui_small
|
||||
FOURS_ICE.poiType -> R.drawable.mogo_image_jiebing_small
|
||||
FOURS_FOG.poiType -> R.drawable.mogo_image_nongwu_small
|
||||
FOURS_ACCIDENT.poiType, FOURS_ACCIDENT_01.poiType, FOURS_ACCIDENT_02.poiType,
|
||||
FOURS_ACCIDENT_03.poiType, FOURS_ACCIDENT_04.poiType, FOURS_ACCIDENT_05.poiType ->
|
||||
R.drawable.mogo_image_accident_small
|
||||
else -> R.drawable.mogo_image_shishilukuang_small
|
||||
}
|
||||
}
|
||||
|
||||
@JvmStatic
|
||||
fun getTypeRes(type: String): Int {
|
||||
return when (type) {
|
||||
TRAFFIC_CHECK.poiType -> R.drawable.mogo_image_jiaotongjiancha_nor
|
||||
ROAD_CLOSED.poiType -> R.drawable.mogo_image_fenglu_nor
|
||||
FOURS_ROAD_WORK.poiType -> R.drawable.mogo_image_daolushigong_nor
|
||||
FOURS_BLOCK_UP.poiType -> R.drawable.mogo_image_yongdu_nor
|
||||
FOURS_PONDING.poiType -> R.drawable.mogo_image_jishui_nor
|
||||
FOURS_ICE.poiType -> R.drawable.mogo_image_jiebing_nor
|
||||
FOURS_FOG.poiType -> R.drawable.mogo_image_nongwu_nor
|
||||
FOURS_ACCIDENT.poiType, FOURS_ACCIDENT_01.poiType, FOURS_ACCIDENT_02.poiType,
|
||||
FOURS_ACCIDENT_03.poiType, FOURS_ACCIDENT_04.poiType, FOURS_ACCIDENT_05.poiType ->
|
||||
R.drawable.mogo_image_jiaotongshigu_nor
|
||||
else -> R.drawable.mogo_image_shishlukuang_nor
|
||||
}
|
||||
}
|
||||
|
||||
@JvmStatic
|
||||
fun getTypeName(type: String?): String {
|
||||
return when (type) {
|
||||
ROAD_CLOSED.poiType -> "封路"
|
||||
FOURS_ICE.poiType -> "道路结冰"
|
||||
FOURS_FOG.poiType -> "浓雾"
|
||||
TRAFFIC_CHECK.poiType -> "交通检查"
|
||||
FOURS_ACCIDENT.poiType, FOURS_ACCIDENT_01.poiType, FOURS_ACCIDENT_02.poiType,
|
||||
FOURS_ACCIDENT_03.poiType, FOURS_ACCIDENT_04.poiType, FOURS_ACCIDENT_05.poiType -> "交通事故"
|
||||
FOURS_BLOCK_UP.poiType -> "拥堵"
|
||||
FOURS_ROAD_WORK.poiType -> "施工"
|
||||
FOURS_PONDING.poiType -> "道路积水"
|
||||
else -> "实时路况"
|
||||
}
|
||||
}
|
||||
|
||||
@JvmStatic
|
||||
fun getMarker3DRes(poiType: String?): Int {
|
||||
return when (poiType) {
|
||||
FOURS_BLOCK_UP.poiType -> R.raw.v2x_yongdu
|
||||
FOURS_ACCIDENT.poiType -> R.raw.v2x_shigu
|
||||
FOURS_LIVING.poiType -> R.raw.v2x_shishilukuang
|
||||
FOURS_FOG.poiType -> R.raw.v2x_nongwu
|
||||
TRAFFIC_CHECK.poiType -> R.raw.v2x_jiaotongjiancha
|
||||
FOURS_ROAD_WORK.poiType -> R.raw.v2x_daolushigong
|
||||
FOURS_ICE.poiType -> R.raw.v2x_daolujiebing
|
||||
FOURS_PONDING.poiType -> R.raw.v2x_daolujishui
|
||||
else -> 0
|
||||
}
|
||||
}
|
||||
|
||||
@JvmStatic
|
||||
fun getTypeNameTTS(type: String?): String {
|
||||
return when (type) {
|
||||
ROAD_CLOSED.poiType -> "封路"
|
||||
FOURS_ICE.poiType -> "道路结冰"
|
||||
FOURS_FOG.poiType -> "浓雾"
|
||||
TRAFFIC_CHECK.poiType -> "交通检查"
|
||||
FOURS_ACCIDENT.poiType, FOURS_ACCIDENT_01.poiType, FOURS_ACCIDENT_02.poiType,
|
||||
FOURS_ACCIDENT_03.poiType, FOURS_ACCIDENT_04.poiType, FOURS_ACCIDENT_05.poiType -> "交通事故"
|
||||
FOURS_BLOCK_UP.poiType -> "拥堵"
|
||||
FOURS_ROAD_WORK.poiType -> "施工"
|
||||
FOURS_PONDING.poiType -> "道路积水"
|
||||
else -> "实时路况"
|
||||
}
|
||||
}
|
||||
|
||||
@JvmStatic
|
||||
fun getUpdateIconRes(poiType: String?): Int {
|
||||
return when (poiType) {
|
||||
//交通检查
|
||||
TRAFFIC_CHECK.poiType -> {
|
||||
R.drawable.v_to_x_marker_2
|
||||
}
|
||||
//封路
|
||||
ROAD_CLOSED.poiType -> {
|
||||
R.drawable.v_to_x_marker_16
|
||||
}
|
||||
//施工
|
||||
FOURS_ROAD_WORK.poiType -> {
|
||||
R.drawable.v_to_x_marker_11
|
||||
}
|
||||
//拥堵
|
||||
FOURS_BLOCK_UP.poiType -> {
|
||||
R.drawable.v_to_x_marker_5
|
||||
}
|
||||
//积水
|
||||
FOURS_PONDING.poiType -> {
|
||||
R.drawable.v_to_x_marker_6
|
||||
}
|
||||
//浓雾
|
||||
FOURS_FOG.poiType -> {
|
||||
R.drawable.v_to_x_marker_9
|
||||
}
|
||||
//结冰
|
||||
FOURS_ICE.poiType -> {
|
||||
R.drawable.v_to_x_marker_8
|
||||
}
|
||||
//事故
|
||||
FOURS_ACCIDENT.poiType -> {
|
||||
R.drawable.v_to_x_marker_7
|
||||
}
|
||||
//事故
|
||||
FOURS_LIVING.poiType -> {
|
||||
R.drawable.v_to_x_marker_1
|
||||
}
|
||||
//红绿灯数据
|
||||
ALERT_TRAFFIC_LIGHT_SUGGEST.poiType -> {
|
||||
R.drawable.v_to_x_marker_3
|
||||
}
|
||||
//红绿灯数据
|
||||
ALERT_TRAFFIC_LIGHT_WARNING.poiType -> {
|
||||
R.drawable.v_to_x_marker_3
|
||||
}
|
||||
//前方静止or慢速车辆报警
|
||||
ALERT_FRONT_CAR.poiType -> {
|
||||
R.drawable.v_to_x_warning_car_red
|
||||
}
|
||||
// 故障车辆
|
||||
ALERT_CAR_TROUBLE_WARNING.poiType -> {
|
||||
R.drawable.icon_car_red
|
||||
}
|
||||
// 取快递
|
||||
ALERT_TRAFFIC_EXPRESS.poiType -> {
|
||||
R.drawable.v_to_x_marker_express
|
||||
}
|
||||
// 顺风车
|
||||
ALERT_TRAFFIC_TAXI.poiType -> {
|
||||
R.drawable.v_to_x_marker_taxi
|
||||
}
|
||||
else -> 0
|
||||
}
|
||||
}
|
||||
|
||||
//===================告警类事件===================
|
||||
|
||||
@JvmStatic
|
||||
fun getWarningIcon(poiType: String?): Int {
|
||||
return when (poiType) {
|
||||
TYPE_USECASE_ID_EBW.poiType -> TYPE_USECASE_ID_EBW.poiTypeSrcVr
|
||||
TYPE_USECASE_ID_FCW.poiType -> TYPE_USECASE_ID_FCW.poiTypeSrcVr
|
||||
TYPE_USECASE_ID_ICW.poiType -> TYPE_USECASE_ID_ICW.poiTypeSrcVr
|
||||
TYPE_USECASE_ID_CLW.poiType -> TYPE_USECASE_ID_CLW.poiTypeSrcVr
|
||||
TYPE_USECASE_ID_DNPW.poiType -> TYPE_USECASE_ID_DNPW.poiTypeSrcVr
|
||||
TYPE_USECASE_ID_AVW.poiType -> TYPE_USECASE_ID_AVW.poiTypeSrcVr
|
||||
TYPE_USECASE_ID_BSW.poiType -> TYPE_USECASE_ID_BSW.poiTypeSrcVr
|
||||
TYPE_USECASE_ID_LCW.poiType -> TYPE_USECASE_ID_LCW.poiTypeSrcVr
|
||||
TYPE_USECASE_ID_EVW.poiType -> TYPE_USECASE_ID_EVW.poiTypeSrcVr
|
||||
TYPE_USECASE_ID_VRUCW_PERSON.poiType -> TYPE_USECASE_ID_VRUCW_PERSON.poiTypeSrcVr
|
||||
TYPE_USECASE_ID_VRUCW_MOTORBIKE.poiType -> TYPE_USECASE_ID_VRUCW_MOTORBIKE.poiTypeSrcVr
|
||||
TYPE_USECASE_ID_SLW.poiType -> TYPE_USECASE_ID_SLW.poiTypeSrcVr
|
||||
TYPE_USECASE_ID_LTA.poiType -> TYPE_USECASE_ID_LTA.poiTypeSrcVr
|
||||
TYPE_USECASE_ID_HLW.poiType -> TYPE_USECASE_ID_HLW.poiTypeSrcVr
|
||||
TYPE_USECASE_ID_IVS.poiType -> TYPE_USECASE_ID_IVS.poiTypeSrcVr
|
||||
TYPE_USECASE_ID_TJW.poiType -> TYPE_USECASE_ID_TJW.poiTypeSrcVr
|
||||
TYPE_USECASE_ID_IVP.poiType -> TYPE_USECASE_ID_IVP.poiTypeSrcVr
|
||||
TYPE_USECASE_ID_IVP_GREEN.poiType -> TYPE_USECASE_ID_IVP_GREEN.poiTypeSrcVr
|
||||
TYPE_USECASE_ID_COC.poiType -> TYPE_USECASE_ID_COC.poiTypeSrcVr
|
||||
TYPE_USECASE_ID_ROAD_TRAMCAR.poiType -> TYPE_USECASE_ID_ROAD_TRAMCAR.poiTypeSrcVr
|
||||
TYPE_USECASE_ID_ROAD_TURN_LEFT_SHARP.poiType -> TYPE_USECASE_ID_ROAD_TURN_LEFT_SHARP.poiTypeSrcVr
|
||||
TYPE_USECASE_ID_ROAD_TURN_RIGHT_SHARP.poiType -> TYPE_USECASE_ID_ROAD_TURN_RIGHT_SHARP.poiTypeSrcVr
|
||||
TYPE_USECASE_ID_ROAD_PEDESTRIAN_CROSSING.poiType -> TYPE_USECASE_ID_ROAD_PEDESTRIAN_CROSSING.poiTypeSrcVr
|
||||
TYPE_USECASE_ID_ROAD_PEDESTRIAN_SCHOOL.poiType -> TYPE_USECASE_ID_ROAD_PEDESTRIAN_SCHOOL.poiTypeSrcVr
|
||||
TYPE_USECASE_ID_ROAD_COLLISION_WARNING.poiType -> TYPE_USECASE_ID_ROAD_COLLISION_WARNING.poiTypeSrcVr
|
||||
TYPE_USECASE_ID_ROAD_ROUNDABOUTPNG.poiType -> TYPE_USECASE_ID_ROAD_ROUNDABOUTPNG.poiTypeSrcVr
|
||||
TYPE_USECASE_ID_ROAD_TEST_SECTION.poiType -> TYPE_USECASE_ID_ROAD_TEST_SECTION.poiTypeSrcVr
|
||||
TYPE_USECASE_ID_ROAD_HUMP_BRIDGE.poiType -> TYPE_USECASE_ID_ROAD_HUMP_BRIDGE.poiTypeSrcVr
|
||||
TYPE_USECASE_ID_ROAD_NO_PARKING.poiType -> TYPE_USECASE_ID_ROAD_NO_PARKING.poiTypeSrcVr
|
||||
TYPE_USECASE_ID_ROAD_GIVE_WAY.poiType -> TYPE_USECASE_ID_ROAD_GIVE_WAY.poiTypeSrcVr
|
||||
TYPE_ERROR.poiType -> TYPE_ERROR.poiTypeSrcVr
|
||||
else -> TYPE_USECASE_ID_AVW.poiTypeSrcVr
|
||||
}
|
||||
}
|
||||
|
||||
@JvmStatic
|
||||
fun getWarningContent(poiType: String?): String {
|
||||
return when (poiType) {
|
||||
TYPE_USECASE_ID_EBW.poiType -> TYPE_USECASE_ID_EBW.content
|
||||
TYPE_USECASE_ID_FCW.poiType -> TYPE_USECASE_ID_FCW.content
|
||||
TYPE_USECASE_ID_ICW.poiType -> TYPE_USECASE_ID_ICW.content
|
||||
TYPE_USECASE_ID_CLW.poiType -> TYPE_USECASE_ID_CLW.content
|
||||
TYPE_USECASE_ID_DNPW.poiType -> TYPE_USECASE_ID_DNPW.content
|
||||
TYPE_USECASE_ID_AVW.poiType -> TYPE_USECASE_ID_AVW.content
|
||||
TYPE_USECASE_ID_BSW.poiType -> TYPE_USECASE_ID_BSW.content
|
||||
TYPE_USECASE_ID_LCW.poiType -> TYPE_USECASE_ID_LCW.content
|
||||
TYPE_USECASE_ID_EVW.poiType -> TYPE_USECASE_ID_EVW.content
|
||||
TYPE_USECASE_ID_VRUCW_PERSON.poiType -> TYPE_USECASE_ID_VRUCW_PERSON.content
|
||||
TYPE_USECASE_ID_VRUCW_MOTORBIKE.poiType -> TYPE_USECASE_ID_VRUCW_MOTORBIKE.content
|
||||
TYPE_USECASE_ID_SLW.poiType -> TYPE_USECASE_ID_SLW.content
|
||||
TYPE_USECASE_ID_LTA.poiType -> TYPE_USECASE_ID_LTA.content
|
||||
TYPE_USECASE_ID_HLW.poiType -> TYPE_USECASE_ID_HLW.content
|
||||
TYPE_USECASE_ID_IVS.poiType -> TYPE_USECASE_ID_IVS.content
|
||||
TYPE_USECASE_ID_TJW.poiType -> TYPE_USECASE_ID_TJW.content
|
||||
TYPE_USECASE_ID_IVP.poiType -> TYPE_USECASE_ID_IVP.content
|
||||
TYPE_USECASE_ID_IVP_GREEN.poiType -> TYPE_USECASE_ID_IVP_GREEN.content
|
||||
TYPE_USECASE_ID_COC.poiType -> TYPE_USECASE_ID_COC.content
|
||||
TYPE_USECASE_ID_ROAD_TRAMCAR.poiType -> TYPE_USECASE_ID_ROAD_TRAMCAR.content
|
||||
TYPE_USECASE_ID_ROAD_TURN_LEFT_SHARP.poiType -> TYPE_USECASE_ID_ROAD_TURN_LEFT_SHARP.content
|
||||
TYPE_USECASE_ID_ROAD_TURN_RIGHT_SHARP.poiType -> TYPE_USECASE_ID_ROAD_TURN_RIGHT_SHARP.content
|
||||
TYPE_USECASE_ID_ROAD_PEDESTRIAN_CROSSING.poiType -> TYPE_USECASE_ID_ROAD_PEDESTRIAN_CROSSING.content
|
||||
TYPE_USECASE_ID_ROAD_PEDESTRIAN_SCHOOL.poiType -> TYPE_USECASE_ID_ROAD_PEDESTRIAN_SCHOOL.content
|
||||
TYPE_USECASE_ID_ROAD_COLLISION_WARNING.poiType -> TYPE_USECASE_ID_ROAD_COLLISION_WARNING.content
|
||||
TYPE_USECASE_ID_ROAD_ROUNDABOUTPNG.poiType -> TYPE_USECASE_ID_ROAD_ROUNDABOUTPNG.content
|
||||
TYPE_USECASE_ID_ROAD_TEST_SECTION.poiType -> TYPE_USECASE_ID_ROAD_TEST_SECTION.content
|
||||
TYPE_USECASE_ID_ROAD_HUMP_BRIDGE.poiType -> TYPE_USECASE_ID_ROAD_HUMP_BRIDGE.content
|
||||
TYPE_USECASE_ID_ROAD_NO_PARKING.poiType -> TYPE_USECASE_ID_ROAD_NO_PARKING.content
|
||||
TYPE_USECASE_ID_ROAD_GIVE_WAY.poiType -> TYPE_USECASE_ID_ROAD_GIVE_WAY.content
|
||||
TYPE_ERROR.poiType -> TYPE_ERROR.content
|
||||
else -> TYPE_USECASE_ID_AVW.content
|
||||
}
|
||||
}
|
||||
|
||||
@JvmStatic
|
||||
fun getWarningTts(poiType: String?): String {
|
||||
return when (poiType) {
|
||||
TYPE_USECASE_ID_EBW.poiType -> TYPE_USECASE_ID_EBW.tts
|
||||
TYPE_USECASE_ID_FCW.poiType -> TYPE_USECASE_ID_FCW.tts
|
||||
TYPE_USECASE_ID_ICW.poiType -> TYPE_USECASE_ID_ICW.tts
|
||||
TYPE_USECASE_ID_CLW.poiType -> TYPE_USECASE_ID_CLW.tts
|
||||
TYPE_USECASE_ID_DNPW.poiType -> TYPE_USECASE_ID_DNPW.tts
|
||||
TYPE_USECASE_ID_AVW.poiType -> TYPE_USECASE_ID_AVW.tts
|
||||
TYPE_USECASE_ID_BSW.poiType -> TYPE_USECASE_ID_BSW.tts
|
||||
TYPE_USECASE_ID_LCW.poiType -> TYPE_USECASE_ID_LCW.tts
|
||||
TYPE_USECASE_ID_EVW.poiType -> TYPE_USECASE_ID_EVW.tts
|
||||
TYPE_USECASE_ID_VRUCW_PERSON.poiType -> TYPE_USECASE_ID_VRUCW_PERSON.tts
|
||||
TYPE_USECASE_ID_VRUCW_MOTORBIKE.poiType -> TYPE_USECASE_ID_VRUCW_MOTORBIKE.tts
|
||||
TYPE_USECASE_ID_SLW.poiType -> TYPE_USECASE_ID_SLW.tts
|
||||
TYPE_USECASE_ID_LTA.poiType -> TYPE_USECASE_ID_LTA.tts
|
||||
TYPE_USECASE_ID_HLW.poiType -> TYPE_USECASE_ID_HLW.tts
|
||||
TYPE_USECASE_ID_IVS.poiType -> TYPE_USECASE_ID_IVS.tts
|
||||
TYPE_USECASE_ID_TJW.poiType -> TYPE_USECASE_ID_TJW.tts
|
||||
TYPE_USECASE_ID_IVP.poiType -> TYPE_USECASE_ID_IVP.tts
|
||||
TYPE_USECASE_ID_IVP_GREEN.poiType -> TYPE_USECASE_ID_IVP_GREEN.tts
|
||||
TYPE_USECASE_ID_COC.poiType -> TYPE_USECASE_ID_COC.tts
|
||||
TYPE_USECASE_ID_ROAD_TRAMCAR.poiType -> TYPE_USECASE_ID_ROAD_TRAMCAR.tts
|
||||
TYPE_USECASE_ID_ROAD_TURN_LEFT_SHARP.poiType -> TYPE_USECASE_ID_ROAD_TURN_LEFT_SHARP.tts
|
||||
TYPE_USECASE_ID_ROAD_TURN_RIGHT_SHARP.poiType -> TYPE_USECASE_ID_ROAD_TURN_RIGHT_SHARP.tts
|
||||
TYPE_USECASE_ID_ROAD_PEDESTRIAN_CROSSING.poiType -> TYPE_USECASE_ID_ROAD_PEDESTRIAN_CROSSING.tts
|
||||
TYPE_USECASE_ID_ROAD_PEDESTRIAN_SCHOOL.poiType -> TYPE_USECASE_ID_ROAD_PEDESTRIAN_SCHOOL.tts
|
||||
TYPE_USECASE_ID_ROAD_COLLISION_WARNING.poiType -> TYPE_USECASE_ID_ROAD_COLLISION_WARNING.tts
|
||||
TYPE_USECASE_ID_ROAD_ROUNDABOUTPNG.poiType -> TYPE_USECASE_ID_ROAD_ROUNDABOUTPNG.tts
|
||||
TYPE_USECASE_ID_ROAD_TEST_SECTION.poiType -> TYPE_USECASE_ID_ROAD_TEST_SECTION.tts
|
||||
TYPE_USECASE_ID_ROAD_HUMP_BRIDGE.poiType -> TYPE_USECASE_ID_ROAD_HUMP_BRIDGE.tts
|
||||
TYPE_USECASE_ID_ROAD_NO_PARKING.poiType -> TYPE_USECASE_ID_ROAD_NO_PARKING.tts
|
||||
TYPE_USECASE_ID_ROAD_GIVE_WAY.poiType -> TYPE_USECASE_ID_ROAD_GIVE_WAY.tts
|
||||
TYPE_ERROR.poiType -> TYPE_ERROR.tts
|
||||
else -> TYPE_USECASE_ID_AVW.tts
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,475 +0,0 @@
|
||||
package com.mogo.module.common.enums
|
||||
|
||||
import com.mogo.module.common.R
|
||||
import com.mogo.module.common.entity.V2XPoiTypeEnum
|
||||
import com.mogo.module.common.utils.CloudPoiManager
|
||||
import com.mogo.module.common.utils.Const.*
|
||||
|
||||
enum class SceneTypeEnum(
|
||||
val poiType: String, val poiTypeStr: String = "其它道路事件",
|
||||
val poiTypeStrVr: String = "其它道路事件",
|
||||
val poiTypeSrcVr: Int = R.drawable.v2x_icon_live_logo
|
||||
) {
|
||||
//加油站
|
||||
GAS_STATION("10001", "加油站"),
|
||||
|
||||
//交通检查
|
||||
TRAFFIC_CHECK("10002", "交通检查", "前方交通检查", R.drawable.v2x_icon_jiaotongjiancha_vr),
|
||||
|
||||
//封路
|
||||
ROAD_CLOSED("10003", "封路", "前方封路", R.drawable.v2x_icon_fenglu_vr),
|
||||
|
||||
//商场打折
|
||||
SHOP_DISCOUNT("10004", ""),
|
||||
|
||||
//4S店
|
||||
FOURS_4S("10005", ""),
|
||||
|
||||
//施工
|
||||
FOURS_ROAD_WORK("10006", "道路施工", "前方施工", R.drawable.v2x_icon_daolushigong_vr),
|
||||
|
||||
//拥堵
|
||||
FOURS_BLOCK_UP("10007", "道路拥堵", "前方拥堵", R.drawable.v2x_icon_yongdu_vr),
|
||||
|
||||
//积水
|
||||
FOURS_PONDING("10008", "道路积水", "前方道路积水", R.drawable.v2x_icon_jishui_vr),
|
||||
|
||||
//超市打折
|
||||
FOURS_SHOP_FREE("10009", ""),
|
||||
|
||||
//浓雾
|
||||
FOURS_FOG("10010", "出现浓雾", "浓雾预警", R.drawable.v2x_icon_nongwu_vr),
|
||||
|
||||
//结冰
|
||||
FOURS_ICE("10011", "路面结冰"),
|
||||
|
||||
//停车场
|
||||
FOURS_PARKING("10012", "停车场"),
|
||||
|
||||
//事故
|
||||
FOURS_ACCIDENT("10013", "交通事故", "前方交通事故", R.drawable.v2x_icon_jiaotongshigu_vr),
|
||||
|
||||
//重大事故
|
||||
FOURS_ACCIDENT_01("1001301", "交通事故", "前方交通事故", R.drawable.v2x_icon_jiaotongshigu_vr),
|
||||
|
||||
//特大事故
|
||||
FOURS_ACCIDENT_02("1001302", "交通事故", "前方交通事故", R.drawable.v2x_icon_jiaotongshigu_vr),
|
||||
|
||||
//较大事故
|
||||
FOURS_ACCIDENT_03("1001303", "交通事故", "前方交通事故", R.drawable.v2x_icon_jiaotongshigu_vr),
|
||||
|
||||
//一般事故
|
||||
FOURS_ACCIDENT_04("1001304", "交通事故", "前方交通事故", R.drawable.v2x_icon_jiaotongshigu_vr),
|
||||
|
||||
//轻微事故
|
||||
FOURS_ACCIDENT_05("1001305", "交通事故", "前方交通事故", R.drawable.v2x_icon_jiaotongshigu_vr),
|
||||
|
||||
//身边
|
||||
FOURS_NEALY("10014", "身边事件"),
|
||||
|
||||
//实时路况
|
||||
FOURS_LIVING("10015", "实时路况"),
|
||||
|
||||
//违章停车
|
||||
ILLEGAL_PARK_LIVING("10016"),
|
||||
|
||||
//路面湿滑
|
||||
ROAD_SLIPPERY("10021");
|
||||
|
||||
companion object {
|
||||
@JvmStatic
|
||||
fun getPoiTypeStr(poiType: String): String {
|
||||
// 先获取网络配置的poi对应的名称
|
||||
CloudPoiManager.getInstance().getWrapperByPoiType(poiType)?.let {
|
||||
return it.title
|
||||
}
|
||||
// 如果获取不到,那么就用本地默认的
|
||||
return when (poiType) {
|
||||
GAS_STATION.poiType -> GAS_STATION.poiTypeStr
|
||||
TRAFFIC_CHECK.poiType -> TRAFFIC_CHECK.poiTypeStr
|
||||
ROAD_CLOSED.poiType -> ROAD_CLOSED.poiTypeStr
|
||||
SHOP_DISCOUNT.poiType -> SHOP_DISCOUNT.poiTypeStr
|
||||
FOURS_4S.poiType -> FOURS_4S.poiTypeStr
|
||||
FOURS_ROAD_WORK.poiType -> FOURS_ROAD_WORK.poiTypeStr
|
||||
FOURS_BLOCK_UP.poiType -> FOURS_BLOCK_UP.poiTypeStr
|
||||
FOURS_PONDING.poiType -> FOURS_PONDING.poiTypeStr
|
||||
FOURS_SHOP_FREE.poiType -> FOURS_SHOP_FREE.poiTypeStr
|
||||
FOURS_FOG.poiType -> FOURS_FOG.poiTypeStr
|
||||
FOURS_ICE.poiType -> FOURS_ICE.poiTypeStr
|
||||
FOURS_PARKING.poiType -> FOURS_PARKING.poiTypeStr
|
||||
|
||||
FOURS_ACCIDENT.poiType, FOURS_ACCIDENT_01.poiType,
|
||||
FOURS_ACCIDENT_02.poiType, FOURS_ACCIDENT_03.poiType,
|
||||
FOURS_ACCIDENT_04.poiType, FOURS_ACCIDENT_05.poiType -> FOURS_ACCIDENT.poiTypeStr
|
||||
|
||||
FOURS_NEALY.poiType -> FOURS_NEALY.poiTypeStr
|
||||
FOURS_LIVING.poiType -> FOURS_LIVING.poiTypeStr
|
||||
else -> "其它道路事件"
|
||||
}
|
||||
}
|
||||
|
||||
@JvmStatic
|
||||
fun getPoiTypeStrVr(poiType: String): String {
|
||||
return when (poiType) {
|
||||
GAS_STATION.poiType -> GAS_STATION.poiTypeStrVr
|
||||
TRAFFIC_CHECK.poiType -> TRAFFIC_CHECK.poiTypeStrVr
|
||||
ROAD_CLOSED.poiType -> ROAD_CLOSED.poiTypeStrVr
|
||||
SHOP_DISCOUNT.poiType -> SHOP_DISCOUNT.poiTypeStrVr
|
||||
FOURS_4S.poiType -> FOURS_4S.poiTypeStrVr
|
||||
FOURS_ROAD_WORK.poiType -> FOURS_ROAD_WORK.poiTypeStrVr
|
||||
FOURS_BLOCK_UP.poiType -> FOURS_BLOCK_UP.poiTypeStrVr
|
||||
FOURS_PONDING.poiType -> FOURS_PONDING.poiTypeStrVr
|
||||
FOURS_SHOP_FREE.poiType -> FOURS_SHOP_FREE.poiTypeStrVr
|
||||
FOURS_FOG.poiType -> FOURS_FOG.poiTypeStrVr
|
||||
FOURS_ICE.poiType -> FOURS_ICE.poiTypeStrVr
|
||||
FOURS_PARKING.poiType -> FOURS_PARKING.poiTypeStrVr
|
||||
|
||||
FOURS_ACCIDENT.poiType, FOURS_ACCIDENT_01.poiType,
|
||||
FOURS_ACCIDENT_02.poiType, FOURS_ACCIDENT_03.poiType,
|
||||
FOURS_ACCIDENT_04.poiType, FOURS_ACCIDENT_05.poiType -> FOURS_ACCIDENT.poiTypeStrVr
|
||||
|
||||
FOURS_NEALY.poiType -> FOURS_NEALY.poiTypeStrVr
|
||||
FOURS_LIVING.poiType -> FOURS_LIVING.poiTypeStrVr
|
||||
else -> "其它道路事件"
|
||||
}
|
||||
}
|
||||
|
||||
@JvmStatic
|
||||
fun getPoiTypeSrcVr(poiType: String): Int {
|
||||
return when (poiType) {
|
||||
GAS_STATION.poiType -> GAS_STATION.poiTypeSrcVr
|
||||
TRAFFIC_CHECK.poiType -> TRAFFIC_CHECK.poiTypeSrcVr
|
||||
ROAD_CLOSED.poiType -> ROAD_CLOSED.poiTypeSrcVr
|
||||
SHOP_DISCOUNT.poiType -> SHOP_DISCOUNT.poiTypeSrcVr
|
||||
FOURS_4S.poiType -> FOURS_4S.poiTypeSrcVr
|
||||
FOURS_ROAD_WORK.poiType -> FOURS_ROAD_WORK.poiTypeSrcVr
|
||||
FOURS_BLOCK_UP.poiType -> FOURS_BLOCK_UP.poiTypeSrcVr
|
||||
FOURS_PONDING.poiType -> FOURS_PONDING.poiTypeSrcVr
|
||||
FOURS_SHOP_FREE.poiType -> FOURS_SHOP_FREE.poiTypeSrcVr
|
||||
FOURS_FOG.poiType -> FOURS_FOG.poiTypeSrcVr
|
||||
FOURS_ICE.poiType -> FOURS_ICE.poiTypeSrcVr
|
||||
FOURS_PARKING.poiType -> FOURS_PARKING.poiTypeSrcVr
|
||||
|
||||
FOURS_ACCIDENT.poiType, FOURS_ACCIDENT_01.poiType,
|
||||
FOURS_ACCIDENT_02.poiType, FOURS_ACCIDENT_03.poiType,
|
||||
FOURS_ACCIDENT_04.poiType, FOURS_ACCIDENT_05.poiType -> FOURS_ACCIDENT.poiTypeSrcVr
|
||||
|
||||
FOURS_NEALY.poiType -> FOURS_NEALY.poiTypeSrcVr
|
||||
FOURS_LIVING.poiType -> FOURS_LIVING.poiTypeSrcVr
|
||||
else -> R.drawable.v2x_icon_live_logo
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取道路事件的背景色
|
||||
*/
|
||||
@JvmStatic
|
||||
fun getPoiTypeBg(poiType: String, isVrMode: Boolean): Int {
|
||||
return when (poiType) {
|
||||
FOURS_PARKING.poiType, GAS_STATION.poiType -> R.drawable.bg_v2x_event_type_blue
|
||||
FOURS_BLOCK_UP.poiType, FOURS_LIVING.poiType, FOURS_NEALY.poiType -> if (isVrMode) R.drawable.bg_v2x_event_type_orange_vr else R.drawable.bg_v2x_event_type_orange
|
||||
TRAFFIC_CHECK.poiType, ROAD_CLOSED.poiType, FOURS_ROAD_WORK.poiType,
|
||||
FOURS_PONDING.poiType, FOURS_FOG.poiType, FOURS_ICE.poiType, FOURS_ACCIDENT.poiType,
|
||||
FOURS_ACCIDENT_01.poiType, FOURS_ACCIDENT_02.poiType, FOURS_ACCIDENT_03.poiType,
|
||||
FOURS_ACCIDENT_04.poiType, FOURS_ACCIDENT_05.poiType -> if (isVrMode) R.drawable.bg_v2x_event_type_red_vr else R.drawable.bg_v2x_event_type_read
|
||||
else -> {
|
||||
if (isVrMode) R.drawable.bg_v2x_event_type_red_vr else R.drawable.bg_v2x_event_type_read
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@JvmStatic
|
||||
fun getPoiTypeBgForShareItem(poiType: String): Int {
|
||||
return when (poiType) {
|
||||
FOURS_PARKING.poiType, GAS_STATION.poiType ->
|
||||
R.drawable.bg_v2x_event_type_blue
|
||||
FOURS_BLOCK_UP.poiType, FOURS_LIVING.poiType, FOURS_NEALY.poiType ->
|
||||
R.drawable.bg_v2x_event_type_orange
|
||||
TRAFFIC_CHECK.poiType, ROAD_CLOSED.poiType,
|
||||
FOURS_ROAD_WORK.poiType, FOURS_PONDING.poiType,
|
||||
FOURS_FOG.poiType, FOURS_ICE.poiType,
|
||||
FOURS_ACCIDENT.poiType, FOURS_ACCIDENT_01.poiType,
|
||||
FOURS_ACCIDENT_02.poiType, FOURS_ACCIDENT_03.poiType,
|
||||
FOURS_ACCIDENT_04.poiType, FOURS_ACCIDENT_05.poiType ->
|
||||
R.drawable.bg_v2x_event_type_read
|
||||
else -> R.drawable.bg_v2x_event_type_read
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 判断是否是道路预警事件
|
||||
*/
|
||||
@JvmStatic
|
||||
fun isRoadEvent(poiType: String?): Boolean {
|
||||
return when (poiType) {
|
||||
TRAFFIC_CHECK.poiType, ROAD_CLOSED.poiType,
|
||||
FOURS_ROAD_WORK.poiType, FOURS_BLOCK_UP.poiType,
|
||||
FOURS_PONDING.poiType, FOURS_FOG.poiType,
|
||||
FOURS_ICE.poiType, FOURS_ACCIDENT.poiType,
|
||||
FOURS_ACCIDENT_01.poiType, FOURS_ACCIDENT_02.poiType,
|
||||
FOURS_ACCIDENT_03.poiType, FOURS_ACCIDENT_04.poiType,
|
||||
FOURS_ACCIDENT_05.poiType -> true
|
||||
else -> false
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 是否需要UGC预警
|
||||
*/
|
||||
@JvmStatic
|
||||
fun isNeedRoadEventUgc(poiType: String?): Boolean {
|
||||
return when (poiType) {
|
||||
ROAD_CLOSED.poiType, FOURS_ROAD_WORK.poiType,
|
||||
FOURS_BLOCK_UP.poiType, FOURS_ACCIDENT.poiType,
|
||||
FOURS_ACCIDENT_01.poiType, FOURS_ACCIDENT_02.poiType,
|
||||
FOURS_ACCIDENT_03.poiType, FOURS_ACCIDENT_04.poiType,
|
||||
FOURS_ACCIDENT_05.poiType -> true
|
||||
else -> false
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取 UGC 问答使用的 Title 和 TTS 以及展示图表
|
||||
*/
|
||||
@JvmStatic
|
||||
fun getUgcTitleStr(poiType: String?): Array<Any?>? {
|
||||
val str = arrayOfNulls<Any>(5)
|
||||
when (poiType) {
|
||||
ROAD_CLOSED.poiType -> {
|
||||
str[0] = "你刚经过 #### \n封路吗?"
|
||||
str[1] = "你刚路过的路段封路吗?您可以直接对我说封路、或者不封路。"
|
||||
str[2] = R.drawable.v_to_x_event_ugc_fenglu
|
||||
str[3] = COMMAND_ZHIDAO_V2X_FEEDBACK_FENG_LU_YES_UN_WAKEUP
|
||||
str[4] = COMMAND_ZHIDAO_V2X_FEEDBACK_FENG_LU_NO_UN_WAKEUP
|
||||
}
|
||||
FOURS_ROAD_WORK.poiType -> {
|
||||
str[0] = "你刚经过 #### \n有道路施工吗?"
|
||||
str[1] = "你刚路过的路段道路施工吗?您可以直接对我说有施工、或者没有施工。"
|
||||
str[2] = R.drawable.bg_v2x_cancel_help
|
||||
str[3] = COMMAND_ZHIDAO_V2X_FEEDBACK_SHI_GONG_YES_UN_WAKEUP
|
||||
str[4] = COMMAND_ZHIDAO_V2X_FEEDBACK_SHI_GONG_NO_UN_WAKEUP
|
||||
}
|
||||
FOURS_BLOCK_UP.poiType -> {
|
||||
str[0] = "你刚路过 #### \n堵不堵?"
|
||||
str[1] = "你刚路过的路段堵不堵?您可以直接对我说拥赌、或者不堵。"
|
||||
str[2] = R.drawable.v_to_x_event_ugc_yongdu
|
||||
str[3] = COMMAND_ZHIDAO_V2X_FEEDBACK_YONG_DU_YES_UN_WAKEUP
|
||||
str[4] = COMMAND_ZHIDAO_V2X_FEEDBACK_YONG_DU_NO_UN_WAKEUP
|
||||
}
|
||||
FOURS_ACCIDENT.poiType, FOURS_ACCIDENT_01.poiType, FOURS_ACCIDENT_02.poiType,
|
||||
FOURS_ACCIDENT_03.poiType, FOURS_ACCIDENT_04.poiType, FOURS_ACCIDENT_05.poiType -> {
|
||||
str[0] = "你刚经过 #### \n有事故发生吗?"
|
||||
str[1] = "你刚路过的路段有交通事故吗?您可以直接对我说有事故、或者没有事故。"
|
||||
str[2] = R.drawable.v_to_x_event_ugc_shigu
|
||||
str[3] = COMMAND_ZHIDAO_V2X_FEEDBACK_SHI_GU_YES_UN_WAKEUP
|
||||
str[4] = COMMAND_ZHIDAO_V2X_FEEDBACK_SHI_GU_NO_UN_WAKEUP
|
||||
}
|
||||
else -> return null
|
||||
}
|
||||
return str
|
||||
}
|
||||
|
||||
@JvmStatic
|
||||
fun getTts(poiType: String?): String {
|
||||
return when (poiType) {
|
||||
FOURS_PARKING.poiType -> "停车场"
|
||||
GAS_STATION.poiType -> "加油站"
|
||||
TRAFFIC_CHECK.poiType -> "交通检查"
|
||||
ROAD_CLOSED.poiType -> "道路封路"
|
||||
FOURS_ROAD_WORK.poiType -> "道路施工"
|
||||
FOURS_BLOCK_UP.poiType -> "道路拥堵"
|
||||
FOURS_PONDING.poiType -> "道路积水"
|
||||
FOURS_FOG.poiType -> "出现浓雾"
|
||||
FOURS_ICE.poiType -> "路面结冰"
|
||||
FOURS_ACCIDENT.poiType, FOURS_ACCIDENT_01.poiType, FOURS_ACCIDENT_02.poiType,
|
||||
FOURS_ACCIDENT_03.poiType, FOURS_ACCIDENT_04.poiType, FOURS_ACCIDENT_05.poiType -> "交通事故"
|
||||
else -> "道路事件"
|
||||
}
|
||||
}
|
||||
|
||||
@JvmStatic
|
||||
fun getTtsWithFeedback(poiType: String?): String {
|
||||
return when (poiType) {
|
||||
FOURS_PARKING.poiType -> "有停车场"
|
||||
GAS_STATION.poiType -> "有加油站"
|
||||
TRAFFIC_CHECK.poiType -> "交通检查"
|
||||
ROAD_CLOSED.poiType -> "封路"
|
||||
FOURS_ROAD_WORK.poiType -> "施工"
|
||||
FOURS_BLOCK_UP.poiType -> "道路拥堵"
|
||||
FOURS_PONDING.poiType -> "道路积水"
|
||||
FOURS_FOG.poiType -> "出现浓雾"
|
||||
FOURS_ICE.poiType -> "路面结冰"
|
||||
FOURS_ACCIDENT.poiType, FOURS_ACCIDENT_01.poiType, FOURS_ACCIDENT_02.poiType,
|
||||
FOURS_ACCIDENT_03.poiType, FOURS_ACCIDENT_04.poiType, FOURS_ACCIDENT_05.poiType -> "交通事故"
|
||||
else -> "道路事件"
|
||||
}
|
||||
}
|
||||
|
||||
@JvmStatic
|
||||
fun getAlarmContent(poiType: String?): String {
|
||||
return when (poiType) {
|
||||
FOURS_PARKING.poiType -> "停车场附近"
|
||||
GAS_STATION.poiType -> "加油站附近"
|
||||
TRAFFIC_CHECK.poiType -> "前方交通检查"
|
||||
ROAD_CLOSED.poiType -> "前方封路"
|
||||
FOURS_ROAD_WORK.poiType -> "前方施工"
|
||||
FOURS_BLOCK_UP.poiType -> "前方道路拥堵"
|
||||
FOURS_PONDING.poiType -> "前方道路积水"
|
||||
FOURS_FOG.poiType -> "前方出现浓雾"
|
||||
FOURS_ICE.poiType -> "前方路面结冰"
|
||||
FOURS_ACCIDENT.poiType, FOURS_ACCIDENT_01.poiType, FOURS_ACCIDENT_02.poiType,
|
||||
FOURS_ACCIDENT_03.poiType, FOURS_ACCIDENT_04.poiType, FOURS_ACCIDENT_05.poiType ->
|
||||
"前方交通事故"
|
||||
else -> "道路事件"
|
||||
}
|
||||
}
|
||||
|
||||
@JvmStatic
|
||||
fun getTypeSmallRes(type: String): Int {
|
||||
return when (type) {
|
||||
TRAFFIC_CHECK.poiType ->
|
||||
R.drawable.mogo_image_jiaotongjiancha_small
|
||||
ROAD_CLOSED.poiType -> R.drawable.mogo_image_fenglu_small
|
||||
FOURS_ROAD_WORK.poiType -> R.drawable.mogo_image_daolushigong_small
|
||||
FOURS_BLOCK_UP.poiType -> R.drawable.mogo_image_yongdu_small
|
||||
FOURS_PONDING.poiType -> R.drawable.mogo_image_jishui_small
|
||||
FOURS_ICE.poiType -> R.drawable.mogo_image_jiebing_small
|
||||
FOURS_FOG.poiType -> R.drawable.mogo_image_nongwu_small
|
||||
FOURS_ACCIDENT.poiType, FOURS_ACCIDENT_01.poiType, FOURS_ACCIDENT_02.poiType,
|
||||
FOURS_ACCIDENT_03.poiType, FOURS_ACCIDENT_04.poiType, FOURS_ACCIDENT_05.poiType ->
|
||||
R.drawable.mogo_image_accident_small
|
||||
else -> R.drawable.mogo_image_shishilukuang_small
|
||||
}
|
||||
}
|
||||
|
||||
@JvmStatic
|
||||
fun getTypeRes(type: String): Int {
|
||||
return when (type) {
|
||||
TRAFFIC_CHECK.poiType -> R.drawable.mogo_image_jiaotongjiancha_nor
|
||||
ROAD_CLOSED.poiType -> R.drawable.mogo_image_fenglu_nor
|
||||
FOURS_ROAD_WORK.poiType -> R.drawable.mogo_image_daolushigong_nor
|
||||
FOURS_BLOCK_UP.poiType -> R.drawable.mogo_image_yongdu_nor
|
||||
FOURS_PONDING.poiType -> R.drawable.mogo_image_jishui_nor
|
||||
FOURS_ICE.poiType -> R.drawable.mogo_image_jiebing_nor
|
||||
FOURS_FOG.poiType -> R.drawable.mogo_image_nongwu_nor
|
||||
FOURS_ACCIDENT.poiType, FOURS_ACCIDENT_01.poiType, FOURS_ACCIDENT_02.poiType,
|
||||
FOURS_ACCIDENT_03.poiType, FOURS_ACCIDENT_04.poiType, FOURS_ACCIDENT_05.poiType ->
|
||||
R.drawable.mogo_image_jiaotongshigu_nor
|
||||
else -> R.drawable.mogo_image_shishlukuang_nor
|
||||
}
|
||||
}
|
||||
|
||||
@JvmStatic
|
||||
fun getTypeName(type: String?): String {
|
||||
return when (type) {
|
||||
ROAD_CLOSED.poiType -> "封路"
|
||||
FOURS_ICE.poiType -> "道路结冰"
|
||||
FOURS_FOG.poiType -> "浓雾"
|
||||
TRAFFIC_CHECK.poiType -> "交通检查"
|
||||
FOURS_ACCIDENT.poiType, FOURS_ACCIDENT_01.poiType, FOURS_ACCIDENT_02.poiType,
|
||||
FOURS_ACCIDENT_03.poiType, FOURS_ACCIDENT_04.poiType, FOURS_ACCIDENT_05.poiType -> "交通事故"
|
||||
FOURS_BLOCK_UP.poiType -> "拥堵"
|
||||
FOURS_ROAD_WORK.poiType -> "施工"
|
||||
FOURS_PONDING.poiType -> "道路积水"
|
||||
else -> "实时路况"
|
||||
}
|
||||
}
|
||||
|
||||
@JvmStatic
|
||||
fun getMarker3DRes(poiType: String?): Int {
|
||||
return when (poiType) {
|
||||
FOURS_BLOCK_UP.poiType -> R.raw.v2x_yongdu
|
||||
FOURS_ACCIDENT.poiType -> R.raw.v2x_shigu
|
||||
FOURS_LIVING.poiType -> R.raw.v2x_shishilukuang
|
||||
FOURS_FOG.poiType -> R.raw.v2x_nongwu
|
||||
TRAFFIC_CHECK.poiType -> R.raw.v2x_jiaotongjiancha
|
||||
FOURS_ROAD_WORK.poiType -> R.raw.v2x_daolushigong
|
||||
FOURS_ICE.poiType -> R.raw.v2x_daolujiebing
|
||||
FOURS_PONDING.poiType -> R.raw.v2x_daolujishui
|
||||
else -> 0
|
||||
}
|
||||
}
|
||||
|
||||
@JvmStatic
|
||||
fun getTypeNameTTS(type: String?): String {
|
||||
return when (type) {
|
||||
ROAD_CLOSED.poiType -> "封路"
|
||||
FOURS_ICE.poiType -> "道路结冰"
|
||||
FOURS_FOG.poiType -> "浓雾"
|
||||
TRAFFIC_CHECK.poiType -> "交通检查"
|
||||
FOURS_ACCIDENT.poiType, FOURS_ACCIDENT_01.poiType, FOURS_ACCIDENT_02.poiType,
|
||||
FOURS_ACCIDENT_03.poiType, FOURS_ACCIDENT_04.poiType, FOURS_ACCIDENT_05.poiType -> "交通事故"
|
||||
FOURS_BLOCK_UP.poiType -> "拥堵"
|
||||
FOURS_ROAD_WORK.poiType -> "施工"
|
||||
FOURS_PONDING.poiType -> "道路积水"
|
||||
else -> "实时路况"
|
||||
}
|
||||
}
|
||||
|
||||
// @JvmStatic
|
||||
// fun getIconRes(poiType: String?): Int {
|
||||
// return when (poiType) {
|
||||
// //交通检查
|
||||
// TRAFFIC_CHECK.poiType -> {
|
||||
// R.drawable.v_to_x_marker_2
|
||||
// }
|
||||
// //封路
|
||||
// ROAD_CLOSED -> {
|
||||
// R.drawable.v_to_x_marker_16
|
||||
// }
|
||||
// //施工
|
||||
// FOURS_ROAD_WORK -> {
|
||||
// R.drawable.v_to_x_marker_11
|
||||
// }
|
||||
// //拥堵
|
||||
// FOURS_BLOCK_UP -> {
|
||||
// R.drawable.v_to_x_marker_5
|
||||
// }
|
||||
// //积水
|
||||
// FOURS_PONDING -> {
|
||||
// R.drawable.v_to_x_marker_6
|
||||
// }
|
||||
// //浓雾
|
||||
// FOURS_FOG -> {
|
||||
// R.drawable.v_to_x_marker_9
|
||||
// }
|
||||
// //结冰
|
||||
// FOURS_ICE -> {
|
||||
// R.drawable.v_to_x_marker_8
|
||||
// }
|
||||
// //事故
|
||||
// FOURS_ACCIDENT -> {
|
||||
// R.drawable.v_to_x_marker_7
|
||||
// }
|
||||
// //事故
|
||||
// FOURS_LIVING -> {
|
||||
// R.drawable.v_to_x_marker_1
|
||||
// }
|
||||
// //红绿灯数据
|
||||
// ALERT_TRAFFIC_LIGHT_SUGGEST -> {
|
||||
// R.drawable.v_to_x_marker_3
|
||||
// }
|
||||
// //红绿灯数据
|
||||
// ALERT_TRAFFIC_LIGHT_WARNING -> {
|
||||
// R.drawable.v_to_x_marker_3
|
||||
// }
|
||||
// //前方静止or慢速车辆报警
|
||||
// ALERT_FRONT_CAR -> {
|
||||
// R.drawable.v_to_x_warning_car_red
|
||||
// }
|
||||
// // 故障车辆
|
||||
// ALERT_CAR_TROUBLE_WARNING.toString() -> {
|
||||
// R.drawable.icon_car_red
|
||||
// }
|
||||
// // 取快递
|
||||
// ALERT_TRAFFIC_EXPRESS -> {
|
||||
// R.drawable.v_to_x_marker_express
|
||||
// }
|
||||
// // 顺风车
|
||||
// ALERT_TRAFFIC_TAXI -> {
|
||||
// R.drawable.v_to_x_marker_taxi
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
}
|
||||
}
|
||||
@@ -1,392 +0,0 @@
|
||||
package com.mogo.module.common.enums
|
||||
|
||||
import com.mogo.module.common.R
|
||||
import com.zhidao.support.obu.constants.ObuConstants
|
||||
|
||||
/**
|
||||
* author : donghongyu
|
||||
* e-mail : 1358506549@qq.com
|
||||
* date : 2020-01-1514:47
|
||||
* desc : 预警类型枚举
|
||||
* version: 1.0
|
||||
*/
|
||||
enum class WarningTypeEnum(
|
||||
var useCaseId: Int,
|
||||
var desc: String,
|
||||
var warningContent: String,
|
||||
var warningTts: String,
|
||||
var warningIconId: Int
|
||||
) {
|
||||
|
||||
|
||||
TYPE_USECASE_ID_EBW(
|
||||
ObuConstants.USE_CASE_ID.EBW,
|
||||
"紧急制动预警",
|
||||
"前车急刹车",
|
||||
"前车急刹车",
|
||||
R.drawable.icon_warning_v2x_emergency_brake
|
||||
),
|
||||
TYPE_USECASE_ID_FCW(
|
||||
ObuConstants.USE_CASE_ID.FCW,
|
||||
"前向碰撞预警",
|
||||
"前车碰撞预警",
|
||||
"小心前车",
|
||||
R.drawable.icon_warning_v2x_collision_warning
|
||||
),
|
||||
TYPE_USECASE_ID_ICW(
|
||||
ObuConstants.USE_CASE_ID.ICW,
|
||||
"交叉路口碰撞预警",
|
||||
"交叉路口碰撞预警",
|
||||
"注意交叉路口车辆",
|
||||
R.drawable.icon_warning_v2x_collision_warning
|
||||
),
|
||||
TYPE_USECASE_ID_CLW(
|
||||
ObuConstants.USE_CASE_ID.CLW,
|
||||
"车辆失控预警",
|
||||
"前车失控预警",
|
||||
"小心前方失控车辆",
|
||||
R.drawable.icon_warning_v2x_vehicle_control
|
||||
),
|
||||
TYPE_USECASE_ID_DNPW(
|
||||
ObuConstants.USE_CASE_ID.DNPW,
|
||||
"逆向超车预警",
|
||||
"逆向超车预警",
|
||||
"注意对向来车",
|
||||
R.drawable.icon_warning_v2x_reverse_overtaking
|
||||
),
|
||||
TYPE_USECASE_ID_AVW(
|
||||
ObuConstants.USE_CASE_ID.AVW,
|
||||
"异常车辆提醒",
|
||||
"前车异常",
|
||||
"小心前方异常车辆",
|
||||
R.drawable.icon_warning_v2x_abnormal_vehicle
|
||||
),
|
||||
TYPE_USECASE_ID_BSW(
|
||||
ObuConstants.USE_CASE_ID.BSW,
|
||||
"盲区预警",
|
||||
"%s后盲区预警",
|
||||
"注意%s后车辆",
|
||||
R.drawable.icon_warning_v2x_blind_area_collision
|
||||
),
|
||||
TYPE_USECASE_ID_LCW(
|
||||
ObuConstants.USE_CASE_ID.LCW,
|
||||
"变道预警",
|
||||
"%s向变道预警",
|
||||
"注意%s后车辆",
|
||||
R.drawable.icon_warning_v2x_reverse_overtaking
|
||||
),//注意左后车辆/注意右后车辆
|
||||
TYPE_USECASE_ID_EVW(
|
||||
ObuConstants.USE_CASE_ID.EVW,
|
||||
"紧急车辆提醒",
|
||||
"请避让特种车辆",
|
||||
"后方特种车辆请避让",
|
||||
R.drawable.icon_warning_v2x_special_vehicle_access
|
||||
),
|
||||
TYPE_USECASE_ID_VRUCW_PERSON(
|
||||
0X2B0201,
|
||||
"弱势交通参与者碰撞预警",
|
||||
"行人碰撞预警",
|
||||
"行人碰撞预警",
|
||||
R.drawable.icon_warning_v2x_pedestrian_crossing
|
||||
),//行人/摩托车碰撞预警
|
||||
TYPE_USECASE_ID_VRUCW_MOTORBIKE(
|
||||
0X2B0202,
|
||||
"弱势交通参与者碰撞预警",
|
||||
"摩托车碰撞预警",
|
||||
"摩托车碰撞预警",
|
||||
R.drawable.icon_warning_v2x_motorcycle_collision
|
||||
),//摩托车碰撞预警
|
||||
TYPE_USECASE_ID_SLW(
|
||||
ObuConstants.USE_CASE_ID.SLW,
|
||||
"限速预警",
|
||||
"已超速",
|
||||
"",
|
||||
R.drawable.icon_warning_v2x_over_speed
|
||||
),
|
||||
TYPE_USECASE_ID_LTA(
|
||||
ObuConstants.USE_CASE_ID.LTA,
|
||||
"左转辅助",
|
||||
"左转碰撞预警",
|
||||
"注意%s后车辆",
|
||||
R.drawable.icon_warning_v2x_collision_warning
|
||||
),
|
||||
TYPE_USECASE_ID_HLW(
|
||||
ObuConstants.USE_CASE_ID.HLW,
|
||||
"道路危险情况预警",
|
||||
"道路危险情况预警",
|
||||
"前方路况危险,小心行驶",
|
||||
R.drawable.icon_warning_v2x_road_dangerous
|
||||
),//(如果能给出具体的类别,则播报具体危险类别)
|
||||
TYPE_USECASE_ID_IVS(
|
||||
ObuConstants.USE_CASE_ID.IVS,
|
||||
"车内标牌",
|
||||
"前方施工",
|
||||
"",
|
||||
R.drawable.icon_warning_v2x_road_construction
|
||||
),
|
||||
TYPE_USECASE_ID_TJW(
|
||||
ObuConstants.USE_CASE_ID.TJW,
|
||||
"前方拥堵提醒",
|
||||
"前方道路拥堵",
|
||||
"前方%d米道路拥堵,请减速慢行",
|
||||
R.drawable.icon_warning_v2x_congestion
|
||||
),
|
||||
TYPE_USECASE_ID_IVP(
|
||||
ObuConstants.USE_CASE_ID.IVP,
|
||||
"闯红灯预警",
|
||||
"路口红灯,禁止通行",
|
||||
"路口红灯,禁止通行",
|
||||
R.drawable.icon_warning_v2x_traffic_lights_red
|
||||
),
|
||||
TYPE_USECASE_ID_IVP_GREEN(
|
||||
0x2B091,
|
||||
"绿波通行",
|
||||
"绿波通行 %s km/h",
|
||||
"前方路口建议车速 %s 公里每小时",
|
||||
R.drawable.icon_warning_v2x_traffic_lights_green
|
||||
),
|
||||
TYPE_USECASE_ID_COC(
|
||||
ObuConstants.USE_CASE_ID.COC,
|
||||
"预留",
|
||||
"路况预警",
|
||||
"路况预警",
|
||||
R.drawable.icon_warning_v2x_abnormal_vehicle
|
||||
),
|
||||
TYPE_USECASE_ID_ROAD_TRAMCAR(
|
||||
0x2C01,
|
||||
"前方有轨电车提醒",
|
||||
"前方有轨电车提醒",
|
||||
"前方有轨电车经过,请注意行驶安全",
|
||||
R.drawable.icon_warning_v2x_tramcar
|
||||
),
|
||||
TYPE_USECASE_ID_ROAD_TURN_LEFT_SHARP(
|
||||
0x2C02,
|
||||
"前方左转急弯",
|
||||
"前方左转急弯",
|
||||
"前方路口左转急弯,请减速慢行",
|
||||
R.drawable.icon_warning_v2x_turn_left_sharp
|
||||
),
|
||||
TYPE_USECASE_ID_ROAD_TURN_RIGHT_SHARP(
|
||||
0x2C03,
|
||||
"前方右转急弯",
|
||||
"前方右转急弯",
|
||||
"前方路口右转急弯,请减速慢行",
|
||||
R.drawable.icon_warning_v2x_turn_right_sharp
|
||||
),
|
||||
TYPE_USECASE_ID_ROAD_PEDESTRIAN_CROSSING(
|
||||
0x2C04,
|
||||
"人行横道",
|
||||
"前方人行横道",
|
||||
"前方人行横道",
|
||||
R.drawable.icon_warning_v2x_pedestrian_crossing
|
||||
),
|
||||
TYPE_USECASE_ID_ROAD_PEDESTRIAN_SCHOOL(
|
||||
0x2C05,
|
||||
"学校",
|
||||
"前方学校,减速慢行",
|
||||
"前方人行横道,请减速慢行",
|
||||
R.drawable.icon_warning_v2x_school
|
||||
),
|
||||
TYPE_USECASE_ID_ROAD_COLLISION_WARNING(
|
||||
0x2C06,
|
||||
"事故易发路段",
|
||||
"当前路段事故多发",
|
||||
"当前路段事故多发,请谨慎行驶",
|
||||
R.drawable.icon_warning_v2x_collision_warning
|
||||
),
|
||||
TYPE_USECASE_ID_ROAD_ROUNDABOUTPNG(
|
||||
0x2C07,
|
||||
"环岛行驶",
|
||||
"前方驶入环岛",
|
||||
"前方驶入环岛,请谨慎行驶",
|
||||
R.drawable.icon_warning_v2x_roundaboutpng
|
||||
),
|
||||
TYPE_USECASE_ID_ROAD_TEST_SECTION(
|
||||
0x2C08,
|
||||
"驾校考试路段",
|
||||
"前方考试路段",
|
||||
"前方考试路段,减速慢行",
|
||||
R.drawable.icon_warning_v2x_test_section
|
||||
),
|
||||
TYPE_USECASE_ID_ROAD_HUMP_BRIDGE(
|
||||
0x2C09,
|
||||
"驼峰桥",
|
||||
"前方驼峰桥",
|
||||
"即将驶入桥梁,请减速慢行",
|
||||
R.drawable.icon_warning_v2x_hump_bridge
|
||||
),
|
||||
TYPE_USECASE_ID_ROAD_NO_PARKING(
|
||||
0x2C10,
|
||||
"禁止停车",
|
||||
"当前路段禁止停车",
|
||||
"当前路段,禁止停车",
|
||||
R.drawable.icon_warning_v2x_no_parking
|
||||
),
|
||||
TYPE_USECASE_ID_ROAD_GIVE_WAY(
|
||||
0x2C11,
|
||||
"减速慢行",
|
||||
"有车出入,减速慢行",
|
||||
"有车出入,减速慢行",
|
||||
R.drawable.icon_warning_v2x_give_way
|
||||
),
|
||||
TYPE_ERROR(
|
||||
ObuConstants.USE_CASE_ID.ERROR,
|
||||
"未知/错误/异常",
|
||||
"",
|
||||
"",
|
||||
R.drawable.icon_warning_v2x_abnormal_vehicle
|
||||
);
|
||||
|
||||
|
||||
companion object {
|
||||
fun getWarningType(useCaseId: Int): WarningTypeEnum {
|
||||
return when (useCaseId) {
|
||||
ObuConstants.USE_CASE_ID.EBW -> TYPE_USECASE_ID_EBW
|
||||
ObuConstants.USE_CASE_ID.FCW -> TYPE_USECASE_ID_FCW
|
||||
ObuConstants.USE_CASE_ID.ICW -> TYPE_USECASE_ID_ICW
|
||||
ObuConstants.USE_CASE_ID.CLW -> TYPE_USECASE_ID_CLW
|
||||
ObuConstants.USE_CASE_ID.DNPW -> TYPE_USECASE_ID_DNPW
|
||||
ObuConstants.USE_CASE_ID.AVW -> TYPE_USECASE_ID_AVW
|
||||
ObuConstants.USE_CASE_ID.BSW -> TYPE_USECASE_ID_BSW
|
||||
ObuConstants.USE_CASE_ID.LCW -> TYPE_USECASE_ID_LCW
|
||||
ObuConstants.USE_CASE_ID.EVW -> TYPE_USECASE_ID_EVW
|
||||
TYPE_USECASE_ID_VRUCW_PERSON.useCaseId -> TYPE_USECASE_ID_VRUCW_PERSON
|
||||
TYPE_USECASE_ID_VRUCW_MOTORBIKE.useCaseId -> TYPE_USECASE_ID_VRUCW_MOTORBIKE
|
||||
ObuConstants.USE_CASE_ID.SLW -> TYPE_USECASE_ID_SLW
|
||||
ObuConstants.USE_CASE_ID.LTA -> TYPE_USECASE_ID_LTA
|
||||
ObuConstants.USE_CASE_ID.HLW -> TYPE_USECASE_ID_HLW
|
||||
ObuConstants.USE_CASE_ID.IVS -> TYPE_USECASE_ID_IVS
|
||||
ObuConstants.USE_CASE_ID.TJW -> TYPE_USECASE_ID_TJW
|
||||
ObuConstants.USE_CASE_ID.IVP -> TYPE_USECASE_ID_IVP
|
||||
TYPE_USECASE_ID_IVP_GREEN.useCaseId -> TYPE_USECASE_ID_IVP_GREEN
|
||||
ObuConstants.USE_CASE_ID.COC -> TYPE_USECASE_ID_COC
|
||||
TYPE_USECASE_ID_ROAD_TRAMCAR.useCaseId -> TYPE_USECASE_ID_ROAD_TRAMCAR
|
||||
TYPE_USECASE_ID_ROAD_TURN_LEFT_SHARP.useCaseId -> TYPE_USECASE_ID_ROAD_TURN_LEFT_SHARP
|
||||
TYPE_USECASE_ID_ROAD_TURN_RIGHT_SHARP.useCaseId -> TYPE_USECASE_ID_ROAD_TURN_RIGHT_SHARP
|
||||
TYPE_USECASE_ID_ROAD_PEDESTRIAN_CROSSING.useCaseId -> TYPE_USECASE_ID_ROAD_PEDESTRIAN_CROSSING
|
||||
TYPE_USECASE_ID_ROAD_PEDESTRIAN_SCHOOL.useCaseId -> TYPE_USECASE_ID_ROAD_PEDESTRIAN_SCHOOL
|
||||
TYPE_USECASE_ID_ROAD_COLLISION_WARNING.useCaseId -> TYPE_USECASE_ID_ROAD_COLLISION_WARNING
|
||||
TYPE_USECASE_ID_ROAD_ROUNDABOUTPNG.useCaseId -> TYPE_USECASE_ID_ROAD_ROUNDABOUTPNG
|
||||
TYPE_USECASE_ID_ROAD_TEST_SECTION.useCaseId -> TYPE_USECASE_ID_ROAD_TEST_SECTION
|
||||
TYPE_USECASE_ID_ROAD_HUMP_BRIDGE.useCaseId -> TYPE_USECASE_ID_ROAD_HUMP_BRIDGE
|
||||
TYPE_USECASE_ID_ROAD_NO_PARKING.useCaseId -> TYPE_USECASE_ID_ROAD_NO_PARKING
|
||||
TYPE_USECASE_ID_ROAD_GIVE_WAY.useCaseId -> TYPE_USECASE_ID_ROAD_GIVE_WAY
|
||||
ObuConstants.USE_CASE_ID.ERROR -> TYPE_ERROR
|
||||
else -> TYPE_USECASE_ID_AVW
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
fun getWarningIcon(useCaseId: Int): Int {
|
||||
return when (useCaseId) {
|
||||
ObuConstants.USE_CASE_ID.EBW -> TYPE_USECASE_ID_EBW.warningIconId
|
||||
ObuConstants.USE_CASE_ID.FCW -> TYPE_USECASE_ID_FCW.warningIconId
|
||||
ObuConstants.USE_CASE_ID.ICW -> TYPE_USECASE_ID_ICW.warningIconId
|
||||
ObuConstants.USE_CASE_ID.CLW -> TYPE_USECASE_ID_CLW.warningIconId
|
||||
ObuConstants.USE_CASE_ID.DNPW -> TYPE_USECASE_ID_DNPW.warningIconId
|
||||
ObuConstants.USE_CASE_ID.AVW -> TYPE_USECASE_ID_AVW.warningIconId
|
||||
ObuConstants.USE_CASE_ID.BSW -> TYPE_USECASE_ID_BSW.warningIconId
|
||||
ObuConstants.USE_CASE_ID.LCW -> TYPE_USECASE_ID_LCW.warningIconId
|
||||
ObuConstants.USE_CASE_ID.EVW -> TYPE_USECASE_ID_EVW.warningIconId
|
||||
TYPE_USECASE_ID_VRUCW_PERSON.useCaseId -> TYPE_USECASE_ID_VRUCW_PERSON.warningIconId
|
||||
TYPE_USECASE_ID_VRUCW_MOTORBIKE.useCaseId -> TYPE_USECASE_ID_VRUCW_MOTORBIKE.warningIconId
|
||||
ObuConstants.USE_CASE_ID.SLW -> TYPE_USECASE_ID_SLW.warningIconId
|
||||
ObuConstants.USE_CASE_ID.LTA -> TYPE_USECASE_ID_LTA.warningIconId
|
||||
ObuConstants.USE_CASE_ID.HLW -> TYPE_USECASE_ID_HLW.warningIconId
|
||||
ObuConstants.USE_CASE_ID.IVS -> TYPE_USECASE_ID_IVS.warningIconId
|
||||
ObuConstants.USE_CASE_ID.TJW -> TYPE_USECASE_ID_TJW.warningIconId
|
||||
ObuConstants.USE_CASE_ID.IVP -> TYPE_USECASE_ID_IVP.warningIconId
|
||||
TYPE_USECASE_ID_IVP_GREEN.useCaseId -> TYPE_USECASE_ID_IVP_GREEN.warningIconId
|
||||
ObuConstants.USE_CASE_ID.COC -> TYPE_USECASE_ID_COC.warningIconId
|
||||
TYPE_USECASE_ID_ROAD_TRAMCAR.useCaseId -> TYPE_USECASE_ID_ROAD_TRAMCAR.warningIconId
|
||||
TYPE_USECASE_ID_ROAD_TURN_LEFT_SHARP.useCaseId -> TYPE_USECASE_ID_ROAD_TURN_LEFT_SHARP.warningIconId
|
||||
TYPE_USECASE_ID_ROAD_TURN_RIGHT_SHARP.useCaseId -> TYPE_USECASE_ID_ROAD_TURN_RIGHT_SHARP.warningIconId
|
||||
TYPE_USECASE_ID_ROAD_PEDESTRIAN_CROSSING.useCaseId -> TYPE_USECASE_ID_ROAD_PEDESTRIAN_CROSSING.warningIconId
|
||||
TYPE_USECASE_ID_ROAD_PEDESTRIAN_SCHOOL.useCaseId -> TYPE_USECASE_ID_ROAD_PEDESTRIAN_SCHOOL.warningIconId
|
||||
TYPE_USECASE_ID_ROAD_COLLISION_WARNING.useCaseId -> TYPE_USECASE_ID_ROAD_COLLISION_WARNING.warningIconId
|
||||
TYPE_USECASE_ID_ROAD_ROUNDABOUTPNG.useCaseId -> TYPE_USECASE_ID_ROAD_ROUNDABOUTPNG.warningIconId
|
||||
TYPE_USECASE_ID_ROAD_TEST_SECTION.useCaseId -> TYPE_USECASE_ID_ROAD_TEST_SECTION.warningIconId
|
||||
TYPE_USECASE_ID_ROAD_HUMP_BRIDGE.useCaseId -> TYPE_USECASE_ID_ROAD_HUMP_BRIDGE.warningIconId
|
||||
TYPE_USECASE_ID_ROAD_NO_PARKING.useCaseId -> TYPE_USECASE_ID_ROAD_NO_PARKING.warningIconId
|
||||
TYPE_USECASE_ID_ROAD_GIVE_WAY.useCaseId -> TYPE_USECASE_ID_ROAD_GIVE_WAY.warningIconId
|
||||
ObuConstants.USE_CASE_ID.ERROR -> TYPE_ERROR.warningIconId
|
||||
else -> TYPE_USECASE_ID_AVW.warningIconId
|
||||
}
|
||||
}
|
||||
|
||||
fun getWarningContent(useCaseId: Int): String {
|
||||
return when (useCaseId) {
|
||||
ObuConstants.USE_CASE_ID.EBW -> TYPE_USECASE_ID_EBW.warningContent
|
||||
ObuConstants.USE_CASE_ID.FCW -> TYPE_USECASE_ID_FCW.warningContent
|
||||
ObuConstants.USE_CASE_ID.ICW -> TYPE_USECASE_ID_ICW.warningContent
|
||||
ObuConstants.USE_CASE_ID.CLW -> TYPE_USECASE_ID_CLW.warningContent
|
||||
ObuConstants.USE_CASE_ID.DNPW -> TYPE_USECASE_ID_DNPW.warningContent
|
||||
ObuConstants.USE_CASE_ID.AVW -> TYPE_USECASE_ID_AVW.warningContent
|
||||
ObuConstants.USE_CASE_ID.BSW -> TYPE_USECASE_ID_BSW.warningContent
|
||||
ObuConstants.USE_CASE_ID.LCW -> TYPE_USECASE_ID_LCW.warningContent
|
||||
ObuConstants.USE_CASE_ID.EVW -> TYPE_USECASE_ID_EVW.warningContent
|
||||
TYPE_USECASE_ID_VRUCW_PERSON.useCaseId -> TYPE_USECASE_ID_VRUCW_PERSON.warningContent
|
||||
TYPE_USECASE_ID_VRUCW_MOTORBIKE.useCaseId -> TYPE_USECASE_ID_VRUCW_MOTORBIKE.warningContent
|
||||
ObuConstants.USE_CASE_ID.SLW -> TYPE_USECASE_ID_SLW.warningContent
|
||||
ObuConstants.USE_CASE_ID.LTA -> TYPE_USECASE_ID_LTA.warningContent
|
||||
ObuConstants.USE_CASE_ID.HLW -> TYPE_USECASE_ID_HLW.warningContent
|
||||
ObuConstants.USE_CASE_ID.IVS -> TYPE_USECASE_ID_IVS.warningContent
|
||||
ObuConstants.USE_CASE_ID.TJW -> TYPE_USECASE_ID_TJW.warningContent
|
||||
ObuConstants.USE_CASE_ID.IVP -> TYPE_USECASE_ID_IVP.warningContent
|
||||
TYPE_USECASE_ID_IVP_GREEN.useCaseId -> TYPE_USECASE_ID_IVP_GREEN.warningContent
|
||||
ObuConstants.USE_CASE_ID.COC -> TYPE_USECASE_ID_COC.warningContent
|
||||
TYPE_USECASE_ID_ROAD_TRAMCAR.useCaseId -> TYPE_USECASE_ID_ROAD_TRAMCAR.warningContent
|
||||
TYPE_USECASE_ID_ROAD_TURN_LEFT_SHARP.useCaseId -> TYPE_USECASE_ID_ROAD_TURN_LEFT_SHARP.warningContent
|
||||
TYPE_USECASE_ID_ROAD_TURN_RIGHT_SHARP.useCaseId -> TYPE_USECASE_ID_ROAD_TURN_RIGHT_SHARP.warningContent
|
||||
TYPE_USECASE_ID_ROAD_PEDESTRIAN_CROSSING.useCaseId -> TYPE_USECASE_ID_ROAD_PEDESTRIAN_CROSSING.warningContent
|
||||
TYPE_USECASE_ID_ROAD_PEDESTRIAN_SCHOOL.useCaseId -> TYPE_USECASE_ID_ROAD_PEDESTRIAN_SCHOOL.warningContent
|
||||
TYPE_USECASE_ID_ROAD_COLLISION_WARNING.useCaseId -> TYPE_USECASE_ID_ROAD_COLLISION_WARNING.warningContent
|
||||
TYPE_USECASE_ID_ROAD_ROUNDABOUTPNG.useCaseId -> TYPE_USECASE_ID_ROAD_ROUNDABOUTPNG.warningContent
|
||||
TYPE_USECASE_ID_ROAD_TEST_SECTION.useCaseId -> TYPE_USECASE_ID_ROAD_TEST_SECTION.warningContent
|
||||
TYPE_USECASE_ID_ROAD_HUMP_BRIDGE.useCaseId -> TYPE_USECASE_ID_ROAD_HUMP_BRIDGE.warningContent
|
||||
TYPE_USECASE_ID_ROAD_NO_PARKING.useCaseId -> TYPE_USECASE_ID_ROAD_NO_PARKING.warningContent
|
||||
TYPE_USECASE_ID_ROAD_GIVE_WAY.useCaseId -> TYPE_USECASE_ID_ROAD_GIVE_WAY.warningContent
|
||||
ObuConstants.USE_CASE_ID.ERROR -> TYPE_ERROR.warningContent
|
||||
else -> TYPE_USECASE_ID_AVW.warningContent
|
||||
}
|
||||
}
|
||||
|
||||
fun getWarningTts(useCaseId: Int): String {
|
||||
return when (useCaseId) {
|
||||
ObuConstants.USE_CASE_ID.EBW -> TYPE_USECASE_ID_EBW.warningTts
|
||||
ObuConstants.USE_CASE_ID.FCW -> TYPE_USECASE_ID_FCW.warningTts
|
||||
ObuConstants.USE_CASE_ID.ICW -> TYPE_USECASE_ID_ICW.warningTts
|
||||
ObuConstants.USE_CASE_ID.CLW -> TYPE_USECASE_ID_CLW.warningTts
|
||||
ObuConstants.USE_CASE_ID.DNPW -> TYPE_USECASE_ID_DNPW.warningTts
|
||||
ObuConstants.USE_CASE_ID.AVW -> TYPE_USECASE_ID_AVW.warningTts
|
||||
ObuConstants.USE_CASE_ID.BSW -> TYPE_USECASE_ID_BSW.warningTts
|
||||
ObuConstants.USE_CASE_ID.LCW -> TYPE_USECASE_ID_LCW.warningTts
|
||||
ObuConstants.USE_CASE_ID.EVW -> TYPE_USECASE_ID_EVW.warningTts
|
||||
TYPE_USECASE_ID_VRUCW_PERSON.useCaseId -> TYPE_USECASE_ID_VRUCW_PERSON.warningTts
|
||||
TYPE_USECASE_ID_VRUCW_MOTORBIKE.useCaseId -> TYPE_USECASE_ID_VRUCW_MOTORBIKE.warningTts
|
||||
ObuConstants.USE_CASE_ID.SLW -> TYPE_USECASE_ID_SLW.warningTts
|
||||
ObuConstants.USE_CASE_ID.LTA -> TYPE_USECASE_ID_LTA.warningTts
|
||||
ObuConstants.USE_CASE_ID.HLW -> TYPE_USECASE_ID_HLW.warningTts
|
||||
ObuConstants.USE_CASE_ID.IVS -> TYPE_USECASE_ID_IVS.warningTts
|
||||
ObuConstants.USE_CASE_ID.TJW -> TYPE_USECASE_ID_TJW.warningTts
|
||||
ObuConstants.USE_CASE_ID.IVP -> TYPE_USECASE_ID_IVP.warningTts
|
||||
TYPE_USECASE_ID_IVP_GREEN.useCaseId -> TYPE_USECASE_ID_IVP_GREEN.warningTts
|
||||
ObuConstants.USE_CASE_ID.COC -> TYPE_USECASE_ID_COC.warningTts
|
||||
TYPE_USECASE_ID_ROAD_TRAMCAR.useCaseId -> TYPE_USECASE_ID_ROAD_TRAMCAR.warningTts
|
||||
TYPE_USECASE_ID_ROAD_TURN_LEFT_SHARP.useCaseId -> TYPE_USECASE_ID_ROAD_TURN_LEFT_SHARP.warningTts
|
||||
TYPE_USECASE_ID_ROAD_TURN_RIGHT_SHARP.useCaseId -> TYPE_USECASE_ID_ROAD_TURN_RIGHT_SHARP.warningTts
|
||||
TYPE_USECASE_ID_ROAD_PEDESTRIAN_CROSSING.useCaseId -> TYPE_USECASE_ID_ROAD_PEDESTRIAN_CROSSING.warningTts
|
||||
TYPE_USECASE_ID_ROAD_PEDESTRIAN_SCHOOL.useCaseId -> TYPE_USECASE_ID_ROAD_PEDESTRIAN_SCHOOL.warningTts
|
||||
TYPE_USECASE_ID_ROAD_COLLISION_WARNING.useCaseId -> TYPE_USECASE_ID_ROAD_COLLISION_WARNING.warningTts
|
||||
TYPE_USECASE_ID_ROAD_ROUNDABOUTPNG.useCaseId -> TYPE_USECASE_ID_ROAD_ROUNDABOUTPNG.warningTts
|
||||
TYPE_USECASE_ID_ROAD_TEST_SECTION.useCaseId -> TYPE_USECASE_ID_ROAD_TEST_SECTION.warningTts
|
||||
TYPE_USECASE_ID_ROAD_HUMP_BRIDGE.useCaseId -> TYPE_USECASE_ID_ROAD_HUMP_BRIDGE.warningTts
|
||||
TYPE_USECASE_ID_ROAD_NO_PARKING.useCaseId -> TYPE_USECASE_ID_ROAD_NO_PARKING.warningTts
|
||||
TYPE_USECASE_ID_ROAD_GIVE_WAY.useCaseId -> TYPE_USECASE_ID_ROAD_GIVE_WAY.warningTts
|
||||
ObuConstants.USE_CASE_ID.ERROR -> TYPE_ERROR.warningTts
|
||||
else -> TYPE_USECASE_ID_AVW.warningTts
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
@@ -4,7 +4,7 @@ import android.content.Context;
|
||||
import android.util.ArrayMap;
|
||||
|
||||
import com.mogo.module.common.R;
|
||||
import com.mogo.module.common.enums.SceneTypeEnum;
|
||||
import com.mogo.module.common.enums.EventTypeEnum;
|
||||
import com.mogo.module.common.marker.PoiWrapper;
|
||||
import com.mogo.utils.logger.Logger;
|
||||
import com.mogo.utils.network.utils.GsonUtil;
|
||||
@@ -37,47 +37,47 @@ public class CloudPoiManager {
|
||||
|
||||
public void generateDefault() {
|
||||
if (poiWrapper.isEmpty()) {
|
||||
poiWrapper.put(SceneTypeEnum.GAS_STATION.getPoiType(), new PoiWrapper(SceneTypeEnum.GAS_STATION.getPoiType(), R.drawable.module_common_icon_map_marker_refuel,
|
||||
poiWrapper.put(EventTypeEnum.GAS_STATION.getPoiType(), new PoiWrapper(EventTypeEnum.GAS_STATION.getPoiType(), R.drawable.module_common_icon_map_marker_refuel,
|
||||
R.drawable.module_common_icon_map_marker_refuel, "加油站"));
|
||||
poiWrapper.put(SceneTypeEnum.TRAFFIC_CHECK.getPoiType(), new PoiWrapper(SceneTypeEnum.TRAFFIC_CHECK.getPoiType(),
|
||||
poiWrapper.put(EventTypeEnum.TRAFFIC_CHECK.getPoiType(), new PoiWrapper(EventTypeEnum.TRAFFIC_CHECK.getPoiType(),
|
||||
R.drawable.module_common_icon_map_marker_road_check2, R.drawable.module_common_icon_map_marker_road_check2_white, "交通检查"));
|
||||
poiWrapper.put(SceneTypeEnum.ROAD_CLOSED.getPoiType(), new PoiWrapper(SceneTypeEnum.ROAD_CLOSED.getPoiType(),
|
||||
poiWrapper.put(EventTypeEnum.ROAD_CLOSED.getPoiType(), new PoiWrapper(EventTypeEnum.ROAD_CLOSED.getPoiType(),
|
||||
R.drawable.module_common_icon_map_marker_road_block_off2, R.drawable.module_common_icon_map_marker_road_block_off2_white, "封路"));
|
||||
poiWrapper.put(SceneTypeEnum.SHOP_DISCOUNT.getPoiType(), new PoiWrapper(SceneTypeEnum.SHOP_DISCOUNT.getPoiType(),
|
||||
poiWrapper.put(EventTypeEnum.SHOP_DISCOUNT.getPoiType(), new PoiWrapper(EventTypeEnum.SHOP_DISCOUNT.getPoiType(),
|
||||
R.drawable.module_common_icon_map_marker_shop_discount, R.drawable.module_common_icon_map_marker_shop_discount, "商场打折"));
|
||||
poiWrapper.put(SceneTypeEnum.FOURS_4S.getPoiType(), new PoiWrapper(SceneTypeEnum.FOURS_4S.getPoiType(),
|
||||
poiWrapper.put(EventTypeEnum.FOURS_4S.getPoiType(), new PoiWrapper(EventTypeEnum.FOURS_4S.getPoiType(),
|
||||
R.drawable.module_common_icon_map_marker_4s, R.drawable.module_common_icon_map_marker_4s, "4S店"));
|
||||
poiWrapper.put(SceneTypeEnum.FOURS_ROAD_WORK.getPoiType(), new PoiWrapper(SceneTypeEnum.FOURS_ROAD_WORK.getPoiType(),
|
||||
poiWrapper.put(EventTypeEnum.FOURS_ROAD_WORK.getPoiType(), new PoiWrapper(EventTypeEnum.FOURS_ROAD_WORK.getPoiType(),
|
||||
R.drawable.module_common_icon_map_marker_road_work2, R.drawable.module_common_icon_map_marker_road_work2_white, "施工"));
|
||||
poiWrapper.put(SceneTypeEnum.FOURS_BLOCK_UP.getPoiType(), new PoiWrapper(SceneTypeEnum.FOURS_BLOCK_UP.getPoiType(),
|
||||
poiWrapper.put(EventTypeEnum.FOURS_BLOCK_UP.getPoiType(), new PoiWrapper(EventTypeEnum.FOURS_BLOCK_UP.getPoiType(),
|
||||
R.drawable.module_common_icon_map_marker_road_block_up2, R.drawable.module_common_icon_map_marker_road_block_up2_white, "拥堵"));
|
||||
poiWrapper.put(SceneTypeEnum.FOURS_PONDING.getPoiType(), new PoiWrapper(SceneTypeEnum.FOURS_PONDING.getPoiType(),
|
||||
poiWrapper.put(EventTypeEnum.FOURS_PONDING.getPoiType(), new PoiWrapper(EventTypeEnum.FOURS_PONDING.getPoiType(),
|
||||
R.drawable.module_common_icon_map_marker_pondingl2, R.drawable.module_common_icon_map_marker_pondingl2_white, "积水"));
|
||||
poiWrapper.put(SceneTypeEnum.FOURS_SHOP_FREE.getPoiType(), new PoiWrapper(SceneTypeEnum.FOURS_SHOP_FREE.getPoiType(),
|
||||
poiWrapper.put(EventTypeEnum.FOURS_SHOP_FREE.getPoiType(), new PoiWrapper(EventTypeEnum.FOURS_SHOP_FREE.getPoiType(),
|
||||
R.drawable.module_common_icon_map_marker_shop, R.drawable.module_common_icon_map_marker_shop, "超时打折"));
|
||||
poiWrapper.put(SceneTypeEnum.FOURS_FOG.getPoiType(), new PoiWrapper(SceneTypeEnum.FOURS_FOG.getPoiType(),
|
||||
poiWrapper.put(EventTypeEnum.FOURS_FOG.getPoiType(), new PoiWrapper(EventTypeEnum.FOURS_FOG.getPoiType(),
|
||||
R.drawable.module_common_ic_rc_dark_frog2, R.drawable.module_common_ic_rc_dark_frog2_white, "浓雾"));
|
||||
poiWrapper.put(SceneTypeEnum.FOURS_ICE.getPoiType(), new PoiWrapper(SceneTypeEnum.FOURS_ICE.getPoiType(),
|
||||
poiWrapper.put(EventTypeEnum.FOURS_ICE.getPoiType(), new PoiWrapper(EventTypeEnum.FOURS_ICE.getPoiType(),
|
||||
R.drawable.module_common_ic_rc_freeze2, R.drawable.module_common_ic_rc_freeze2_white, "结冰"));
|
||||
poiWrapper.put(SceneTypeEnum.FOURS_PARKING.getPoiType(), new PoiWrapper(SceneTypeEnum.FOURS_PARKING.getPoiType(),
|
||||
poiWrapper.put(EventTypeEnum.FOURS_PARKING.getPoiType(), new PoiWrapper(EventTypeEnum.FOURS_PARKING.getPoiType(),
|
||||
R.drawable.module_common_ic_rc_parking2, R.drawable.module_common_ic_rc_parking2, "停车场"));
|
||||
poiWrapper.put(SceneTypeEnum.FOURS_ACCIDENT.getPoiType(), new PoiWrapper(SceneTypeEnum.FOURS_ACCIDENT.getPoiType(),
|
||||
poiWrapper.put(EventTypeEnum.FOURS_ACCIDENT.getPoiType(), new PoiWrapper(EventTypeEnum.FOURS_ACCIDENT.getPoiType(),
|
||||
R.drawable.module_common_ic_rc_accident3, R.drawable.module_common_ic_rc_accident3_white, "事故"));
|
||||
poiWrapper.put(SceneTypeEnum.FOURS_ACCIDENT_01.getPoiType(), new PoiWrapper(SceneTypeEnum.FOURS_ACCIDENT_01.getPoiType(),
|
||||
poiWrapper.put(EventTypeEnum.FOURS_ACCIDENT_01.getPoiType(), new PoiWrapper(EventTypeEnum.FOURS_ACCIDENT_01.getPoiType(),
|
||||
R.drawable.module_common_ic_rc_accident3, R.drawable.module_common_ic_rc_accident3_white, "重大事故"));
|
||||
poiWrapper.put(SceneTypeEnum.FOURS_ACCIDENT_02.getPoiType(), new PoiWrapper(SceneTypeEnum.FOURS_ACCIDENT_02.getPoiType(),
|
||||
poiWrapper.put(EventTypeEnum.FOURS_ACCIDENT_02.getPoiType(), new PoiWrapper(EventTypeEnum.FOURS_ACCIDENT_02.getPoiType(),
|
||||
R.drawable.module_common_ic_rc_accident3, R.drawable.module_common_ic_rc_accident3_white, "特大事故"));
|
||||
poiWrapper.put(SceneTypeEnum.FOURS_ACCIDENT_03.getPoiType(), new PoiWrapper(SceneTypeEnum.FOURS_ACCIDENT_03.getPoiType(),
|
||||
poiWrapper.put(EventTypeEnum.FOURS_ACCIDENT_03.getPoiType(), new PoiWrapper(EventTypeEnum.FOURS_ACCIDENT_03.getPoiType(),
|
||||
R.drawable.module_common_ic_rc_accident3, R.drawable.module_common_ic_rc_accident3_white, "较大事故"));
|
||||
poiWrapper.put(SceneTypeEnum.FOURS_ACCIDENT_04.getPoiType(), new PoiWrapper(SceneTypeEnum.FOURS_ACCIDENT_04.getPoiType(),
|
||||
poiWrapper.put(EventTypeEnum.FOURS_ACCIDENT_04.getPoiType(), new PoiWrapper(EventTypeEnum.FOURS_ACCIDENT_04.getPoiType(),
|
||||
R.drawable.module_common_ic_rc_accident3, R.drawable.module_common_ic_rc_accident3_white, "一般事故"));
|
||||
poiWrapper.put(SceneTypeEnum.FOURS_ACCIDENT_05.getPoiType(), new PoiWrapper(SceneTypeEnum.FOURS_ACCIDENT_05.getPoiType(),
|
||||
poiWrapper.put(EventTypeEnum.FOURS_ACCIDENT_05.getPoiType(), new PoiWrapper(EventTypeEnum.FOURS_ACCIDENT_05.getPoiType(),
|
||||
R.drawable.module_common_ic_rc_accident3, R.drawable.module_common_ic_rc_accident3_white, "轻微事故"));
|
||||
poiWrapper.put(SceneTypeEnum.FOURS_NEALY.getPoiType(), new PoiWrapper(SceneTypeEnum.FOURS_NEALY.getPoiType(),
|
||||
poiWrapper.put(EventTypeEnum.FOURS_NEALY.getPoiType(), new PoiWrapper(EventTypeEnum.FOURS_NEALY.getPoiType(),
|
||||
R.drawable.module_common_icon_map_marker_shear_news, R.drawable.module_common_icon_map_marker_shear_news, "身边"));
|
||||
poiWrapper.put(SceneTypeEnum.FOURS_LIVING.getPoiType(), new PoiWrapper(SceneTypeEnum.FOURS_LIVING.getPoiType(),
|
||||
poiWrapper.put(EventTypeEnum.FOURS_LIVING.getPoiType(), new PoiWrapper(EventTypeEnum.FOURS_LIVING.getPoiType(),
|
||||
R.drawable.module_common_icon_map_marker_living, R.drawable.module_common_icon_map_marker_living_white, "实时路况"));
|
||||
poiWrapper.put(SceneTypeEnum.ILLEGAL_PARK_LIVING.getPoiType(), new PoiWrapper(SceneTypeEnum.ILLEGAL_PARK_LIVING.getPoiType(),
|
||||
poiWrapper.put(EventTypeEnum.ILLEGAL_PARK_LIVING.getPoiType(), new PoiWrapper(EventTypeEnum.ILLEGAL_PARK_LIVING.getPoiType(),
|
||||
R.drawable.module_common_ic_rc_illegal_park, R.drawable.module_common_ic_rc_illegal_park_white, "违章停车"));
|
||||
// 分享里用到的故障求助
|
||||
poiWrapper.put("9999", new PoiWrapper("9999",
|
||||
|
||||
|
Before Width: | Height: | Size: 8.1 KiB |
|
Before Width: | Height: | Size: 7.4 KiB |
|
Before Width: | Height: | Size: 10 KiB |
|
Before Width: | Height: | Size: 2.0 KiB After Width: | Height: | Size: 2.0 KiB |
|
After Width: | Height: | Size: 2.5 KiB |
|
Before Width: | Height: | Size: 2.6 KiB After Width: | Height: | Size: 2.6 KiB |
|
Before Width: | Height: | Size: 2.5 KiB After Width: | Height: | Size: 2.5 KiB |
|
Before Width: | Height: | Size: 2.6 KiB After Width: | Height: | Size: 2.6 KiB |
|
Before Width: | Height: | Size: 11 KiB After Width: | Height: | Size: 11 KiB |
|
Before Width: | Height: | Size: 5.6 KiB After Width: | Height: | Size: 5.6 KiB |
|
Before Width: | Height: | Size: 2.8 KiB After Width: | Height: | Size: 2.8 KiB |
|
Before Width: | Height: | Size: 2.8 KiB After Width: | Height: | Size: 2.8 KiB |
|
Before Width: | Height: | Size: 3.0 KiB After Width: | Height: | Size: 3.0 KiB |
|
Before Width: | Height: | Size: 2.4 KiB After Width: | Height: | Size: 2.4 KiB |
|
Before Width: | Height: | Size: 3.9 KiB After Width: | Height: | Size: 3.9 KiB |
|
Before Width: | Height: | Size: 3.3 KiB After Width: | Height: | Size: 3.3 KiB |
|
After Width: | Height: | Size: 3.1 KiB |
|
Before Width: | Height: | Size: 4.8 KiB After Width: | Height: | Size: 4.8 KiB |
|
After Width: | Height: | Size: 4.5 KiB |
|
Before Width: | Height: | Size: 4.8 KiB After Width: | Height: | Size: 4.8 KiB |
|
Before Width: | Height: | Size: 4.4 KiB After Width: | Height: | Size: 4.4 KiB |
|
Before Width: | Height: | Size: 4.7 KiB After Width: | Height: | Size: 4.7 KiB |
|
Before Width: | Height: | Size: 11 KiB After Width: | Height: | Size: 11 KiB |
|
Before Width: | Height: | Size: 13 KiB After Width: | Height: | Size: 13 KiB |
|
Before Width: | Height: | Size: 4.9 KiB After Width: | Height: | Size: 4.9 KiB |
|
Before Width: | Height: | Size: 5.3 KiB After Width: | Height: | Size: 5.3 KiB |
|
Before Width: | Height: | Size: 5.7 KiB After Width: | Height: | Size: 5.7 KiB |
|
Before Width: | Height: | Size: 3.6 KiB After Width: | Height: | Size: 3.6 KiB |
|
Before Width: | Height: | Size: 8.0 KiB After Width: | Height: | Size: 8.0 KiB |
|
Before Width: | Height: | Size: 6.6 KiB After Width: | Height: | Size: 6.6 KiB |
|
After Width: | Height: | Size: 7.1 KiB |
|
Before Width: | Height: | Size: 4.8 KiB After Width: | Height: | Size: 4.8 KiB |
|
Before Width: | Height: | Size: 4.3 KiB |
|
Before Width: | Height: | Size: 2.1 KiB |
|
Before Width: | Height: | Size: 2.1 KiB |
|
Before Width: | Height: | Size: 2.7 KiB |
|
Before Width: | Height: | Size: 3.4 KiB |
|
Before Width: | Height: | Size: 1.1 KiB |
|
Before Width: | Height: | Size: 4.3 KiB |
|
Before Width: | Height: | Size: 2.7 KiB |
|
Before Width: | Height: | Size: 3.6 KiB |
|
Before Width: | Height: | Size: 2.5 KiB |
|
Before Width: | Height: | Size: 4.6 KiB |
|
Before Width: | Height: | Size: 2.8 KiB |
|
Before Width: | Height: | Size: 2.4 KiB |
|
Before Width: | Height: | Size: 4.0 KiB |
|
Before Width: | Height: | Size: 3.1 KiB |
|
Before Width: | Height: | Size: 1.8 KiB |
|
Before Width: | Height: | Size: 2.7 KiB |
|
Before Width: | Height: | Size: 3.0 KiB |
|
After Width: | Height: | Size: 4.5 KiB |
|
Before Width: | Height: | Size: 4.8 KiB After Width: | Height: | Size: 4.8 KiB |
|
Before Width: | Height: | Size: 4.4 KiB After Width: | Height: | Size: 4.4 KiB |
|
Before Width: | Height: | Size: 4.7 KiB After Width: | Height: | Size: 4.7 KiB |
|
Before Width: | Height: | Size: 11 KiB After Width: | Height: | Size: 11 KiB |
|
Before Width: | Height: | Size: 13 KiB After Width: | Height: | Size: 13 KiB |
|
Before Width: | Height: | Size: 4.9 KiB After Width: | Height: | Size: 4.9 KiB |
|
Before Width: | Height: | Size: 5.3 KiB After Width: | Height: | Size: 5.3 KiB |
|
Before Width: | Height: | Size: 5.7 KiB After Width: | Height: | Size: 5.7 KiB |
|
Before Width: | Height: | Size: 3.6 KiB After Width: | Height: | Size: 3.6 KiB |
|
Before Width: | Height: | Size: 8.0 KiB After Width: | Height: | Size: 8.0 KiB |
|
Before Width: | Height: | Size: 6.6 KiB After Width: | Height: | Size: 6.6 KiB |
|
After Width: | Height: | Size: 7.1 KiB |
|
Before Width: | Height: | Size: 719 B |
|
Before Width: | Height: | Size: 17 KiB |
@@ -19,7 +19,7 @@ mIMoGoWaringProvider = mMogoServiceApis!!.waringProviderApi
|
||||
/**
|
||||
* 触发弹窗
|
||||
*
|
||||
* @param v2xType V2X类型 @WarningTypeEnum
|
||||
* @param v2xType V2X类型 @EventTypeEnum
|
||||
* @param alertContent 提醒文本
|
||||
* @param ttsContent tts语音播报消息
|
||||
* @param tag tag绑定弹窗的标志
|
||||
|
||||
@@ -10,7 +10,7 @@ public class WaringConst {
|
||||
// V2X 弹窗预警
|
||||
// 是否展示:true-展示,false-关闭
|
||||
public static String BROADCAST_V2X_IS_SHOW_EXTRA_KEY = "v2xIsShow";
|
||||
// 预警类型:@WarningTypeEnum
|
||||
// 预警类型:@EventTypeEnum
|
||||
public static String BROADCAST_V2X_TYPE_EXTRA_KEY = "v2xType";
|
||||
// 预警弹窗文字内容
|
||||
public static String BROADCAST_V2X_ALERT_CONTENT_EXTRA_KEY = "alertContent";
|
||||
|
||||
@@ -4,7 +4,7 @@ import android.content.BroadcastReceiver
|
||||
import android.content.Context
|
||||
import android.content.Intent
|
||||
import com.alibaba.android.arouter.launcher.ARouter
|
||||
import com.mogo.module.common.enums.WarningTypeEnum
|
||||
import com.mogo.module.common.enums.EventTypeEnum
|
||||
import com.mogo.module.hmi.WaringConst
|
||||
import com.mogo.service.IMogoServiceApis
|
||||
import com.mogo.service.MogoServicePaths
|
||||
@@ -79,7 +79,7 @@ class V2XWarningBroadcastReceiver : BroadcastReceiver() {
|
||||
ttsContent: String?,
|
||||
tag: String?
|
||||
) {
|
||||
if (v2xType == WarningTypeEnum.TYPE_USECASE_ID_IVP.useCaseId) {
|
||||
if (EventTypeEnum.TYPE_USECASE_ID_IVP.poiType == v2xType.toString()) {
|
||||
mIMoGoWaringProvider!!.showLimitingVelocity(1)
|
||||
}
|
||||
mIMoGoWaringProvider!!.showWarningV2X(
|
||||
|
||||
@@ -8,7 +8,7 @@ import android.view.WindowManager
|
||||
import android.view.animation.OvershootInterpolator
|
||||
import com.mogo.commons.mvp.MvpFragment
|
||||
import com.mogo.commons.voice.AIAssist
|
||||
import com.mogo.module.common.enums.WarningTypeEnum
|
||||
import com.mogo.module.common.enums.EventTypeEnum
|
||||
import com.mogo.module.hmi.R
|
||||
import com.mogo.module.hmi.notification.WarningFloat
|
||||
import com.mogo.module.hmi.notification.anim.DefaultAnimator
|
||||
@@ -55,11 +55,11 @@ class MoGoWarningFragment : MvpFragment<MoGoWarningContract.View?, WaringPresent
|
||||
activity?.let {
|
||||
|
||||
val notificationView = V2XNotificationView(it)
|
||||
notificationView.setWarningIcon(WarningTypeEnum.getWarningIcon(v2xType))
|
||||
notificationView.setWarningIcon(EventTypeEnum.getWarningIcon(v2xType.toString()))
|
||||
|
||||
notificationView.setWarningContent(
|
||||
alertContent ?: WarningTypeEnum.getWarningContent(
|
||||
v2xType
|
||||
alertContent ?: EventTypeEnum.getWarningContent(
|
||||
v2xType.toString()
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
@@ -5,7 +5,7 @@ import android.util.Log
|
||||
import com.alibaba.android.arouter.launcher.ARouter
|
||||
import com.mogo.module.common.datacenter.SnapshotLocationDataCenter
|
||||
import com.mogo.module.common.drawer.TrafficMarkerDrawer
|
||||
import com.mogo.module.common.enums.WarningTypeEnum
|
||||
import com.mogo.module.common.enums.EventTypeEnum
|
||||
import com.mogo.module.obu.mogo.utils.TrafficDataConvertUtils
|
||||
import com.mogo.service.IMogoServiceApis
|
||||
import com.mogo.service.MogoServicePaths
|
||||
@@ -43,7 +43,6 @@ class MogoPrivateObuManager private constructor() {
|
||||
mMogoServiceApis = ARouter.getInstance().build(MogoServicePaths.PATH_SERVICE_APIS)
|
||||
.navigation(context) as IMogoServiceApis
|
||||
mContext = context
|
||||
|
||||
// 获取预警模块的接口
|
||||
mIMoGoWaringProvider = mMogoServiceApis!!.waringProviderApi
|
||||
mIMogoMapService = mMogoServiceApis!!.mapServiceApi
|
||||
@@ -160,15 +159,15 @@ class MogoPrivateObuManager private constructor() {
|
||||
if (info != null && info.threat_info != null && info.ext_info != null) {
|
||||
var alertContent = ""
|
||||
var ttsContent = ""
|
||||
var appId = info.threat_info.app_id
|
||||
var appId = ""
|
||||
val status = info.status
|
||||
val level = info.threat_info.threat_level
|
||||
val direction =
|
||||
getOtherObjDirection(if (info.ext_info != null) info.ext_info.pos_classification else 7)
|
||||
when (appId) {
|
||||
when (info.threat_info.app_id.toString()) {
|
||||
// 道路危险情况预警
|
||||
WarningTypeEnum.TYPE_USECASE_ID_HLW.useCaseId -> {
|
||||
Logger.d(MogoObuConst.TAG_MOGO_OBU, "onCvxRtiThreatIndInfo appId = $appId --status = $status --level = $level -- handleDirection = $direction --rtiType = ${info.ext_info.rti_type}")
|
||||
EventTypeEnum.TYPE_USECASE_ID_HLW.poiType -> {
|
||||
Logger.d(MogoObuConst.TAG_MOGO_OBU, "onCvxRtiThreatIndInfo appId = ${info.threat_info.app_id} --status = $status --level = $level -- handleDirection = $direction --rtiType = ${info.ext_info.rti_type}")
|
||||
when (info.ext_info.rti_type) {
|
||||
//急转弯
|
||||
0x2 -> {
|
||||
@@ -176,63 +175,63 @@ class MogoPrivateObuManager private constructor() {
|
||||
when (direction) {
|
||||
3 -> {
|
||||
appId =
|
||||
WarningTypeEnum.TYPE_USECASE_ID_ROAD_TURN_LEFT_SHARP.useCaseId
|
||||
EventTypeEnum.TYPE_USECASE_ID_ROAD_TURN_LEFT_SHARP.poiType
|
||||
}
|
||||
4 -> {
|
||||
appId =
|
||||
WarningTypeEnum.TYPE_USECASE_ID_ROAD_TURN_RIGHT_SHARP.useCaseId
|
||||
EventTypeEnum.TYPE_USECASE_ID_ROAD_TURN_RIGHT_SHARP.poiType
|
||||
}
|
||||
}
|
||||
}
|
||||
//施工
|
||||
0x7 -> {
|
||||
appId = ObuConstants.USE_CASE_ID.IVS
|
||||
appId = EventTypeEnum.TYPE_USECASE_ID_IVS.poiType
|
||||
}
|
||||
//限速
|
||||
0xA -> {
|
||||
appId = ObuConstants.USE_CASE_ID.SLW
|
||||
appId = EventTypeEnum.TYPE_USECASE_ID_SLW.poiType
|
||||
}
|
||||
//事故
|
||||
0xC -> {
|
||||
appId =
|
||||
WarningTypeEnum.TYPE_USECASE_ID_ROAD_COLLISION_WARNING.useCaseId
|
||||
EventTypeEnum.TYPE_USECASE_ID_ROAD_COLLISION_WARNING.poiType
|
||||
}
|
||||
//拥堵
|
||||
0xD -> {
|
||||
appId = ObuConstants.USE_CASE_ID.TJW
|
||||
appId = EventTypeEnum.TYPE_USECASE_ID_TJW.poiType
|
||||
}
|
||||
//行人
|
||||
0xF -> {
|
||||
appId =
|
||||
WarningTypeEnum.TYPE_USECASE_ID_ROAD_PEDESTRIAN_CROSSING.useCaseId
|
||||
EventTypeEnum.TYPE_USECASE_ID_ROAD_PEDESTRIAN_CROSSING.poiType
|
||||
}
|
||||
//禁止停车
|
||||
0x13 -> {
|
||||
appId = WarningTypeEnum.TYPE_USECASE_ID_ROAD_NO_PARKING.useCaseId
|
||||
appId = EventTypeEnum.TYPE_USECASE_ID_ROAD_NO_PARKING.poiType
|
||||
}
|
||||
//学校
|
||||
0x14 -> {
|
||||
appId =
|
||||
WarningTypeEnum.TYPE_USECASE_ID_ROAD_PEDESTRIAN_SCHOOL.useCaseId
|
||||
EventTypeEnum.TYPE_USECASE_ID_ROAD_PEDESTRIAN_SCHOOL.poiType
|
||||
}
|
||||
//桥梁
|
||||
0x17 -> {
|
||||
appId = WarningTypeEnum.TYPE_USECASE_ID_ROAD_HUMP_BRIDGE.useCaseId
|
||||
appId = EventTypeEnum.TYPE_USECASE_ID_ROAD_HUMP_BRIDGE.poiType
|
||||
}
|
||||
}
|
||||
alertContent = WarningTypeEnum.getWarningContent(appId)
|
||||
ttsContent = WarningTypeEnum.getWarningTts(appId)
|
||||
alertContent = EventTypeEnum.getWarningContent(appId)
|
||||
ttsContent = EventTypeEnum.getWarningTts(appId)
|
||||
}
|
||||
// 车内标牌
|
||||
WarningTypeEnum.TYPE_USECASE_ID_IVS.useCaseId -> {
|
||||
alertContent = WarningTypeEnum.getWarningContent(appId)
|
||||
ttsContent = WarningTypeEnum.getWarningTts(appId)
|
||||
EventTypeEnum.TYPE_USECASE_ID_IVS.poiType -> {
|
||||
alertContent = EventTypeEnum.getWarningContent(appId)
|
||||
ttsContent = EventTypeEnum.getWarningTts(appId)
|
||||
}
|
||||
// 前方拥堵提醒
|
||||
WarningTypeEnum.TYPE_USECASE_ID_TJW.useCaseId -> {
|
||||
alertContent = WarningTypeEnum.getWarningContent(appId)
|
||||
EventTypeEnum.TYPE_USECASE_ID_TJW.poiType -> {
|
||||
alertContent = EventTypeEnum.getWarningContent(appId)
|
||||
ttsContent = String.format(
|
||||
WarningTypeEnum.getWarningTts(appId),
|
||||
EventTypeEnum.getWarningTts(appId),
|
||||
info.threat_info.distance.toInt()
|
||||
)
|
||||
}
|
||||
@@ -247,10 +246,10 @@ class MogoPrivateObuManager private constructor() {
|
||||
)
|
||||
//显示弹框,语音提示
|
||||
mIMoGoWaringProvider!!.showWarningV2X(
|
||||
appId,
|
||||
appId.toInt(),
|
||||
alertContent,
|
||||
if (level == 3) ttsContent else "",
|
||||
appId.toString()
|
||||
appId
|
||||
)
|
||||
// 更新数据
|
||||
TrafficDataConvertUtils.cvxRtiThreatIndInfo2TrafficData(info)?.let {
|
||||
@@ -260,7 +259,7 @@ class MogoPrivateObuManager private constructor() {
|
||||
// 删除
|
||||
ObuConstants.STATUS.DELETE -> {
|
||||
// 移除顶部弹窗
|
||||
mIMoGoWaringProvider?.disableWarningV2X(appId.toString())
|
||||
mIMoGoWaringProvider?.disableWarningV2X(appId)
|
||||
TrafficMarkerDrawer.removeCvxRvInfoIndInfo(info.rti_id)
|
||||
}
|
||||
// 更新
|
||||
@@ -311,14 +310,14 @@ class MogoPrivateObuManager private constructor() {
|
||||
TrafficMarkerDrawer.updateITrafficInfo(it)
|
||||
}
|
||||
|
||||
var v2xType = 0
|
||||
var v2xType = ""
|
||||
if (info.ptc_type == 1) { //摩托车
|
||||
v2xType = WarningTypeEnum.TYPE_USECASE_ID_VRUCW_MOTORBIKE.useCaseId
|
||||
v2xType = EventTypeEnum.TYPE_USECASE_ID_VRUCW_MOTORBIKE.poiType
|
||||
} else if (info.ptc_type == 2) { //行人
|
||||
v2xType = WarningTypeEnum.TYPE_USECASE_ID_VRUCW_PERSON.useCaseId
|
||||
v2xType = EventTypeEnum.TYPE_USECASE_ID_VRUCW_PERSON.poiType
|
||||
}
|
||||
val ttsContent = WarningTypeEnum.getWarningTts(v2xType)
|
||||
val alertContent = WarningTypeEnum.getWarningContent(v2xType)
|
||||
val ttsContent = EventTypeEnum.getWarningTts(v2xType)
|
||||
val alertContent = EventTypeEnum.getWarningContent(v2xType)
|
||||
val direction = 1
|
||||
//getOtherObjDirection(if (info.ext_info != null) info.ext_info.target_classification else 7)
|
||||
//显示警告红边
|
||||
@@ -326,10 +325,10 @@ class MogoPrivateObuManager private constructor() {
|
||||
direction, "ACTION_V2X_FRONT_WARNING"
|
||||
)
|
||||
mIMoGoWaringProvider!!.showWarningV2X(
|
||||
v2xType,
|
||||
v2xType.toInt(),
|
||||
alertContent,
|
||||
ttsContent,
|
||||
v2xType.toString()
|
||||
v2xType
|
||||
)
|
||||
}
|
||||
// 删除
|
||||
@@ -469,8 +468,8 @@ class MogoPrivateObuManager private constructor() {
|
||||
lights: List<Light>,
|
||||
indicator: Int
|
||||
) {
|
||||
var ttsContent = ""
|
||||
var alertContent = ""
|
||||
var ttsContent: String
|
||||
var alertContent: String
|
||||
// TODO 这里需要根据真实数据确定 indicator 取值方式
|
||||
if (lights.size >= indicator) {
|
||||
val currentLight = lights[indicator]
|
||||
@@ -488,8 +487,8 @@ class MogoPrivateObuManager private constructor() {
|
||||
)
|
||||
mIMoGoWaringProvider?.showWarningTrafficLight(1)
|
||||
mIMoGoWaringProvider?.changeCountdownRed(currentLight.count_down.toInt())
|
||||
ttsContent = WarningTypeEnum.getWarningTts(appId)
|
||||
alertContent = WarningTypeEnum.getWarningContent(appId)
|
||||
ttsContent = EventTypeEnum.getWarningTts(appId.toString())
|
||||
alertContent = EventTypeEnum.getWarningContent(appId.toString())
|
||||
mIMoGoWaringProvider!!.showWarningV2X(
|
||||
appId,
|
||||
alertContent,
|
||||
@@ -510,18 +509,18 @@ class MogoPrivateObuManager private constructor() {
|
||||
|
||||
ttsContent =
|
||||
String.format(
|
||||
WarningTypeEnum.getWarningTts(WarningTypeEnum.TYPE_USECASE_ID_IVP_GREEN.useCaseId),
|
||||
EventTypeEnum.getWarningTts(EventTypeEnum.TYPE_USECASE_ID_IVP_GREEN.poiType),
|
||||
adviceSpeedTts
|
||||
)
|
||||
|
||||
alertContent =
|
||||
String.format(
|
||||
WarningTypeEnum.getWarningContent(WarningTypeEnum.TYPE_USECASE_ID_IVP_GREEN.useCaseId),
|
||||
EventTypeEnum.getWarningContent(EventTypeEnum.TYPE_USECASE_ID_IVP_GREEN.poiType),
|
||||
adviceSpeed
|
||||
)
|
||||
|
||||
mIMoGoWaringProvider!!.showWarningV2X(
|
||||
WarningTypeEnum.TYPE_USECASE_ID_IVP_GREEN.useCaseId,
|
||||
EventTypeEnum.TYPE_USECASE_ID_IVP_GREEN.poiType.toInt(),
|
||||
alertContent,
|
||||
ttsContent,
|
||||
appId.toString()
|
||||
@@ -543,7 +542,7 @@ class MogoPrivateObuManager private constructor() {
|
||||
*
|
||||
* @param appId 使用WarningTypeEnum获取icon、提示内容、tts内容
|
||||
*
|
||||
* @see com.mogo.module.common.enums.WarningTypeEnum
|
||||
* @see com.mogo.module.common.enums.EventTypeEnum
|
||||
*/
|
||||
private fun handleSdkObu(
|
||||
appId: Int,
|
||||
@@ -552,18 +551,18 @@ class MogoPrivateObuManager private constructor() {
|
||||
level: Int,
|
||||
info: CvxV2vThreatIndInfo
|
||||
) {
|
||||
// 这里排除需要特殊定制的语音及文案外,其余的都可以使用 WarningTypeEnum 提供的
|
||||
// 这里排除需要特殊定制的语音及文案外,其余的都可以使用 EventTypeEnum 提供的
|
||||
Log.d(
|
||||
MogoObuConst.TAG_MOGO_OBU,
|
||||
"handleSdkObu appId = $appId --- handleDirection = $direction ---level = $level ---status = $status"
|
||||
)
|
||||
var alertContent = ""
|
||||
var ttsContent = ""
|
||||
when (appId) {
|
||||
var alertContent: String
|
||||
var ttsContent: String
|
||||
when (appId.toString()) {
|
||||
// 变道预警,注意左后车辆/注意右后车辆
|
||||
WarningTypeEnum.TYPE_USECASE_ID_LCW.useCaseId -> {
|
||||
alertContent = WarningTypeEnum.getWarningContent(appId)
|
||||
ttsContent = WarningTypeEnum.getWarningTts(appId)
|
||||
EventTypeEnum.TYPE_USECASE_ID_LCW.poiType -> {
|
||||
alertContent = EventTypeEnum.getWarningContent(appId.toString())
|
||||
ttsContent = EventTypeEnum.getWarningTts(appId.toString())
|
||||
if (direction == 5) {
|
||||
ttsContent = String.format(ttsContent, "左")
|
||||
alertContent = String.format(alertContent, "左")
|
||||
@@ -574,9 +573,9 @@ class MogoPrivateObuManager private constructor() {
|
||||
}
|
||||
|
||||
//车辆失控预警
|
||||
WarningTypeEnum.TYPE_USECASE_ID_CLW.useCaseId -> {
|
||||
alertContent = WarningTypeEnum.getWarningContent(appId)
|
||||
ttsContent = WarningTypeEnum.getWarningTts(appId)
|
||||
EventTypeEnum.TYPE_USECASE_ID_CLW.poiType -> {
|
||||
alertContent = EventTypeEnum.getWarningContent(appId.toString())
|
||||
ttsContent = EventTypeEnum.getWarningTts(appId.toString())
|
||||
// when (direction) {
|
||||
// 3 -> { //左前
|
||||
// ttsContent = String.format(ttsContent, "左")
|
||||
@@ -591,9 +590,9 @@ class MogoPrivateObuManager private constructor() {
|
||||
}
|
||||
|
||||
//左转辅助
|
||||
WarningTypeEnum.TYPE_USECASE_ID_LTA.useCaseId -> {
|
||||
alertContent = WarningTypeEnum.getWarningContent(appId)
|
||||
ttsContent = WarningTypeEnum.getWarningTts(appId)
|
||||
EventTypeEnum.TYPE_USECASE_ID_LTA.poiType -> {
|
||||
alertContent = EventTypeEnum.getWarningContent(appId.toString())
|
||||
ttsContent = EventTypeEnum.getWarningTts(appId.toString())
|
||||
if (direction == 5) {
|
||||
ttsContent = String.format(ttsContent, "左")
|
||||
} else if (direction == 6) {
|
||||
@@ -602,9 +601,9 @@ class MogoPrivateObuManager private constructor() {
|
||||
}
|
||||
|
||||
//异常车辆提醒
|
||||
WarningTypeEnum.TYPE_USECASE_ID_AVW.useCaseId -> {
|
||||
alertContent = WarningTypeEnum.getWarningContent(appId)
|
||||
ttsContent = WarningTypeEnum.getWarningTts(appId)
|
||||
EventTypeEnum.TYPE_USECASE_ID_AVW.poiType -> {
|
||||
alertContent = EventTypeEnum.getWarningContent(appId.toString())
|
||||
ttsContent = EventTypeEnum.getWarningTts(appId.toString())
|
||||
// when (direction) {
|
||||
// 3 -> { //左前
|
||||
// ttsContent = String.format(ttsContent, "左")
|
||||
@@ -619,9 +618,9 @@ class MogoPrivateObuManager private constructor() {
|
||||
}
|
||||
|
||||
//盲区预警
|
||||
WarningTypeEnum.TYPE_USECASE_ID_BSW.useCaseId -> {
|
||||
ttsContent = WarningTypeEnum.getWarningTts(appId)
|
||||
alertContent = WarningTypeEnum.getWarningContent(appId)
|
||||
EventTypeEnum.TYPE_USECASE_ID_BSW.poiType -> {
|
||||
ttsContent = EventTypeEnum.getWarningTts(appId.toString())
|
||||
alertContent = EventTypeEnum.getWarningContent(appId.toString())
|
||||
if (direction == 5) { //左后
|
||||
ttsContent = String.format(ttsContent, "左")
|
||||
alertContent = String.format(alertContent, "左")
|
||||
@@ -633,8 +632,8 @@ class MogoPrivateObuManager private constructor() {
|
||||
|
||||
// 这里处理固定的提示信息
|
||||
else -> {
|
||||
ttsContent = WarningTypeEnum.getWarningTts(appId)
|
||||
alertContent = WarningTypeEnum.getWarningContent(appId)
|
||||
ttsContent = EventTypeEnum.getWarningTts(appId.toString())
|
||||
alertContent = EventTypeEnum.getWarningContent(appId.toString())
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -4,8 +4,7 @@ import android.content.Context
|
||||
import android.util.Log
|
||||
import com.mogo.commons.voice.AIAssist
|
||||
import com.mogo.map.MogoLatLng
|
||||
import com.mogo.module.common.entity.MarkerPoiTypeEnum
|
||||
import com.mogo.module.common.enums.SceneTypeEnum
|
||||
import com.mogo.module.common.enums.EventTypeEnum
|
||||
import com.mogo.module.share.R
|
||||
import com.mogo.module.share.constant.ShareConstants.*
|
||||
import com.mogo.service.share.TanluUploadParams
|
||||
@@ -94,7 +93,7 @@ object UploadHelper {
|
||||
|
||||
|
||||
private fun getTypeName(type: String): String? {
|
||||
return SceneTypeEnum.getTypeName(type)
|
||||
return EventTypeEnum.getTypeName(type)
|
||||
}
|
||||
|
||||
}
|
||||
@@ -4,15 +4,13 @@ import android.content.Context;
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
import android.widget.Button;
|
||||
import android.widget.RatingBar;
|
||||
import android.widget.TextView;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.recyclerview.widget.RecyclerView;
|
||||
|
||||
import com.alibaba.android.arouter.launcher.ARouter;
|
||||
import com.mogo.module.common.enums.SceneTypeEnum;
|
||||
import com.mogo.module.common.enums.EventTypeEnum;
|
||||
import com.mogo.module.common.view.CustomRatingBar;
|
||||
import com.mogo.module.v2x.R;
|
||||
import com.mogo.module.v2x.entity.panel.V2XShareEventDescription;
|
||||
@@ -108,8 +106,8 @@ public class V2XShareEventAdapter extends RecyclerView.Adapter<RecyclerView.View
|
||||
String notLikeNum = String.valueOf(data.getNotlikeNum());
|
||||
|
||||
if (poitype != null) {
|
||||
((shareItemViewHolder) holder).caseStyleTextView.setText(SceneTypeEnum.getPoiTypeStr(poitype));
|
||||
((shareItemViewHolder) holder).caseStyleTextView.setBackgroundResource(SceneTypeEnum.getPoiTypeBgForShareItem(poitype));
|
||||
((shareItemViewHolder) holder).caseStyleTextView.setText(EventTypeEnum.getPoiTypeStr(poitype));
|
||||
((shareItemViewHolder) holder).caseStyleTextView.setBackgroundResource(EventTypeEnum.getPoiTypeBgForShareItem(poitype));
|
||||
|
||||
}
|
||||
if (address != null) {
|
||||
|
||||
@@ -10,7 +10,7 @@ import android.widget.TextView;
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.recyclerview.widget.RecyclerView;
|
||||
|
||||
import com.mogo.module.common.enums.SceneTypeEnum;
|
||||
import com.mogo.module.common.enums.EventTypeEnum;
|
||||
import com.mogo.module.v2x.R;
|
||||
import com.mogo.module.v2x.adapter.holder.V2XSurroundingViewHolder;
|
||||
import com.mogo.module.v2x.entity.panel.SurroundingConstruction;
|
||||
@@ -65,7 +65,7 @@ public class V2XSurroundingAdapter extends RecyclerView.Adapter<V2XSurroundingVi
|
||||
mTypeTv = holder.itemView.findViewById(R.id.tv_poitype);
|
||||
mTotalTv = holder.itemView.findViewById(R.id.tv_info_total);
|
||||
|
||||
mTypeTv.setText(SceneTypeEnum.getTypeName(surroundingConstruction.getPoiType()));
|
||||
mTypeTv.setText(EventTypeEnum.getTypeName(surroundingConstruction.getPoiType()));
|
||||
if (surroundingConstruction.getConstrutList() != null) {
|
||||
mTotalTv.setText(surroundingConstruction.getConstrutList().size() + "条");
|
||||
}
|
||||
@@ -79,8 +79,8 @@ public class V2XSurroundingAdapter extends RecyclerView.Adapter<V2XSurroundingVi
|
||||
}
|
||||
});
|
||||
|
||||
mBgImageView.setBackgroundResource(SceneTypeEnum.getTypeRes(surroundingConstruction.getPoiType()));
|
||||
mTypeImageView.setBackgroundResource(SceneTypeEnum.getTypeSmallRes(surroundingConstruction.getPoiType()));
|
||||
mBgImageView.setBackgroundResource(EventTypeEnum.getTypeRes(surroundingConstruction.getPoiType()));
|
||||
mTypeImageView.setBackgroundResource(EventTypeEnum.getTypeSmallRes(surroundingConstruction.getPoiType()));
|
||||
// RequestOptions requestOptions = new RequestOptions()
|
||||
// .placeholder(R.drawable.v2x_icon_live_logo)
|
||||
// .error(R.drawable.v2x_icon_live_logo)
|
||||
|
||||
@@ -4,19 +4,16 @@ import android.content.Context;
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
import android.widget.ImageView;
|
||||
import android.widget.TextView;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.recyclerview.widget.RecyclerView;
|
||||
|
||||
import com.mogo.module.common.entity.MarkerExploreWay;
|
||||
import com.mogo.module.common.entity.MarkerPoiTypeEnum;
|
||||
import com.mogo.module.common.enums.SceneTypeEnum;
|
||||
import com.mogo.module.common.enums.EventTypeEnum;
|
||||
import com.mogo.module.v2x.R;
|
||||
import com.mogo.module.v2x.V2XConst;
|
||||
import com.mogo.module.v2x.adapter.holder.V2XSurroundingDetailVH;
|
||||
import com.mogo.module.v2x.entity.panel.SurroundingConstruction;
|
||||
import com.mogo.module.v2x.listener.SurroundingDetailItemListener;
|
||||
import com.mogo.module.v2x.utils.RoadConditionUtils;
|
||||
import com.mogo.module.v2x.view.HeartLikeView;
|
||||
@@ -77,7 +74,7 @@ public class V2XSurroundingDetailAdapter extends RecyclerView.Adapter<V2XSurroun
|
||||
mUnHeartLikeView = holder.itemView.findViewById(R.id.surrounding_road_unlike);
|
||||
|
||||
mUserNameTv.setText( exploreWay.getUserInfo() != null ? ("用户" + exploreWay.getUserInfo().getUserName() + "分享") : "蘑菇用户分享");
|
||||
mTypeTv.setText(SceneTypeEnum.getTypeName(exploreWay.getPoiType()));
|
||||
mTypeTv.setText(EventTypeEnum.getTypeName(exploreWay.getPoiType()));
|
||||
mAddressTv.setText(exploreWay.getAddr());
|
||||
mTimeTv.setText(DateTimeUtils.getTimeText(exploreWay.getGenerateTime(), DateTimeUtils.MM_Yue_dd_Ri_HH_mm));
|
||||
|
||||
|
||||
@@ -13,7 +13,7 @@ import com.mogo.map.MogoLatLng;
|
||||
import com.mogo.module.common.entity.MarkerExploreWay;
|
||||
import com.mogo.module.common.entity.V2XEventShowEntity;
|
||||
import com.mogo.module.common.entity.V2XRoadEventEntity;
|
||||
import com.mogo.module.common.enums.SceneTypeEnum;
|
||||
import com.mogo.module.common.enums.EventTypeEnum;
|
||||
import com.mogo.module.v2x.R;
|
||||
import com.mogo.module.v2x.V2XConst;
|
||||
import com.mogo.module.v2x.V2XServiceManager;
|
||||
@@ -116,7 +116,7 @@ public class V2XEventUgcVH extends V2XBaseViewHolder<V2XEventShowEntity> {
|
||||
|
||||
if (mNoveltyInfo != null) {
|
||||
|
||||
Object[] ugcTitleStr = SceneTypeEnum.getUgcTitleStr(mNoveltyInfo.getPoiType());
|
||||
Object[] ugcTitleStr = EventTypeEnum.getUgcTitleStr(mNoveltyInfo.getPoiType());
|
||||
|
||||
if (ugcTitleStr != null) {
|
||||
tvEventUgcTitle.setText(((String) ugcTitleStr[0]).replace("####", mNoveltyInfo.getAddr()));
|
||||
|
||||
@@ -2,13 +2,11 @@ package com.mogo.module.v2x.adapter.holder;
|
||||
|
||||
import android.content.Context;
|
||||
import android.content.Intent;
|
||||
import android.graphics.drawable.Drawable;
|
||||
import android.os.Handler;
|
||||
import android.text.TextUtils;
|
||||
import android.util.Log;
|
||||
import android.view.Gravity;
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.MotionEvent;
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
import android.view.WindowManager;
|
||||
@@ -17,7 +15,6 @@ import android.widget.TextView;
|
||||
|
||||
import com.bumptech.glide.Glide;
|
||||
import com.bumptech.glide.request.RequestOptions;
|
||||
import com.mogo.commons.AbsMogoApplication;
|
||||
import com.mogo.commons.debug.DebugConfig;
|
||||
import com.mogo.module.common.animation.BezierAnimationView;
|
||||
import com.mogo.module.common.entity.MarkerExploreWay;
|
||||
@@ -25,9 +22,8 @@ import com.mogo.module.common.entity.MarkerUserInfo;
|
||||
import com.mogo.module.common.entity.V2XEventShowEntity;
|
||||
import com.mogo.module.common.entity.V2XLiveCarInfoEntity;
|
||||
import com.mogo.module.common.entity.V2XMessageEntity;
|
||||
import com.mogo.module.common.entity.V2XPoiTypeEnum;
|
||||
import com.mogo.module.common.entity.V2XRoadEventEntity;
|
||||
import com.mogo.module.common.enums.SceneTypeEnum;
|
||||
import com.mogo.module.common.enums.EventTypeEnum;
|
||||
import com.mogo.module.common.wm.WindowManagerView;
|
||||
import com.mogo.module.service.MarkerServiceHandler;
|
||||
import com.mogo.module.service.receiver.MogoReceiver;
|
||||
@@ -275,17 +271,17 @@ public class V2XRoadEventVH extends V2XBaseViewHolder<V2XEventShowEntity> {
|
||||
.displayImage(mNoveltyInfo.getUserInfo().getUserHead(), ivReportHead);
|
||||
}
|
||||
|
||||
String poiType = SceneTypeEnum.getPoiTypeStr(mNoveltyInfo.getPoiType());
|
||||
String poiType = EventTypeEnum.getPoiTypeStr(mNoveltyInfo.getPoiType());
|
||||
if (!TextUtils.isEmpty(poiType)) {
|
||||
tvEventTypeTitle.setText(poiType);
|
||||
tvEventTypeTitle.setBackgroundResource(SceneTypeEnum.getPoiTypeBg(mNoveltyInfo.getPoiType(),
|
||||
tvEventTypeTitle.setBackgroundResource(EventTypeEnum.getPoiTypeBg(mNoveltyInfo.getPoiType(),
|
||||
V2XServiceManager.getMoGoStatusManager().isVrMode()));
|
||||
|
||||
}
|
||||
ivEvent.setImageResource(SceneTypeEnum.getPoiTypeSrcVr(mNoveltyInfo.getPoiType()));
|
||||
tvEvent.setText(SceneTypeEnum.getPoiTypeStrVr(mNoveltyInfo.getPoiType()));
|
||||
if (V2XPoiTypeEnum.FOURS_FOG.equals(mNoveltyInfo.getPoiType())) {
|
||||
V2XServiceManager.getDisplayEffectsManager().displayEffects(V2XPoiTypeEnum.FOURS_FOG);
|
||||
ivEvent.setImageResource(EventTypeEnum.getPoiTypeSrcVr(mNoveltyInfo.getPoiType()));
|
||||
tvEvent.setText(EventTypeEnum.getPoiTypeStrVr(mNoveltyInfo.getPoiType()));
|
||||
if (EventTypeEnum.FOURS_FOG.equals(mNoveltyInfo.getPoiType())) {
|
||||
V2XServiceManager.getDisplayEffectsManager().displayEffects(EventTypeEnum.FOURS_FOG.getPoiType());
|
||||
MarkerServiceHandler.getApis().getV2XListenerManager().warningChangedForListenerWithDirection(ALERT_THE_FRONT_CRASH_WARNING_TOP, MogoReceiver.ACTION_V2X_FRONT_WARNING);
|
||||
}
|
||||
tvEventAddress.setText(mNoveltyInfo.getAddr());
|
||||
|
||||
@@ -8,7 +8,7 @@ import android.widget.TextView;
|
||||
|
||||
import com.mogo.module.common.entity.MarkerExploreWay;
|
||||
import com.mogo.module.common.entity.V2XHistoryScenarioData;
|
||||
import com.mogo.module.common.enums.SceneTypeEnum;
|
||||
import com.mogo.module.common.enums.EventTypeEnum;
|
||||
import com.mogo.module.v2x.R;
|
||||
import com.mogo.module.v2x.V2XConst;
|
||||
import com.mogo.module.v2x.utils.RoadConditionUtils;
|
||||
@@ -58,7 +58,7 @@ public class V2XScenarioHistoryRoadEventVH extends V2XHistoryBaseViewHolder<V2XH
|
||||
|
||||
mIvIconP.setVisibility(View.GONE);
|
||||
mTvAddress.setText(mExploreWay.getAddr());
|
||||
mTagEventType.setText(SceneTypeEnum.getPoiTypeStr(mExploreWay.getPoiType()));
|
||||
mTagEventType.setText(EventTypeEnum.getPoiTypeStr(mExploreWay.getPoiType()));
|
||||
|
||||
try {
|
||||
mTvIllegalNum.setText(mExploreWay.getUserInfo().getUserName() + "的分享 " +
|
||||
|
||||
@@ -14,9 +14,9 @@ import com.mogo.map.search.poisearch.MogoPoiResult;
|
||||
import com.mogo.map.search.poisearch.query.MogoPoiSearchQuery;
|
||||
import com.mogo.module.common.entity.MarkerExploreWay;
|
||||
import com.mogo.module.common.entity.MarkerLocation;
|
||||
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.common.enums.EventTypeEnum;
|
||||
import com.mogo.module.service.Utils;
|
||||
import com.mogo.module.v2x.V2XConst;
|
||||
import com.mogo.module.v2x.V2XServiceManager;
|
||||
@@ -187,7 +187,7 @@ public class V2XAlarmServer {
|
||||
.getString(V2XConst.V2X_STRATEGY_PUSH), V2XStrategyPushRes.ResultBean.class);
|
||||
|
||||
V2XPushMessageEntity drivingShowEntity = new V2XPushMessageEntity();
|
||||
drivingShowEntity.setSceneId(V2XPoiTypeEnum.ALERT_FATIGUE_DRIVING);
|
||||
drivingShowEntity.setSceneId(EventTypeEnum.ALERT_FATIGUE_DRIVING.getPoiType());
|
||||
|
||||
if (strategyPushEntity != null &&
|
||||
!ArrayUtils.isEmpty(strategyPushEntity.getLevelList())) {
|
||||
|
||||
@@ -8,7 +8,7 @@ import com.mogo.map.location.MogoLocation;
|
||||
import com.mogo.module.common.entity.MarkerLocation;
|
||||
import com.mogo.module.common.entity.V2XMessageEntity;
|
||||
import com.mogo.module.common.entity.V2XRoadEventEntity;
|
||||
import com.mogo.module.common.enums.SceneTypeEnum;
|
||||
import com.mogo.module.common.enums.EventTypeEnum;
|
||||
import com.mogo.module.v2x.V2XConst;
|
||||
import com.mogo.module.v2x.utils.DrivingDirectionUtils;
|
||||
import com.mogo.module.v2x.utils.V2XUtils;
|
||||
@@ -51,7 +51,7 @@ public class V2XEarlyWarningServer {
|
||||
String roadInfoId = v2XRoadEventEntity.getNoveltyInfo().getInfoId();
|
||||
|
||||
// 封路、施工、拥堵、拥堵 才会有UGC提示
|
||||
if (SceneTypeEnum.isNeedRoadEventUgc(v2XRoadEventEntity.getPoiType())) {
|
||||
if (EventTypeEnum.isNeedRoadEventUgc(v2XRoadEventEntity.getPoiType())) {
|
||||
// Logger.w(MODULE_NAME,
|
||||
// "V2X预警--UGC检测:" +
|
||||
// "\n事件详情:" + roadInfoId +
|
||||
|
||||
@@ -1,8 +1,7 @@
|
||||
package com.mogo.module.v2x.entity.panel;
|
||||
|
||||
import com.mogo.module.common.entity.MarkerExploreWay;
|
||||
import com.mogo.module.common.entity.MarkerPoiTypeEnum;
|
||||
import com.mogo.module.common.enums.SceneTypeEnum;
|
||||
import com.mogo.module.common.enums.EventTypeEnum;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.ArrayList;
|
||||
@@ -40,7 +39,7 @@ public class SurroundingConstruction implements Serializable {
|
||||
|
||||
public String getTypeNameTTS(String type) {
|
||||
String typeName = "请查看周边的";
|
||||
typeName += SceneTypeEnum.getTypeNameTTS(type);
|
||||
typeName += EventTypeEnum.getTypeNameTTS(type);
|
||||
return typeName + "信息";
|
||||
}
|
||||
}
|
||||
|
||||
@@ -24,7 +24,7 @@ import com.mogo.commons.debug.DebugConfig
|
||||
import com.mogo.commons.mvp.MvpFragment
|
||||
import com.mogo.module.common.entity.MarkerExploreWay
|
||||
import com.mogo.module.common.MogoApisHandler
|
||||
import com.mogo.module.common.enums.SceneTypeEnum
|
||||
import com.mogo.module.common.enums.EventTypeEnum
|
||||
import com.mogo.module.v2x.R
|
||||
import com.mogo.module.v2x.SpacesItemDecoration
|
||||
import com.mogo.module.v2x.V2XConst.MODULE_NAME
|
||||
@@ -317,14 +317,14 @@ class V2XEventPanelFragment : MvpFragment<V2XEventPanelFragment, EventPanelPrese
|
||||
mSurroundingDetailAdapter.notifyDataSetChanged()
|
||||
|
||||
val originStr = String.format(context!!.resources.getString(R.string.v2x_surrounding_detail_top_brief), markerExploreWays.size)
|
||||
val spannableString = SpannableString(originStr + SceneTypeEnum.getTypeName(detailData.poiType))
|
||||
val spannableString = SpannableString(originStr + EventTypeEnum.getTypeName(detailData.poiType))
|
||||
spannableString.setSpan(ForegroundColorSpan(Color.parseColor("#459DFF")),
|
||||
7, originStr.length - SceneTypeEnum.getTypeName(detailData.poiType)?.length!!, Spanned.SPAN_EXCLUSIVE_EXCLUSIVE)
|
||||
7, originStr.length - EventTypeEnum.getTypeName(detailData.poiType)?.length!!, Spanned.SPAN_EXCLUSIVE_EXCLUSIVE)
|
||||
//设置字体大小,true表示前面的字体大小 dip
|
||||
spannableString.setSpan(AbsoluteSizeSpan(context!!.resources.getDimension(R.dimen.module_v2x_surrounding_top_textsize).toInt(), true),
|
||||
7, originStr.length - SceneTypeEnum.getTypeName(detailData.poiType)?.length!!, Spanned.SPAN_EXCLUSIVE_EXCLUSIVE)
|
||||
7, originStr.length - EventTypeEnum.getTypeName(detailData.poiType)?.length!!, Spanned.SPAN_EXCLUSIVE_EXCLUSIVE)
|
||||
spannableString.setSpan(StyleSpan(Typeface.BOLD), 7,
|
||||
originStr.length - SceneTypeEnum.getTypeName(detailData.poiType)?.length!!, Spanned.SPAN_EXCLUSIVE_EXCLUSIVE)
|
||||
originStr.length - EventTypeEnum.getTypeName(detailData.poiType)?.length!!, Spanned.SPAN_EXCLUSIVE_EXCLUSIVE)
|
||||
mTopBriefTv?.text = (spannableString)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -34,15 +34,11 @@ import com.mogo.map.marker.IMogoMarker;
|
||||
import com.mogo.map.marker.anim.OnMarkerAnimationListener;
|
||||
import com.mogo.module.common.entity.MarkerExploreWay;
|
||||
import com.mogo.module.common.entity.MarkerLocation;
|
||||
import com.mogo.module.common.entity.MarkerPoiTypeEnum;
|
||||
import com.mogo.module.common.entity.MarkerShowEntity;
|
||||
import com.mogo.module.service.ServiceConst;
|
||||
import com.mogo.module.v2x.R;
|
||||
import com.mogo.module.v2x.SpacesItemDecoration;
|
||||
import com.mogo.module.v2x.V2XServiceManager;
|
||||
import com.mogo.module.v2x.adapter.V2XShareEventAdapter;
|
||||
import com.mogo.module.v2x.adapter.V2XSurroundingAdapter;
|
||||
import com.mogo.module.v2x.adapter.V2XSurroundingDetailAdapter;
|
||||
import com.mogo.module.v2x.entity.panel.BackRefreshInfo;
|
||||
import com.mogo.module.v2x.entity.panel.SurroundingConstruction;
|
||||
import com.mogo.module.v2x.listener.SurroundingItemClickListener;
|
||||
|
||||
@@ -15,9 +15,9 @@ import com.mogo.map.search.geo.MogoRegeocodeResult;
|
||||
import com.mogo.module.common.entity.MarkerExploreWay;
|
||||
import com.mogo.module.common.entity.MarkerResponse;
|
||||
import com.mogo.module.common.entity.V2XMessageEntity;
|
||||
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.common.enums.EventTypeEnum;
|
||||
import com.mogo.module.service.Utils;
|
||||
import com.mogo.module.v2x.V2XConst;
|
||||
import com.mogo.module.v2x.V2XServiceManager;
|
||||
@@ -37,12 +37,10 @@ import com.mogo.module.v2x.utils.V2XSQLiteUtils;
|
||||
import com.mogo.utils.logger.Logger;
|
||||
import com.mogo.utils.network.utils.GsonUtil;
|
||||
|
||||
import java.util.Arrays;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
import static com.mogo.module.common.entity.MarkerPoiTypeEnum.FOURS_BLOCK_UP;
|
||||
import static com.mogo.module.v2x.V2XConst.MODULE_NAME;
|
||||
|
||||
/**
|
||||
@@ -180,7 +178,7 @@ public class V2XLocationListener
|
||||
Logger.i(V2XConst.MODULE_NAME, "疲劳驾驶POI查询结果为: " + GsonUtil.jsonFromObject(drivingShowEntity));
|
||||
|
||||
String style = V2XServiceManager.getMoGoStatusManager().isMainPageOnResume() ? "1" : "2";
|
||||
trackWithType(V2XPoiTypeEnum.ALERT_FATIGUE_DRIVING, drivingShowEntity.getLon(), drivingShowEntity.getLat(), style);
|
||||
trackWithType(EventTypeEnum.ALERT_FATIGUE_DRIVING.getPoiType(), drivingShowEntity.getLon(), drivingShowEntity.getLat(), style);
|
||||
|
||||
V2XMessageEntity<V2XPushMessageEntity> v2XMessageEntity = new V2XMessageEntity<>();
|
||||
v2XMessageEntity.setType(V2XMessageEntity.V2XTypeEnum.ALERT_FATIGUE_DRIVING);
|
||||
@@ -220,7 +218,7 @@ public class V2XLocationListener
|
||||
|
||||
//如果poiType是道路拥堵,则调用接口查询拥堵状态
|
||||
String poiType = v2XRoadEventEntity.getPoiType();
|
||||
if (poiType != null && poiType.equals(FOURS_BLOCK_UP)) {
|
||||
if (poiType != null && poiType.equals(EventTypeEnum.FOURS_BLOCK_UP.getPoiType())) {
|
||||
V2XServiceManager.getIMogoTrafficUploadProvider().verifyCurrentTrafficStatus();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -8,9 +8,9 @@ import com.mogo.module.common.entity.MarkerExploreWay;
|
||||
import com.mogo.module.common.entity.MarkerLocation;
|
||||
import com.mogo.module.common.entity.MarkerOnlineCar;
|
||||
import com.mogo.module.common.entity.MarkerShowEntity;
|
||||
import com.mogo.module.common.enums.EventTypeEnum;
|
||||
import com.mogo.module.service.ServiceConst;
|
||||
import com.mogo.module.v2x.V2XServiceManager;
|
||||
import com.mogo.module.common.entity.V2XPoiTypeEnum;
|
||||
import com.mogo.module.common.entity.V2XRoadEventEntity;
|
||||
import com.mogo.module.v2x.utils.ChartingUtil;
|
||||
import com.mogo.utils.logger.Logger;
|
||||
@@ -110,7 +110,7 @@ public class V2XMarkerClickListener implements IMogoMarkerClickListener {
|
||||
V2XRoadEventEntity v2XRoadEventEntity = new V2XRoadEventEntity();
|
||||
v2XRoadEventEntity.setLocation(markerExploreWay.getLocation());
|
||||
// 探路目前只有上报拥堵
|
||||
v2XRoadEventEntity.setPoiType(V2XPoiTypeEnum.FOURS_BLOCK_UP);
|
||||
v2XRoadEventEntity.setPoiType(EventTypeEnum.FOURS_BLOCK_UP.getPoiType());
|
||||
|
||||
v2XRoadEventEntity.setDistance(1000);
|
||||
v2XRoadEventEntity.setNoveltyInfo(markerExploreWay);
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
package com.mogo.module.v2x.listener;
|
||||
|
||||
import com.mogo.module.common.entity.V2XMessageEntity;
|
||||
import com.mogo.module.common.entity.V2XPoiTypeEnum;
|
||||
import com.mogo.module.common.enums.EventTypeEnum;
|
||||
import com.mogo.module.v2x.V2XConst;
|
||||
import com.mogo.module.v2x.V2XServiceManager;
|
||||
import com.mogo.module.v2x.entity.net.V2XSpecialCarRes;
|
||||
@@ -67,7 +67,7 @@ public class V2XMessageListener_401005 implements IMogoOnMessageListener<V2XSpec
|
||||
|
||||
for (V2XMarkerEntity coordinate : coordinates) {
|
||||
//故障车机
|
||||
if (coordinate.getTargetId() == V2XPoiTypeEnum.ALERT_CAR_TROUBLE_WARNING) {
|
||||
if (EventTypeEnum.ALERT_CAR_TROUBLE_WARNING.getPoiType().equals(coordinate.getTargetId()+"")) {
|
||||
entityList.add(coordinate);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
package com.mogo.module.v2x.listener;
|
||||
|
||||
import com.mogo.module.common.enums.EventTypeEnum;
|
||||
import com.mogo.module.service.MarkerServiceHandler;
|
||||
import com.mogo.module.v2x.V2XServiceManager;
|
||||
import com.mogo.module.v2x.entity.net.V2XAlarmEventRes;
|
||||
import com.mogo.module.common.entity.V2XPoiTypeEnum;
|
||||
import com.mogo.module.v2x.utils.ADASUtils;
|
||||
import com.mogo.service.cloud.socket.IMogoOnMessageListener;
|
||||
import com.mogo.utils.logger.Logger;
|
||||
@@ -38,7 +38,7 @@ public class V2XMessageListener_401007 implements IMogoOnMessageListener<V2XAlar
|
||||
|
||||
// 统计代码
|
||||
final Map<String, Object> properties = new HashMap<>();
|
||||
properties.put("warning_id", V2XPoiTypeEnum.ALERT_TRAFFIC_CONTROL);
|
||||
properties.put("warning_id", EventTypeEnum.ALERT_TRAFFIC_CONTROL.getPoiType());
|
||||
MarkerServiceHandler.getMogoAnalytics().track("v2x_warning", properties);
|
||||
}
|
||||
} catch (Exception e) {
|
||||
|
||||
@@ -23,7 +23,7 @@ import com.mogo.module.common.entity.MarkerNoveltyInfo;
|
||||
import com.mogo.module.common.entity.MarkerOnlineCar;
|
||||
import com.mogo.module.common.entity.MarkerShowEntity;
|
||||
import com.mogo.module.common.entity.V2XRoadEventEntity;
|
||||
import com.mogo.module.common.enums.SceneTypeEnum;
|
||||
import com.mogo.module.common.enums.EventTypeEnum;
|
||||
import com.mogo.module.common.utils.CarSeries;
|
||||
import com.mogo.module.service.ServiceConst;
|
||||
import com.mogo.module.service.Utils;
|
||||
@@ -139,7 +139,7 @@ public class MoGoV2XMarkerManager implements IMoGoV2XMarkerManager {
|
||||
|
||||
if (exploreWayList != null) {
|
||||
for (MarkerExploreWay markerExploreWay : exploreWayList) {
|
||||
if (SceneTypeEnum.isRoadEvent(markerExploreWay.getPoiType())) {
|
||||
if (EventTypeEnum.isRoadEvent(markerExploreWay.getPoiType())) {
|
||||
MarkerLocation markerLocation = markerExploreWay.getLocation();
|
||||
// 记录道路事件
|
||||
V2XRoadEventEntity v2XRoadEventEntity = new V2XRoadEventEntity();
|
||||
@@ -413,20 +413,20 @@ public class MoGoV2XMarkerManager implements IMoGoV2XMarkerManager {
|
||||
markerShowEntity.setTextContent(noveltyInfo.getLocation().getAddress());
|
||||
|
||||
// 这里只绘制道路事件相关
|
||||
if (SceneTypeEnum.TRAFFIC_CHECK.getPoiType().equals(noveltyInfo.getPoiType())
|
||||
|| SceneTypeEnum.ROAD_CLOSED.getPoiType().equals(noveltyInfo.getPoiType())
|
||||
|| SceneTypeEnum.FOURS_ROAD_WORK.getPoiType().equals(noveltyInfo.getPoiType())
|
||||
|| SceneTypeEnum.FOURS_BLOCK_UP.getPoiType().equals(noveltyInfo.getPoiType())
|
||||
|| SceneTypeEnum.FOURS_PONDING.getPoiType().equals(noveltyInfo.getPoiType())
|
||||
|| SceneTypeEnum.FOURS_PARKING.getPoiType().equals(noveltyInfo.getPoiType())
|
||||
|| SceneTypeEnum.FOURS_ICE.getPoiType().equals(noveltyInfo.getPoiType())
|
||||
|| SceneTypeEnum.FOURS_FOG.getPoiType().equals(noveltyInfo.getPoiType())
|
||||
|| SceneTypeEnum.FOURS_ACCIDENT.getPoiType().equals(noveltyInfo.getPoiType())
|
||||
|| SceneTypeEnum.FOURS_ACCIDENT_01.getPoiType().equals(noveltyInfo.getPoiType())
|
||||
|| SceneTypeEnum.FOURS_ACCIDENT_02.getPoiType().equals(noveltyInfo.getPoiType())
|
||||
|| SceneTypeEnum.FOURS_ACCIDENT_03.getPoiType().equals(noveltyInfo.getPoiType())
|
||||
|| SceneTypeEnum.FOURS_ACCIDENT_04.getPoiType().equals(noveltyInfo.getPoiType())
|
||||
|| SceneTypeEnum.FOURS_ACCIDENT_05.getPoiType().equals(noveltyInfo.getPoiType())) {
|
||||
if (EventTypeEnum.TRAFFIC_CHECK.getPoiType().equals(noveltyInfo.getPoiType())
|
||||
|| EventTypeEnum.ROAD_CLOSED.getPoiType().equals(noveltyInfo.getPoiType())
|
||||
|| EventTypeEnum.FOURS_ROAD_WORK.getPoiType().equals(noveltyInfo.getPoiType())
|
||||
|| EventTypeEnum.FOURS_BLOCK_UP.getPoiType().equals(noveltyInfo.getPoiType())
|
||||
|| EventTypeEnum.FOURS_PONDING.getPoiType().equals(noveltyInfo.getPoiType())
|
||||
|| EventTypeEnum.FOURS_PARKING.getPoiType().equals(noveltyInfo.getPoiType())
|
||||
|| EventTypeEnum.FOURS_ICE.getPoiType().equals(noveltyInfo.getPoiType())
|
||||
|| EventTypeEnum.FOURS_FOG.getPoiType().equals(noveltyInfo.getPoiType())
|
||||
|| EventTypeEnum.FOURS_ACCIDENT.getPoiType().equals(noveltyInfo.getPoiType())
|
||||
|| EventTypeEnum.FOURS_ACCIDENT_01.getPoiType().equals(noveltyInfo.getPoiType())
|
||||
|| EventTypeEnum.FOURS_ACCIDENT_02.getPoiType().equals(noveltyInfo.getPoiType())
|
||||
|| EventTypeEnum.FOURS_ACCIDENT_03.getPoiType().equals(noveltyInfo.getPoiType())
|
||||
|| EventTypeEnum.FOURS_ACCIDENT_04.getPoiType().equals(noveltyInfo.getPoiType())
|
||||
|| EventTypeEnum.FOURS_ACCIDENT_05.getPoiType().equals(noveltyInfo.getPoiType())) {
|
||||
drawableMarker(V2XServiceManager.getContext(), markerShowEntity, clickListener);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -6,8 +6,8 @@ import com.alibaba.android.arouter.facade.annotation.Route;
|
||||
import com.mogo.map.MogoLatLng;
|
||||
import com.mogo.map.overlay.IMogoPolyline;
|
||||
import com.mogo.map.overlay.MogoPolylineOptions;
|
||||
import com.mogo.module.common.entity.V2XPoiTypeEnum;
|
||||
import com.mogo.module.common.entity.V2XRoadEventEntity;
|
||||
import com.mogo.module.common.enums.EventTypeEnum;
|
||||
import com.mogo.module.v2x.MoGoV2XServicePaths;
|
||||
import com.mogo.module.v2x.V2XServiceManager;
|
||||
import com.mogo.module.v2x.manager.IMoGoV2XPolylineManager;
|
||||
@@ -44,20 +44,16 @@ public class MoGoV2XPolylineManager implements IMoGoV2XPolylineManager {
|
||||
// 渐变色
|
||||
List<Integer> colors = new ArrayList<>();
|
||||
|
||||
switch (roadEventEntity.getPoiType()) {
|
||||
case V2XPoiTypeEnum.ALERT_TRAFFIC_LIGHT_SUGGEST:
|
||||
case V2XPoiTypeEnum.ALERT_TRAFFIC_LIGHT_WARNING:
|
||||
case V2XPoiTypeEnum.FOURS_BLOCK_UP:
|
||||
case V2XPoiTypeEnum.ALERT_CAR_TROUBLE_WARNING + "":
|
||||
colors.add(0xFFFFA31A);
|
||||
colors.add(0xFFFFA31A);
|
||||
break;
|
||||
default:
|
||||
colors.add(0xFFE32F46);
|
||||
colors.add(0xFFE32F46);
|
||||
break;
|
||||
if (EventTypeEnum.ALERT_TRAFFIC_LIGHT_SUGGEST.getPoiType().equals(roadEventEntity.getPoiType())
|
||||
|| EventTypeEnum.ALERT_TRAFFIC_LIGHT_WARNING.getPoiType().equals(roadEventEntity.getPoiType())
|
||||
|| EventTypeEnum.FOURS_BLOCK_UP.getPoiType().equals(roadEventEntity.getPoiType())
|
||||
|| EventTypeEnum.ALERT_CAR_TROUBLE_WARNING.getPoiType().equals(roadEventEntity.getPoiType())) {
|
||||
colors.add(0xFFFFA31A);
|
||||
colors.add(0xFFFFA31A);
|
||||
} else {
|
||||
colors.add(0xFFE32F46);
|
||||
colors.add(0xFFE32F46);
|
||||
}
|
||||
|
||||
// 线条粗细,渐变,渐变色值
|
||||
options.width(10).useGradient(true).colorValues(colors);
|
||||
|
||||
|
||||
@@ -3,7 +3,6 @@ package com.mogo.module.v2x.marker;
|
||||
import android.content.Context;
|
||||
import android.util.AttributeSet;
|
||||
import android.view.LayoutInflater;
|
||||
import android.widget.ImageView;
|
||||
|
||||
import androidx.annotation.Nullable;
|
||||
|
||||
|
||||