[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

@@ -29,12 +29,12 @@ using namespace style;
Map::Map(RendererFrontend& frontend,
MapObserver& observer,
const float pixelRatio,
Scheduler& scheduler,
const MapOptions& mapOptions,
const ResourceOptions& resourceOptions)
: impl(std::make_unique<Impl>(frontend, observer, scheduler, pixelRatio,
FileSource::getSharedFileSource(resourceOptions), mapOptions)) {}
: impl(std::make_unique<Impl>(frontend, observer, scheduler,
FileSource::getSharedFileSource(resourceOptions),
mapOptions)) {}
Map::Map(std::unique_ptr<Impl> impl_) : impl(std::move(impl_)) {}
@@ -336,7 +336,8 @@ MapOptions Map::getMapOptions() const {
.withViewportMode(impl->transform.getViewportMode())
.withCrossSourceCollisions(impl->crossSourceCollisions)
.withNorthOrientation(impl->transform.getNorthOrientation())
.withSize(impl->transform.getState().getSize()));
.withSize(impl->transform.getState().getSize())
.withPixelRatio(impl->pixelRatio));
}
#pragma mark - Projection mode