diff options
author | Osana Babayan <32496536+osana@users.noreply.github.com> | 2018-02-16 09:36:56 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-02-16 09:36:56 -0500 |
commit | 341eb7645f98fb1835607dbe68b2bd74b0f6ec8a (patch) | |
tree | 8bf83d492074096f6edb5da7c9da998289e310a3 /platform/android/MapboxGLAndroidSDK | |
parent | 63eb511d8365c5a22cde65a9118559dc7561f1de (diff) | |
download | qtlocation-mapboxgl-341eb7645f98fb1835607dbe68b2bd74b0f6ec8a.tar.gz |
[android] incorrect LatLngBounds for the VisibleRegion for rotated map
smallest bounding box for 4 points cannot
be created using LatLngBounds.fromLatLngs()
as the order matters in that method and that does not work for rotated map
Diffstat (limited to 'platform/android/MapboxGLAndroidSDK')
-rw-r--r-- | platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/maps/Projection.java | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/maps/Projection.java b/platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/maps/Projection.java index 16c73b1ca5..ae559189ad 100644 --- a/platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/maps/Projection.java +++ b/platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/maps/Projection.java @@ -104,11 +104,12 @@ public class Projection { LatLng bottomLeft = fromScreenLocation(new PointF(left, bottom)); return new VisibleRegion(topLeft, topRight, bottomLeft, bottomRight, - LatLngBounds.from( - topRight.getLatitude(), - topRight.getLongitude(), - bottomLeft.getLatitude(), - bottomLeft.getLongitude()) + new LatLngBounds.Builder() + .include(topRight) + .include(bottomLeft) + .include(bottomRight) + .include(topLeft) + .build() ); } |