diff options
Diffstat (limited to 'src/mbgl/map/map_options.cpp')
-rw-r--r-- | src/mbgl/map/map_options.cpp | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/src/mbgl/map/map_options.cpp b/src/mbgl/map/map_options.cpp index 98cabb2550..4cebb6adab 100644 --- a/src/mbgl/map/map_options.cpp +++ b/src/mbgl/map/map_options.cpp @@ -9,7 +9,8 @@ public: ViewportMode viewportMode = ViewportMode::Default; NorthOrientation orientation = NorthOrientation::Upwards; bool crossSourceCollisions = true; - Size size; + Size size = { 64, 64 }; + float pixelRatio = 1.0; }; // These requires the complete type of Impl. @@ -71,4 +72,13 @@ Size MapOptions::size() const { return impl_->size; } +MapOptions& MapOptions::withPixelRatio(float ratio) { + impl_->pixelRatio = ratio; + return *this; +} + +float MapOptions::pixelRatio() const { + return impl_->pixelRatio; +} + } // namespace mbgl |