[core] Include pixelRatio property in MapOptions
Move pixelRatio property from Map constructor to MapOptions.
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user