diff options
Diffstat (limited to 'platform/node/src/node_map.cpp')
-rw-r--r-- | platform/node/src/node_map.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/platform/node/src/node_map.cpp b/platform/node/src/node_map.cpp index bcd5fb1c16..291dea6bb7 100644 --- a/platform/node/src/node_map.cpp +++ b/platform/node/src/node_map.cpp @@ -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)))) |