From 772086b0285aaecd2282492ca21e9b0f87389555 Mon Sep 17 00:00:00 2001 From: Hsieh Chin Fan Date: Sat, 28 Sep 2024 14:36:14 +0800 Subject: [PATCH] fix: setExtra for openlayers --- src/BasicOpenlayersRenderer.mjs | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/src/BasicOpenlayersRenderer.mjs b/src/BasicOpenlayersRenderer.mjs index 1bdc554..4a85310 100644 --- a/src/BasicOpenlayersRenderer.mjs +++ b/src/BasicOpenlayersRenderer.mjs @@ -146,13 +146,12 @@ const Renderer = class extends defaultExport { } } - setExtra() { - const map = this.map; - const config = this.config; - if (config.debug === true) { + setExtra(config) { + const { map, debug, ol } = config + if (debug === true) { map.addLayer( new layer.Tile({ - source: new source.TileDebug(), + source: new ol.source.TileDebug(), }), ); }