diff options
author | Juha Alanen <juha.alanen@mapbox.com> | 2019-09-09 15:39:29 +0300 |
---|---|---|
committer | Juha Alanen <juha.alanen@mapbox.com> | 2019-09-10 16:28:47 +0300 |
commit | c90aa3988045eed4b724088a4a4a2df60995f9bc (patch) | |
tree | ac69647b969069363899bcbcdc1bc0925284b8de /include/mbgl/map/map_options.hpp | |
parent | 151ea331f87a8d3655b0b1a36f3e74de4ff708b9 (diff) | |
download | qtlocation-mapboxgl-upstream/jmalanen-camerainit.tar.gz |
[core] Add API to set camera when initializing mapupstream/jmalanen-camerainit
Diffstat (limited to 'include/mbgl/map/map_options.hpp')
-rw-r--r-- | include/mbgl/map/map_options.hpp | 16 |
1 files changed, 16 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_; |