diff options
author | Bruno de Oliveira Abinader <bruno@mapbox.com> | 2015-11-17 17:02:12 +0200 |
---|---|---|
committer | Bruno de Oliveira Abinader <bruno@mapbox.com> | 2015-11-18 09:37:27 +0200 |
commit | cb9b397985b98a75aa9fa5e6f2b135c205f7cafd (patch) | |
tree | 2cd3a2f2ba4e5c8972663313d21a5c81078311d4 /src | |
parent | 711d41f91b41f471c26ff9de6274ab66e0a83176 (diff) | |
download | qtlocation-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 'src')
-rw-r--r-- | src/mbgl/annotation/annotation_manager.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/mbgl/annotation/annotation_manager.cpp b/src/mbgl/annotation/annotation_manager.cpp index 43dfb8361b..5b1138a14a 100644 --- a/src/mbgl/annotation/annotation_manager.cpp +++ b/src/mbgl/annotation/annotation_manager.cpp @@ -68,7 +68,7 @@ AnnotationIDs AnnotationManager::getPointAnnotationsInBounds(const LatLngBounds& } LatLngBounds AnnotationManager::getBoundsForAnnotations(const AnnotationIDs& ids) const { - LatLngBounds result; + LatLngBounds result = LatLngBounds::getExtendable(); for (const auto& id : ids) { if (pointAnnotations.find(id) != pointAnnotations.end()) { |