[core] Include pixelRatio property in MapOptions
Move pixelRatio property from Map constructor to MapOptions.
This commit is contained in:
@@ -631,8 +631,9 @@ void NodeMap::cancel() {
|
||||
});
|
||||
|
||||
frontend = std::make_unique<mbgl::HeadlessFrontend>(mbgl::Size{ 256, 256 }, pixelRatio, threadpool);
|
||||
map = std::make_unique<mbgl::Map>(*frontend, mapObserver, pixelRatio, threadpool,
|
||||
map = std::make_unique<mbgl::Map>(*frontend, mapObserver, threadpool,
|
||||
mbgl::MapOptions().withSize(frontend->getSize())
|
||||
.withPixelRatio(pixelRatio)
|
||||
.withMapMode(mode)
|
||||
.withCrossSourceCollisions(crossSourceCollisions),
|
||||
mbgl::ResourceOptions().withPlatformContext(reinterpret_cast<void*>(this)));
|
||||
@@ -1214,8 +1215,9 @@ NodeMap::NodeMap(v8::Local<v8::Object> options)
|
||||
}())
|
||||
, mapObserver(NodeMapObserver())
|
||||
, frontend(std::make_unique<mbgl::HeadlessFrontend>(mbgl::Size { 256, 256 }, pixelRatio, threadpool))
|
||||
, map(std::make_unique<mbgl::Map>(*frontend, mapObserver, pixelRatio, threadpool,
|
||||
, map(std::make_unique<mbgl::Map>(*frontend, mapObserver, threadpool,
|
||||
mbgl::MapOptions().withSize(frontend->getSize())
|
||||
.withPixelRatio(pixelRatio)
|
||||
.withMapMode(mode)
|
||||
.withCrossSourceCollisions(crossSourceCollisions),
|
||||
mbgl::ResourceOptions().withPlatformContext(reinterpret_cast<void*>(this))))
|
||||
|
||||
Reference in New Issue
Block a user