[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.
This commit is contained in:
Bruno de Oliveira Abinader
2015-11-17 17:02:12 +02:00
parent 711d41f91b
commit cb9b397985
6 changed files with 20 additions and 12 deletions

View File

@@ -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()) {