diff options
Diffstat (limited to 'include/mbgl/map')
-rw-r--r-- | include/mbgl/map/map.hpp | 6 | ||||
-rw-r--r-- | include/mbgl/map/map_options.hpp | 16 |
2 files changed, 17 insertions, 5 deletions
diff --git a/include/mbgl/map/map.hpp b/include/mbgl/map/map.hpp index 9134272ea7..822c400ddf 100644 --- a/include/mbgl/map/map.hpp +++ b/include/mbgl/map/map.hpp @@ -34,7 +34,6 @@ class Map : private util::noncopyable { public: explicit Map(RendererFrontend&, MapObserver&, - Size size, float pixelRatio, Scheduler&, const MapOptions&, @@ -91,16 +90,13 @@ public: void setNorthOrientation(NorthOrientation); void setConstrainMode(ConstrainMode); void setViewportMode(ViewportMode); + void setSize(Size); MapOptions getMapOptions() const; //Projection Mode void setProjectionMode(const ProjectionMode&); ProjectionMode getProjectionMode() const; - // Size - void setSize(Size); - Size getSize() const; - // Projection ScreenCoordinate pixelForLatLng(const LatLng&) const; LatLng latLngForPixel(const ScreenCoordinate&) const; diff --git a/include/mbgl/map/map_options.hpp b/include/mbgl/map/map_options.hpp index 8d5c12b96c..508d569ea5 100644 --- a/include/mbgl/map/map_options.hpp +++ b/include/mbgl/map/map_options.hpp @@ -2,6 +2,7 @@ #include <mbgl/map/mode.hpp> #include <mbgl/util/geo.hpp> +#include <mbgl/util/size.hpp> #include <memory> @@ -103,6 +104,21 @@ public: */ NorthOrientation northOrientation() const; + /** + * @brief Sets the size to resize the map object and renderer backend. + * + * @param size_ A size given in logical pixels. + * @return reference to MapOptions for chaining options together. + */ + MapOptions& withSize(Size size_); + + /** + * @brief Gets the previously set size. + * + * @return Size. + */ + Size size() const; + private: class Impl; std::unique_ptr<Impl> impl_; |