summaryrefslogtreecommitdiff
path: root/platform/node
diff options
context:
space:
mode:
authorJohn Firebaugh <john.firebaugh@gmail.com>2017-06-20 17:12:58 -0700
committerJohn Firebaugh <john.firebaugh@gmail.com>2017-06-22 08:04:39 -0700
commit40e47556214e999c952c1e88e026d673cdd96c72 (patch)
treee8d15795cbecc07c94908a8ebed31b73def64614 /platform/node
parent1520a56813f82bbe875774fdc2b3df26392278d6 (diff)
downloadqtlocation-mapboxgl-40e47556214e999c952c1e88e026d673cdd96c72.tar.gz
[core] Move setStyleJSON/URL to Style; add Map::setStyle
Diffstat (limited to 'platform/node')
-rw-r--r--platform/node/src/node_map.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/platform/node/src/node_map.cpp b/platform/node/src/node_map.cpp
index 324b53f843..9ba88193c9 100644
--- a/platform/node/src/node_map.cpp
+++ b/platform/node/src/node_map.cpp
@@ -214,7 +214,7 @@ void NodeMap::Load(const Nan::FunctionCallbackInfo<v8::Value>& info) {
}
try {
- nodeMap->map->setStyleJSON(style);
+ nodeMap->map->getStyle().loadJSON(style);
} catch (const std::exception &ex) {
return Nan::ThrowError(ex.what());
}
@@ -528,7 +528,7 @@ void NodeMap::Cancel(const Nan::FunctionCallbackInfo<v8::Value>& info) {
}
void NodeMap::cancel() {
- auto style = map->getStyleJSON();
+ auto style = map->getStyle().getJSON();
map = std::make_unique<mbgl::Map>(backend, mbgl::Size{ 256, 256 },
pixelRatio, *this, threadpool, mbgl::MapMode::Still);
@@ -536,7 +536,7 @@ void NodeMap::cancel() {
// FIXME: Reload the style after recreating the map. We need to find
// a better way of canceling an ongoing rendering on the core level
// without resetting the map, which is way too expensive.
- map->setStyleJSON(style);
+ map->getStyle().loadJSON(style);
error = std::make_exception_ptr(std::runtime_error("Canceled"));
renderFinished();