summaryrefslogtreecommitdiff
path: root/platform/node/src/node_map.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'platform/node/src/node_map.cpp')
-rw-r--r--platform/node/src/node_map.cpp18
1 files changed, 10 insertions, 8 deletions
diff --git a/platform/node/src/node_map.cpp b/platform/node/src/node_map.cpp
index 6dccdf5292..0d1cd953a3 100644
--- a/platform/node/src/node_map.cpp
+++ b/platform/node/src/node_map.cpp
@@ -620,11 +620,13 @@ void NodeMap::cancel() {
});
frontend = std::make_unique<mbgl::HeadlessFrontend>(mbgl::Size{ 256, 256 }, pixelRatio, *this, threadpool);
+ mbgl::MapOptions options;
+ options.withMapMode(mode)
+ .withConstrainMode(mbgl::ConstrainMode::HeightOnly)
+ .withViewportMode(mbgl::ViewportMode::Default)
+ .withCrossSourceCollisions(crossSourceCollisions);
map = std::make_unique<mbgl::Map>(*frontend, mapObserver, frontend->getSize(), pixelRatio,
- *this, threadpool, mode,
- mbgl::ConstrainMode::HeightOnly,
- mbgl::ViewportMode::Default,
- crossSourceCollisions);
+ *this, threadpool, options);
// FIXME: Reload the style after recreating the map. We need to find
// a better way of canceling an ongoing rendering on the core level
@@ -1206,10 +1208,10 @@ NodeMap::NodeMap(v8::Local<v8::Object> options)
pixelRatio,
*this,
threadpool,
- mode,
- mbgl::ConstrainMode::HeightOnly,
- mbgl::ViewportMode::Default,
- crossSourceCollisions)),
+ mbgl::MapOptions().withMapMode(mode)
+ .withConstrainMode(mbgl::ConstrainMode::HeightOnly)
+ .withViewportMode(mbgl::ViewportMode::Default)
+ .withCrossSourceCollisions(crossSourceCollisions))),
async(new uv_async_t) {
async->data = this;