summaryrefslogtreecommitdiff
path: root/include/mbgl/map/map_options.hpp
diff options
context:
space:
mode:
authorSudarsana Babu Nagineni <sudarsana.babu@mapbox.com>2019-03-27 19:17:04 +0200
committerSudarsana Babu Nagineni <sudarsana.babu@mapbox.com>2019-03-28 16:41:15 +0200
commit7af00a404f22742fed4a83e9a36d023d7515025f (patch)
treeac050d12346d81030969f88607dbfd59ca33be11 /include/mbgl/map/map_options.hpp
parentf5064e710884d5b822e59d05e51c127c8b3e852b (diff)
downloadqtlocation-mapboxgl-7af00a404f22742fed4a83e9a36d023d7515025f.tar.gz
[core] Include pixelRatio property in MapOptions
Move pixelRatio property from Map constructor to MapOptions.
Diffstat (limited to 'include/mbgl/map/map_options.hpp')
-rw-r--r--include/mbgl/map/map_options.hpp15
1 files changed, 15 insertions, 0 deletions
diff --git a/include/mbgl/map/map_options.hpp b/include/mbgl/map/map_options.hpp
index 508d569ea5..fcb8c8f32f 100644
--- a/include/mbgl/map/map_options.hpp
+++ b/include/mbgl/map/map_options.hpp
@@ -119,6 +119,21 @@ public:
*/
Size size() const;
+ /**
+ * @brief Sets the custom pixel ratio. By default, it is set to 1.
+ *
+ * @param ratio Pixel ratio value.
+ * @return reference to MapOptions for chaining options together.
+ */
+ MapOptions& withPixelRatio(float ratio);
+
+ /**
+ * @brief Gets the previously set (or default) pixel ratio value.
+ *
+ * @return pixel ratio value.
+ */
+ float pixelRatio() const;
+
private:
class Impl;
std::unique_ptr<Impl> impl_;