安全区域绘制(自车到停止线距离)
This commit is contained in:
@@ -58,40 +58,11 @@ public class V2XWarningEntity implements Serializable {
|
||||
//自组字段
|
||||
//tts播报
|
||||
private String tts;
|
||||
//打点位置
|
||||
private MarkerLocation location;
|
||||
//自车位置
|
||||
private MogoLatLng carLocation;
|
||||
|
||||
public void setLocation(MarkerLocation location) {
|
||||
this.location = location;
|
||||
}
|
||||
|
||||
public MarkerLocation getLocation() {
|
||||
if (location == null) {
|
||||
MarkerLocation location = new MarkerLocation();
|
||||
location.setLat(getLat());
|
||||
location.setLon(getLon());
|
||||
setLocation(location);
|
||||
}
|
||||
return location;
|
||||
}
|
||||
|
||||
|
||||
public void setTipContent(int type) {
|
||||
switch (type) {
|
||||
case 0:
|
||||
this.warningContent = "行人碰撞预警";
|
||||
break;
|
||||
case 1:
|
||||
case 3:
|
||||
case 4:
|
||||
this.warningContent = "前车碰撞预警";
|
||||
break;
|
||||
case 2:
|
||||
this.warningContent = "摩托车碰撞预警";
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
public MogoLatLng getCarLocation() {
|
||||
return carLocation;
|
||||
}
|
||||
|
||||
public void setTts(int type) {
|
||||
@@ -167,6 +138,10 @@ public class V2XWarningEntity implements Serializable {
|
||||
this.stopLines = stopLines;
|
||||
}
|
||||
|
||||
public void setCarLocation(MogoLatLng carLocation) {
|
||||
this.carLocation = carLocation;
|
||||
}
|
||||
|
||||
public int getType() {
|
||||
return type;
|
||||
}
|
||||
@@ -212,9 +187,6 @@ public class V2XWarningEntity implements Serializable {
|
||||
}
|
||||
|
||||
public String getWarningContent() {
|
||||
if (this.warningContent == null) {
|
||||
setTipContent(type);
|
||||
}
|
||||
return warningContent;
|
||||
}
|
||||
|
||||
@@ -270,7 +242,7 @@ public class V2XWarningEntity implements Serializable {
|
||||
", systemTime=" + systemTime +
|
||||
", satelliteTime=" + satelliteTime +
|
||||
", tts='" + tts + '\'' +
|
||||
", location=" + location +
|
||||
", carLocation=" + carLocation +
|
||||
'}';
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user