From cb9b397985b98a75aa9fa5e6f2b135c205f7cafd Mon Sep 17 00:00:00 2001 From: Bruno de Oliveira Abinader Date: Tue, 17 Nov 2015 17:02:12 +0200 Subject: [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. --- src/mbgl/annotation/annotation_manager.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src') 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()) { -- cgit v1.2.1