summaryrefslogtreecommitdiff
path: root/platform/macos/src/MGLMapView.mm
diff options
context:
space:
mode:
Diffstat (limited to 'platform/macos/src/MGLMapView.mm')
-rw-r--r--platform/macos/src/MGLMapView.mm10
1 files changed, 5 insertions, 5 deletions
diff --git a/platform/macos/src/MGLMapView.mm b/platform/macos/src/MGLMapView.mm
index 054b91d44c..320abf740c 100644
--- a/platform/macos/src/MGLMapView.mm
+++ b/platform/macos/src/MGLMapView.mm
@@ -328,7 +328,7 @@ public:
mbgl::CameraOptions options;
options.center = mbgl::LatLng(0, 0);
options.padding = MGLEdgeInsetsFromNSEdgeInsets(self.contentInsets);
- options.zoom = _mbglMap->getMinZoom();
+ options.zoom = *_mbglMap->getBounds().minZoom;
_mbglMap->jumpTo(options);
_pendingLatitude = NAN;
_pendingLongitude = NAN;
@@ -1094,21 +1094,21 @@ public:
- (void)setMinimumZoomLevel:(double)minimumZoomLevel
{
MGLLogDebug(@"Setting minimumZoomLevel: %f", minimumZoomLevel);
- _mbglMap->setMinZoom(minimumZoomLevel);
+ _mbglMap->setBounds(mbgl::BoundOptions().withMinZoom(minimumZoomLevel));
}
- (void)setMaximumZoomLevel:(double)maximumZoomLevel
{
MGLLogDebug(@"Setting maximumZoomLevel: %f", maximumZoomLevel);
- _mbglMap->setMaxZoom(maximumZoomLevel);
+ _mbglMap->setBounds(mbgl::BoundOptions().withMaxZoom(maximumZoomLevel));
}
- (double)maximumZoomLevel {
- return _mbglMap->getMaxZoom();
+ return *_mbglMap->getBounds().maxZoom;
}
- (double)minimumZoomLevel {
- return _mbglMap->getMinZoom();
+ return *_mbglMap->getBounds().minZoom;
}
/// Respond to a click on the zoom control.