From c7c17af6d5c5dc59da92897e04e8eaddea2a09a8 Mon Sep 17 00:00:00 2001 From: James Lyne Date: Sat, 22 Jan 2022 12:05:54 +0000 Subject: [PATCH] Fix point marker icon updates --- src/leaflet/icon/GenericIcon.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/leaflet/icon/GenericIcon.ts b/src/leaflet/icon/GenericIcon.ts index 7a7ed28..e6a1a5c 100644 --- a/src/leaflet/icon/GenericIcon.ts +++ b/src/leaflet/icon/GenericIcon.ts @@ -138,8 +138,8 @@ export class GenericIcon extends Layer implements Icon { update(options: GenericIconOptions) { if(this._image && options.icon !== this.options.icon) { - this._image!.src = useStore().state.currentMapProvider!.getMarkerIconUrl(this.options.icon); this.options.icon = options.icon; + this._image!.src = useStore().state.currentMapProvider!.getMarkerIconUrl(this.options.icon); } const iconSize = point(options.iconSize || [16, 16] as PointExpression),