Skip to content

Commit

Permalink
change mapstate to double instead of float (#60)
Browse files Browse the repository at this point in the history
  • Loading branch information
Guardiola31337 authored Jan 29, 2018
1 parent 74c1e85 commit 385df43
Show file tree
Hide file tree
Showing 5 changed files with 31 additions and 31 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,11 @@ class MapClickEvent extends Event implements Parcelable {
@SerializedName("gesture")
private final String gesture;
@SerializedName("lat")
private float latitude;
private double latitude;
@SerializedName("lng")
private float longitude;
private double longitude;
@SerializedName("zoom")
private float zoom;
private double zoom;
@SerializedName("orientation")
private String orientation = null;
@SerializedName("batteryLevel")
Expand Down Expand Up @@ -75,9 +75,9 @@ private MapClickEvent(Parcel in) {
event = in.readString();
created = in.readString();
gesture = in.readString();
latitude = in.readFloat();
longitude = in.readFloat();
zoom = in.readFloat();
latitude = in.readDouble();
longitude = in.readDouble();
zoom = in.readDouble();
orientation = in.readString();
batteryLevel = in.readByte() == 0x00 ? null : in.readInt();
byte pluggedInVal = in.readByte();
Expand All @@ -98,9 +98,9 @@ public void writeToParcel(Parcel dest, int flags) {
dest.writeString(event);
dest.writeString(created);
dest.writeString(gesture);
dest.writeFloat(latitude);
dest.writeFloat(longitude);
dest.writeFloat(zoom);
dest.writeDouble(latitude);
dest.writeDouble(longitude);
dest.writeDouble(zoom);
dest.writeString(orientation);
if (batteryLevel == null) {
dest.writeByte((byte) (0x00));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,11 @@ class MapDragendEvent extends Event implements Parcelable {
@SerializedName("created")
private String created;
@SerializedName("lat")
private float latitude;
private double latitude;
@SerializedName("lng")
private float longitude;
private double longitude;
@SerializedName("zoom")
private float zoom;
private double zoom;
@SerializedName("orientation")
private String orientation = null;
@SerializedName("batteryLevel")
Expand Down Expand Up @@ -71,9 +71,9 @@ void setWifi(boolean wifi) {
private MapDragendEvent(Parcel in) {
event = in.readString();
created = in.readString();
latitude = in.readFloat();
longitude = in.readFloat();
zoom = in.readFloat();
latitude = in.readDouble();
longitude = in.readDouble();
zoom = in.readDouble();
orientation = in.readString();
batteryLevel = in.readByte() == 0x00 ? null : in.readInt();
byte pluggedInVal = in.readByte();
Expand All @@ -93,9 +93,9 @@ public int describeContents() {
public void writeToParcel(Parcel dest, int flags) {
dest.writeString(event);
dest.writeString(created);
dest.writeFloat(latitude);
dest.writeFloat(longitude);
dest.writeFloat(zoom);
dest.writeDouble(latitude);
dest.writeDouble(longitude);
dest.writeDouble(zoom);
dest.writeString(orientation);
if (batteryLevel == null) {
dest.writeByte((byte) (0x00));
Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
package com.mapbox.android.telemetry;

public class MapState {
private float latitude;
private float longitude;
private float zoom;
private double latitude;
private double longitude;
private double zoom;
private String gesture;

public MapState(float latitude, float longitude, float zoom) {
public MapState(double latitude, double longitude, double zoom) {
this.latitude = latitude;
this.longitude = longitude;
this.zoom = zoom;
Expand All @@ -20,15 +20,15 @@ String getGesture() {
return gesture;
}

float getLatitude() {
double getLatitude() {
return latitude;
}

float getLongitude() {
double getLongitude() {
return longitude;
}

float getZoom() {
double getZoom() {
return zoom;
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -142,9 +142,9 @@ private void initializeMapboxTelemetry() {
}

private MapState obtainAValidMapState() {
float aLatitude = 40.416775f;
float aLongitude = -3.703790f;
float aZoom = 1.5f;
double aLatitude = 40.416775d;
double aLongitude = -3.703790d;
double aZoom = 1.5d;
return new MapState(aLatitude, aLongitude, aZoom);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -134,9 +134,9 @@ private void initializeMapboxTelemetry(Context context) {
}

private MapState obtainDefaultMapState() {
float aLatitude = 40.416775f;
float aLongitude = -3.703790f;
float aZoom = 1.5f;
double aLatitude = 40.416775d;
double aLongitude = -3.703790d;
double aZoom = 1.5d;
return new MapState(aLatitude, aLongitude, aZoom);
}

Expand Down

0 comments on commit 385df43

Please sign in to comment.