Skip to content
This repository has been archived by the owner on Aug 8, 2023. It is now read-only.

Commit

Permalink
[android] #4444 - Wrapping all LatLng from nativeLatLngForPixel() to …
Browse files Browse the repository at this point in the history
…solve problem and mirror Android Google Maps API
  • Loading branch information
bleege committed Mar 24, 2016
1 parent 38e6d51 commit 6a29e7e
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@ public int hashCode() {

@Override
public String toString() {
return "LatLng [longitude=" + longitude + ", latitude=" + latitude + ", altitude=" + altitude + "]";
return "LatLng [latitude=" + latitude + ", longitude=" + longitude + ", altitude=" + altitude + "]";
}

@Override
Expand Down
2 changes: 1 addition & 1 deletion platform/android/src/jni.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1176,7 +1176,7 @@ jni::jobject* nativeLatLngForPixel(JNIEnv *env, jni::jobject* obj, jlong nativeM
jfloat x = jni::GetField<jfloat>(*env, pixel, *pointFXId);
jfloat y = jni::GetField<jfloat>(*env, pixel, *pointFYId);

mbgl::LatLng latLng = nativeMapView->getMap().latLngForPixel(mbgl::ScreenCoordinate(x, y));
mbgl::LatLng latLng = nativeMapView->getMap().latLngForPixel(mbgl::ScreenCoordinate(x, y)).wrapped();
return &jni::NewObject(*env, *latLngClass, *latLngConstructorId, latLng.latitude, latLng.longitude);
}

Expand Down

0 comments on commit 6a29e7e

Please sign in to comment.