[core] Include pixelRatio property in MapOptions

Move pixelRatio property from Map constructor to MapOptions.
This commit is contained in:
Sudarsana Babu Nagineni
2019-03-27 19:17:04 +02:00
parent f5064e7108
commit 7af00a404f
28 changed files with 107 additions and 74 deletions

View File

@@ -34,7 +34,6 @@ class Map : private util::noncopyable {
public:
explicit Map(RendererFrontend&,
MapObserver&,
float pixelRatio,
Scheduler&,
const MapOptions&,
const ResourceOptions&);

View File

@@ -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_;