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.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/platform/node/src/node_map.cpp b/platform/node/src/node_map.cpp
index 9ba88193c9..78e98e2a28 100644
--- a/platform/node/src/node_map.cpp
+++ b/platform/node/src/node_map.cpp
@@ -45,7 +45,7 @@ static const char* releasedMessage() {
NodeBackend::NodeBackend()
: HeadlessBackend(sharedDisplay()) {}
-void NodeBackend::onDidFailLoadingMap(std::exception_ptr error) {
+void NodeMapObserver::onDidFailLoadingMap(std::exception_ptr error) {
std::rethrow_exception(error);
}
@@ -530,7 +530,7 @@ void NodeMap::Cancel(const Nan::FunctionCallbackInfo<v8::Value>& info) {
void NodeMap::cancel() {
auto style = map->getStyle().getJSON();
- map = std::make_unique<mbgl::Map>(backend, mbgl::Size{ 256, 256 },
+ map = std::make_unique<mbgl::Map>(backend, mapObserver, mbgl::Size{ 256, 256 },
pixelRatio, *this, threadpool, mbgl::MapMode::Still);
// FIXME: Reload the style after recreating the map. We need to find
@@ -982,7 +982,9 @@ NodeMap::NodeMap(v8::Local<v8::Object> options)
->NumberValue()
: 1.0;
}()),
+ mapObserver(NodeMapObserver()),
map(std::make_unique<mbgl::Map>(backend,
+ mapObserver,
mbgl::Size{ 256, 256 },
pixelRatio,
*this,