diff options
Diffstat (limited to 'include')
-rw-r--r-- | include/mbgl/map/map_options.hpp | 16 | ||||
-rw-r--r-- | include/mbgl/style/style.hpp | 1 |
2 files changed, 17 insertions, 0 deletions
diff --git a/include/mbgl/map/map_options.hpp b/include/mbgl/map/map_options.hpp index fcb8c8f32f..52c06a600f 100644 --- a/include/mbgl/map/map_options.hpp +++ b/include/mbgl/map/map_options.hpp @@ -3,6 +3,7 @@ #include <mbgl/map/mode.hpp> #include <mbgl/util/geo.hpp> #include <mbgl/util/size.hpp> +#include <mbgl/map/camera.hpp> #include <memory> @@ -134,6 +135,21 @@ public: */ float pixelRatio() const; + /** + * @brief Sets the camera options. + * + * @param camera_ Camera options. + * @return reference to MapOptions for chaining options together. + */ + MapOptions& withCamera(CameraOptions camera_); + + /** + * @brief Gets the previously set camera options. + * + * @return Camera options. + */ + const CameraOptions& camera() const; + private: class Impl; std::unique_ptr<Impl> impl_; diff --git a/include/mbgl/style/style.hpp b/include/mbgl/style/style.hpp index 4a6a542b88..da8ddd53e7 100644 --- a/include/mbgl/style/style.hpp +++ b/include/mbgl/style/style.hpp @@ -22,6 +22,7 @@ class Layer; class Style { public: Style(FileSource&, float pixelRatio); + Style(FileSource&, float pixelRatio, CameraOptions camera); ~Style(); void loadJSON(const std::string&); |