Skip to content

Commit

Permalink
demo: fix on chrome browsers (missing let in strict mode)
Browse files Browse the repository at this point in the history
Signed-off-by: Tristram Gräbener <tristram+git@tristramg.eu>
  • Loading branch information
Tristramg committed Nov 21, 2024
1 parent 217ac89 commit e719abe
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions wasm/html_demo/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -167,15 +167,15 @@ async function file_selected(el) {
}
});



map.on('mouseenter', 'lrms-hitbox', () => {
map.getCanvas().style.cursor = 'pointer'
})
map.on('mouseleave', 'lrms-hitbox', () => {
map.getCanvas().style.cursor = ''
})


map.on('click', 'lrms-hitbox', (e) => {

Expand All @@ -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,
Expand All @@ -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]
Expand Down

0 comments on commit e719abe

Please sign in to comment.