From e719abeb33cbebbc021e39ce84d2d2aad0cbfe85 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tristram=20Gr=C3=A4bener?= Date: Thu, 21 Nov 2024 14:05:52 +0100 Subject: [PATCH] demo: fix on chrome browsers (missing `let` in strict mode) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Tristram Gräbener --- wasm/html_demo/index.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/wasm/html_demo/index.js b/wasm/html_demo/index.js index cd3a7db..7d80bcc 100644 --- a/wasm/html_demo/index.js +++ b/wasm/html_demo/index.js @@ -167,7 +167,7 @@ async function file_selected(el) { } }); - + map.on('mouseenter', 'lrms-hitbox', () => { map.getCanvas().style.cursor = 'pointer' @@ -175,7 +175,7 @@ async function file_selected(el) { map.on('mouseleave', 'lrms-hitbox', () => { map.getCanvas().style.cursor = '' }) - + map.on('click', 'lrms-hitbox', (e) => { @@ -194,7 +194,7 @@ async function file_selected(el) { let point = lrs.resolve(lrm_id, projection.measure) window_lrms.pkStartPoint = turf.point([point.x, point.y]); window_lrms.handlePks(false) - }); + }); return { features: curves_features, @@ -208,7 +208,7 @@ async function file_selected(el) { let protocol = new Protocol(); maplibregl.addProtocol('pmtiles', protocol.tile); -map = new maplibregl.Map({ +let map = new maplibregl.Map({ container: 'map', // container id style: process.env.MAPLIBRE_STYLE, center: [2.3469, 46.8589], // starting position [lng, lat]