summaryrefslogtreecommitdiff
path: root/platform/android
diff options
context:
space:
mode:
authorBruno de Oliveira Abinader <bruno@mapbox.com>2015-11-17 17:02:12 +0200
committerBruno de Oliveira Abinader <bruno@mapbox.com>2015-11-18 09:37:27 +0200
commitcb9b397985b98a75aa9fa5e6f2b135c205f7cafd (patch)
tree2cd3a2f2ba4e5c8972663313d21a5c81078311d4 /platform/android
parent711d41f91b41f471c26ff9de6274ab66e0a83176 (diff)
downloadqtlocation-mapboxgl-cb9b397985b98a75aa9fa5e6f2b135c205f7cafd.tar.gz
[core] Fix LatLngBounds default coordinates
LatLngBounds southwest and northeast coordinate points were inverted, so they could be extended via LatLngBounds::extend(). However, this looks confusing and error-prone. A static LatLngBounds::getExtendable() is added to address cases when we want to extend LatLngBounds.
Diffstat (limited to 'platform/android')
-rw-r--r--platform/android/jni.cpp4
1 files changed, 1 insertions, 3 deletions
diff --git a/platform/android/jni.cpp b/platform/android/jni.cpp
index 1e4c4c05f3..9b80013da2 100644
--- a/platform/android/jni.cpp
+++ b/platform/android/jni.cpp
@@ -1186,9 +1186,7 @@ jlongArray JNICALL nativeGetAnnotationsInBounds(JNIEnv *env, jobject obj, jlong
return nullptr;
}
- mbgl::LatLngBounds bounds;
- bounds.sw = { swLat, swLon };
- bounds.ne = { neLat, neLon };
+ mbgl::LatLngBounds bounds({ swLat, swLon }, { neLat, neLon });
// assume only points for now
std::vector<uint32_t> annotations = nativeMapView->getMap().getPointAnnotationsInBounds(bounds);