add field in CloudlocatioInfo class and update all sdk version

This commit is contained in:
zhongchao
2021-02-23 17:09:11 +08:00
parent 219c258b21
commit f7f7e751bd
3 changed files with 36 additions and 10 deletions

View File

@@ -49,6 +49,12 @@ public class CloudLocationInfo implements Parcelable {
*/
private double speed;
/**
* 车辆类型
* 0:普通车辆、家用车
*/
private int vehicleType = 0;
public CloudLocationInfo() {
}
@@ -60,6 +66,7 @@ public class CloudLocationInfo implements Parcelable {
this.satelliteTime = System.currentTimeMillis();
this.alt = info.alt;
this.speed = info.speed;
this.vehicleType = info.vehicleType;
}
public void convertCoor2GCJ02(){
@@ -78,6 +85,7 @@ public class CloudLocationInfo implements Parcelable {
satelliteTime = in.readLong();
alt = in.readDouble();
speed = in.readDouble();
vehicleType = in.readInt();
}
@Override
@@ -89,6 +97,7 @@ public class CloudLocationInfo implements Parcelable {
dest.writeLong( satelliteTime );
dest.writeDouble( alt );
dest.writeDouble( speed );
dest.writeInt( vehicleType );
}
@Override
@@ -164,6 +173,14 @@ public class CloudLocationInfo implements Parcelable {
this.speed = speed;
}
public int getVehicleType() {
return vehicleType;
}
public void setVehicleType(int vehicleType) {
this.vehicleType = vehicleType;
}
@Override
public String toString() {
return "CloudLocationInfo{" +
@@ -174,12 +191,13 @@ public class CloudLocationInfo implements Parcelable {
", satelliteTime=" + satelliteTime +
", alt=" + alt +
", speed=" + speed +
", vehicleType=" + vehicleType +
'}';
}
public String print() {
return "CloudLocation{ lon: " + lon + " lat: " + lat + " heading: " + heading + " speed: "
+ speed + "}";
+ speed + " vehicleType: " + vehicleType + "}";
}
@Override