summaryrefslogtreecommitdiff
path: root/platform/node
diff options
context:
space:
mode:
authorSudarsana Babu Nagineni <sudarsana.babu@mapbox.com>2019-03-26 00:00:37 +0200
committerSudarsana Babu Nagineni <sudarsana.babu@mapbox.com>2019-03-28 16:41:15 +0200
commit1cc1d4ea08ae02c3cc9b4dd1474845456c17d1bc (patch)
treed7de92e01ef1b1bf654ff8784534e534608a352f /platform/node
parent11afef7825d622a237fa026e45e6d61b4de94068 (diff)
downloadqtlocation-mapboxgl-1cc1d4ea08ae02c3cc9b4dd1474845456c17d1bc.tar.gz
[core] Add setter/getter for size property in MapOptions
Diffstat (limited to 'platform/node')
-rw-r--r--platform/node/src/node_map.cpp12
1 files changed, 8 insertions, 4 deletions
diff --git a/platform/node/src/node_map.cpp b/platform/node/src/node_map.cpp
index 7ad9c362bf..bcd5fb1c16 100644
--- a/platform/node/src/node_map.cpp
+++ b/platform/node/src/node_map.cpp
@@ -631,8 +631,10 @@ void NodeMap::cancel() {
});
frontend = std::make_unique<mbgl::HeadlessFrontend>(mbgl::Size{ 256, 256 }, pixelRatio, threadpool);
- map = std::make_unique<mbgl::Map>(*frontend, mapObserver, frontend->getSize(), pixelRatio, threadpool,
- mbgl::MapOptions().withMapMode(mode).withCrossSourceCollisions(crossSourceCollisions),
+ map = std::make_unique<mbgl::Map>(*frontend, mapObserver, pixelRatio, threadpool,
+ mbgl::MapOptions().withSize(frontend->getSize())
+ .withMapMode(mode)
+ .withCrossSourceCollisions(crossSourceCollisions),
mbgl::ResourceOptions().withPlatformContext(reinterpret_cast<void*>(this)));
// FIXME: Reload the style after recreating the map. We need to find
@@ -1212,8 +1214,10 @@ 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, frontend->getSize(), pixelRatio, threadpool,
- mbgl::MapOptions().withMapMode(mode).withCrossSourceCollisions(crossSourceCollisions),
+ , map(std::make_unique<mbgl::Map>(*frontend, mapObserver, pixelRatio, threadpool,
+ mbgl::MapOptions().withSize(frontend->getSize())
+ .withMapMode(mode)
+ .withCrossSourceCollisions(crossSourceCollisions),
mbgl::ResourceOptions().withPlatformContext(reinterpret_cast<void*>(this))))
, async(new uv_async_t) {
async->data = this;