summaryrefslogtreecommitdiff
path: root/include
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
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')
-rw-r--r--include/mbgl/map/map.hpp1
-rw-r--r--include/mbgl/map/map_options.hpp15
2 files changed, 15 insertions, 1 deletions
diff --git a/include/mbgl/map/map.hpp b/include/mbgl/map/map.hpp
index 822c400ddf..2fdd72dcb8 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&,
- float pixelRatio,
Scheduler&,
const MapOptions&,
const ResourceOptions&);
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_;