From 466ed55200ffb3a9bc5954b59d87c7dd5630e5ac Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Minh=20Nguye=CC=82=CC=83n?= Date: Thu, 21 Apr 2016 17:23:09 -0700 Subject: [core, ios, osx] cameraThatFitsCoordinateBounds Added an API to get a camera that you can pass into -[MGLMapView setCamera:] that fits the given coordinate bounds, by analogy with -[MKMapView regionThatFits:] or -[MKMapView mapRectThatFits:edgePadding:]. Added mbgl::Map::getCameraOptions() for getting the current camera options more conveniently. --- include/mbgl/map/map.hpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'include/mbgl/map') diff --git a/include/mbgl/map/map.hpp b/include/mbgl/map/map.hpp index e33b8e49f3..0b1720e65b 100644 --- a/include/mbgl/map/map.hpp +++ b/include/mbgl/map/map.hpp @@ -69,6 +69,7 @@ public: bool isPanning() const; // Camera + CameraOptions getCameraOptions(optional) const; void jumpTo(const CameraOptions&); void easeTo(const CameraOptions&, const AnimationOptions&); void flyTo(const CameraOptions&, const AnimationOptions&); @@ -90,8 +91,8 @@ public: double getZoom() const; void setLatLngZoom(const LatLng&, double zoom, const Duration& = Duration::zero()); void setLatLngZoom(const LatLng&, double zoom, optional, const Duration& = Duration::zero()); - CameraOptions cameraForLatLngBounds(const LatLngBounds&, optional); - CameraOptions cameraForLatLngs(const std::vector&, optional); + CameraOptions cameraForLatLngBounds(const LatLngBounds&, optional) const; + CameraOptions cameraForLatLngs(const std::vector&, optional) const; void resetZoom(); void setMinZoom(const double minZoom); double getMinZoom() const; -- cgit v1.2.1