Fix mode switch not working in node version (#415)

This commit is contained in:
Andrew Calcutt
2022-08-28 04:13:38 -04:00
committed by GitHub
parent b159c991da
commit ad91ff235d

View File

@@ -642,7 +642,7 @@ void NodeMap::cancel() {
map = std::make_unique<mbgl::Map>(*frontend, mapObserver,
mbgl::MapOptions().withSize(frontend->getSize())
.withPixelRatio(pixelRatio)
.withMapMode(mbgl::MapMode::Static)
.withMapMode(mode)
.withCrossSourceCollisions(crossSourceCollisions),
mbgl::ResourceOptions().withPlatformContext(reinterpret_cast<void*>(this)),
mbgl::ClientOptions());
@@ -1421,7 +1421,7 @@ NodeMap::NodeMap(v8::Local<v8::Object> options)
, map(std::make_unique<mbgl::Map>(*frontend, mapObserver,
mbgl::MapOptions().withSize(frontend->getSize())
.withPixelRatio(pixelRatio)
.withMapMode(mbgl::MapMode::Static)
.withMapMode(mode)
.withCrossSourceCollisions(crossSourceCollisions),
mbgl::ResourceOptions().withPlatformContext(reinterpret_cast<void*>(this)),
mbgl::ClientOptions()))