迁移 MogoLocation 位置,准备修复RTK位置回调未更新问题

Signed-off-by: 董宏宇 <martindhy@gmail.com>
This commit is contained in:
董宏宇
2021-11-01 21:08:13 +08:00
parent d504ca1642
commit 6eee4b7678
59 changed files with 81 additions and 68 deletions

View File

@@ -1,5 +1,7 @@
package com.mogo.map.location;
import com.mogo.eagle.core.data.map.MogoLocation;
/**
* @author congtaowang
* @since 2019-12-19

View File

@@ -1,5 +1,7 @@
package com.mogo.map.location;
import com.mogo.eagle.core.data.map.MogoLocation;
/**
* @author congtaowang
* @since 2019-12-19

View File

@@ -1,374 +0,0 @@
package com.mogo.map.location;
import android.os.Parcel;
import android.os.Parcelable;
public class MogoLocation implements Cloneable, Parcelable {
private int locType = 0;
private double latitude = 0;
private double longitude = 0;
private double altitude = 0;
private long time = 0;
private float bearing = 0;
private float accuracy = 0;
private float speed = 0;
private String cityName = "";
private String cityCode = "";
private String provider = "";
private String address = "";
private String district = "";
private String province = "";
private String adCode = "";
private String locationDetail = "";
private String poiName = "";
private String aoiName = "";
private int errCode = 0;
private String errInfo = "";
private String street = "";
private String streetNum = "";
private String description = "";
private String buildingId = "";
private String floor = "";
private int gpsAccuracyStatus = 0;
private int satellite = 0;
public float getBearing() {
return bearing;
}
public void setBearing( float bearing ) {
this.bearing = bearing;
}
public float getAccuracy() {
return accuracy;
}
public void setAccuracy( float accuracy ) {
this.accuracy = accuracy;
}
public String getProvider() {
return provider;
}
public void setProvider( String provider ) {
this.provider = provider;
}
public float getSpeed() {
return speed;
}
public void setSpeed( float speed ) {
this.speed = speed;
}
public String getLocationDetail() {
return locationDetail;
}
public void setLocationDetail( String locationDetail ) {
this.locationDetail = locationDetail;
}
public String getPoiName() {
return poiName;
}
public void setPoiName( String poiName ) {
this.poiName = poiName;
}
public String getAoiName() {
return aoiName;
}
public void setAoiName( String aoiName ) {
this.aoiName = aoiName;
}
public int getErrCode() {
return errCode;
}
public void setErrCode( int errCode ) {
this.errCode = errCode;
}
public String getErrInfo() {
return errInfo;
}
public void setErrInfo( String errInfo ) {
this.errInfo = errInfo;
}
public String getStreet() {
return street;
}
public void setStreet(String street) {
this.street = street;
}
public String getStreetNum() {
return streetNum;
}
public void setStreetNum( String streetNum ) {
this.streetNum = streetNum;
}
public String getDescription() {
return description;
}
public void setDescription( String description ) {
this.description = description;
}
public String getBuildingId() {
return buildingId;
}
public void setBuildingId( String buildingId ) {
this.buildingId = buildingId;
}
public String getFloor() {
return floor;
}
public void setFloor( String floor ) {
this.floor = floor;
}
public int getGpsAccuracyStatus() {
return gpsAccuracyStatus;
}
public void setGpsAccuracyStatus( int gpsAccuracyStatus ) {
this.gpsAccuracyStatus = gpsAccuracyStatus;
}
public int getSatellite() {
return satellite;
}
public void setSatellite( int satellite ) {
this.satellite = satellite;
}
public MogoLocation() {
}
@Override
public String toString() {
return "MogoLocation{" +
"locType=" + locType +
", latitude=" + latitude +
", longitude=" + longitude +
", altitude=" + altitude +
", time=" + time +
", bearing=" + bearing +
", accuracy=" + accuracy +
", speed=" + speed +
", cityName='" + cityName + '\'' +
", cityCode='" + cityCode + '\'' +
", provider='" + provider + '\'' +
", address='" + address + '\'' +
", district='" + district + '\'' +
", province='" + province + '\'' +
", adCode='" + adCode + '\'' +
", locationDetail='" + locationDetail + '\'' +
", poiName='" + poiName + '\'' +
", aoiName='" + aoiName + '\'' +
", errCode=" + errCode +
", errInfo='" + errInfo + '\'' +
", street='" + street + '\'' +
", streetNum='" + streetNum + '\'' +
", description='" + description + '\'' +
", buildingId='" + buildingId + '\'' +
", floor='" + floor + '\'' +
", gpsAccuracyStatus=" + gpsAccuracyStatus +
", satellite=" + satellite +
'}';
}
public double getAltitude() {
return altitude;
}
public void setAltitude( double altitude ) {
this.altitude = altitude;
}
public String getAddress() {
return address;
}
public void setAddress( String address ) {
this.address = address;
}
public String getDistrict() {
return district;
}
public void setDistrict( String district ) {
this.district = district;
}
public String getProvince() {
return province;
}
public void setProvince( String province ) {
this.province = province;
}
public String getAdCode() {
return adCode;
}
public void setAdCode( String adCode ) {
this.adCode = adCode;
}
public int getLocType() {
return locType;
}
public void setLocType( int locType ) {
this.locType = locType;
}
public double getLatitude() {
return latitude;
}
public void setLatitude( double latitude ) {
this.latitude = latitude;
}
public double getLongitude() {
return longitude;
}
public void setLongitude( double longitude ) {
this.longitude = longitude;
}
public long getTime() {
return time;
}
public void setTime( long time ) {
this.time = time;
}
public String getCityCode() {
return cityCode;
}
public void setCityCode( String cityCode ) {
this.cityCode = cityCode;
}
public String getCityName() {
return cityName;
}
public void setCityName( String cityName ) {
this.cityName = cityName;
}
@Override
public MogoLocation clone() {
try {
return ( MogoLocation ) super.clone();
} catch ( CloneNotSupportedException e ) {
e.printStackTrace();
}
return this;
}
@Override
public int describeContents() {
return 0;
}
@Override
public void writeToParcel( Parcel dest, int flags ) {
dest.writeInt( this.locType );
dest.writeDouble( this.latitude );
dest.writeDouble( this.longitude );
dest.writeDouble( this.altitude );
dest.writeLong( this.time );
dest.writeFloat( this.bearing );
dest.writeFloat( this.accuracy );
dest.writeFloat( this.speed );
dest.writeString( this.cityName );
dest.writeString( this.cityCode );
dest.writeString( this.provider );
dest.writeString( this.address );
dest.writeString( this.district );
dest.writeString( this.province );
dest.writeString( this.adCode );
dest.writeString( this.locationDetail );
dest.writeString( this.poiName );
dest.writeString( this.aoiName );
dest.writeInt( this.errCode );
dest.writeString( this.errInfo );
dest.writeString( this.street );
dest.writeString( this.streetNum );
dest.writeString( this.description );
dest.writeString( this.buildingId );
dest.writeString( this.floor );
dest.writeInt( this.gpsAccuracyStatus );
dest.writeInt( this.satellite );
}
protected MogoLocation( Parcel in ) {
this.locType = in.readInt();
this.latitude = in.readDouble();
this.longitude = in.readDouble();
this.altitude = in.readDouble();
this.time = in.readLong();
this.bearing = in.readFloat();
this.accuracy = in.readFloat();
this.speed = in.readFloat();
this.cityName = in.readString();
this.cityCode = in.readString();
this.provider = in.readString();
this.address = in.readString();
this.district = in.readString();
this.province = in.readString();
this.adCode = in.readString();
this.locationDetail = in.readString();
this.poiName = in.readString();
this.aoiName = in.readString();
this.errCode = in.readInt();
this.errInfo = in.readString();
this.street = in.readString();
this.streetNum = in.readString();
this.description = in.readString();
this.buildingId = in.readString();
this.floor = in.readString();
this.gpsAccuracyStatus = in.readInt();
this.satellite = in.readInt();
}
public static final Parcelable.Creator< MogoLocation > CREATOR = new Parcelable.Creator< MogoLocation >() {
@Override
public MogoLocation createFromParcel( Parcel source ) {
return new MogoLocation( source );
}
@Override
public MogoLocation[] newArray( int size ) {
return new MogoLocation[size];
}
};
}

View File

@@ -7,7 +7,7 @@ import android.view.View;
import androidx.annotation.RawRes;
import com.mogo.eagle.core.data.map.MogoLatLng;
import com.mogo.map.location.MogoLocation;
import com.mogo.eagle.core.data.map.MogoLocation;
import java.util.ArrayList;
import java.util.Observable;

View File

@@ -5,7 +5,7 @@ import android.graphics.Color;
import androidx.annotation.ColorInt;
import com.mogo.eagle.core.data.map.MogoLatLng;
import com.mogo.map.location.MogoLocation;
import com.mogo.eagle.core.data.map.MogoLocation;
import java.util.ArrayList;
import java.util.Arrays;