[core] Group Map LatLngBounds, min and max zoom methods

Group bounds, minimum and maximum zoom related methods together using
the new BoundOptions.

v2: Document that getBounds() initializes all optional fields.
  - Add test for getBounds() on a map with default values.
This commit is contained in:
Ander Conselvan de Oliveira
2019-03-08 12:43:05 +02:00
parent 11de777628
commit 5733440747
11 changed files with 126 additions and 59 deletions

View File

@@ -765,7 +765,7 @@ void QMapboxGL::setZoom(double zoom_)
*/
double QMapboxGL::minimumZoom() const
{
return d_ptr->mapObj->getMinZoom();
return *d_ptr->mapObj->getBounds().minZoom;
}
/*!
@@ -775,7 +775,7 @@ double QMapboxGL::minimumZoom() const
*/
double QMapboxGL::maximumZoom() const
{
return d_ptr->mapObj->getMaxZoom();
return *d_ptr->mapObj->getBounds().maxZoom;
}
/*!