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 /platform/macos | |
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 'platform/macos')
-rw-r--r-- | platform/macos/src/MGLMapView.mm | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/platform/macos/src/MGLMapView.mm b/platform/macos/src/MGLMapView.mm index fdcc2090b1..091ba462cc 100644 --- a/platform/macos/src/MGLMapView.mm +++ b/platform/macos/src/MGLMapView.mm @@ -293,6 +293,7 @@ public: mbgl::MapOptions mapOptions; mapOptions.withMapMode(mbgl::MapMode::Continuous) .withSize(self.size) + .withPixelRatio(config.scaleFactor) .withConstrainMode(mbgl::ConstrainMode::None) .withViewportMode(mbgl::ViewportMode::Default) .withCrossSourceCollisions(enableCrossSourceCollisions); @@ -301,7 +302,7 @@ public: resourceOptions.withCachePath([[MGLOfflineStorage sharedOfflineStorage] mbglCachePath]) .withAssetPath([NSBundle mainBundle].resourceURL.path.UTF8String); - _mbglMap = new mbgl::Map(*_rendererFrontend, *_mbglView, config.scaleFactor, *_mbglThreadPool, mapOptions, resourceOptions); + _mbglMap = new mbgl::Map(*_rendererFrontend, *_mbglView, *_mbglThreadPool, mapOptions, resourceOptions); // Install the OpenGL layer. Interface Builder’s synchronous drawing means // we can’t display a map, so don’t even bother to have a map layer. |