This commit is contained in:
wangcongtao
2020-03-09 11:48:39 +08:00
parent 640b519fd5
commit eaa12ba5d2
39 changed files with 1239 additions and 423 deletions

View File

@@ -12,21 +12,42 @@ import android.os.Parcelable;
public class MogoLatLng implements Parcelable {
public final double lat;
@Deprecated
public final double lng;
public final double lon;
public MogoLatLng( double lat, double lng ) {
public MogoLatLng( double lat, double lon ) {
this.lat = lat;
this.lng = lng;
this.lng = lon;
this.lon = lng;
}
public double getLat() {
return lat;
}
/**
* Deprecated, use {@link #getLon()} instead.
*
* @return
*/
@Deprecated
public double getLng() {
return lng;
}
public double getLon() {
return lon;
}
@Override
public String toString() {
return "MogoLatLng{" +
"lat=" + lat +
", lon=" + lon +
'}';
}
@Override
public int describeContents() {
return 0;
@@ -36,14 +57,16 @@ public class MogoLatLng implements Parcelable {
public void writeToParcel( Parcel dest, int flags ) {
dest.writeDouble( this.lat );
dest.writeDouble( this.lng );
dest.writeDouble( this.lon );
}
protected MogoLatLng( Parcel in ) {
this.lat = in.readDouble();
this.lng = in.readDouble();
this.lon = in.readDouble();
}
public static final Parcelable.Creator< MogoLatLng > CREATOR = new Parcelable.Creator< MogoLatLng >() {
public static final Creator< MogoLatLng > CREATOR = new Creator< MogoLatLng >() {
@Override
public MogoLatLng createFromParcel( Parcel source ) {
return new MogoLatLng( source );
@@ -54,12 +77,4 @@ public class MogoLatLng implements Parcelable {
return new MogoLatLng[size];
}
};
@Override
public String toString() {
return "MogoLatLng{" +
"lat=" + lat +
", lng=" + lng +
'}';
}
}