diff options
author | Sudarsana Babu Nagineni <sudarsana.babu@mapbox.com> | 2019-03-27 19:17:04 +0200 |
---|---|---|
committer | Sudarsana Babu Nagineni <sudarsana.babu@mapbox.com> | 2019-03-28 16:41:15 +0200 |
commit | 7af00a404f22742fed4a83e9a36d023d7515025f (patch) | |
tree | ac050d12346d81030969f88607dbfd59ca33be11 /src/mbgl/map/map.cpp | |
parent | f5064e710884d5b822e59d05e51c127c8b3e852b (diff) | |
download | qtlocation-mapboxgl-7af00a404f22742fed4a83e9a36d023d7515025f.tar.gz |
[core] Include pixelRatio property in MapOptions
Move pixelRatio property from Map constructor to MapOptions.
Diffstat (limited to 'src/mbgl/map/map.cpp')
-rw-r--r-- | src/mbgl/map/map.cpp | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/src/mbgl/map/map.cpp b/src/mbgl/map/map.cpp index cfec9952b5..b22a9ee2f2 100644 --- a/src/mbgl/map/map.cpp +++ b/src/mbgl/map/map.cpp @@ -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 |