[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

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