From f3d18f09a0017cc9c95c88ff4413ecbefd73c3a1 Mon Sep 17 00:00:00 2001 From: vcoppe Date: Fri, 27 Mar 2026 19:21:25 +0100 Subject: [PATCH] refresh markers on style load --- website/src/lib/components/map/gpx-layer/start-end-markers.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/website/src/lib/components/map/gpx-layer/start-end-markers.ts b/website/src/lib/components/map/gpx-layer/start-end-markers.ts index 10323e762..9e67f6c94 100644 --- a/website/src/lib/components/map/gpx-layer/start-end-markers.ts +++ b/website/src/lib/components/map/gpx-layer/start-end-markers.ts @@ -31,7 +31,7 @@ export class StartEndMarkers { unsubscribes: (() => void)[] = []; constructor() { - map.onLoad(() => this.update()); + map.onLoad((map_) => map_.on('style.load', this.updateBinded)); this.unsubscribes.push(gpxStatistics.subscribe(this.updateBinded)); this.unsubscribes.push(slicedGPXStatistics.subscribe(this.updateBinded)); this.unsubscribes.push(hoveredPoint.subscribe(this.updateBinded));