Fix point marker icon updates

This commit is contained in:
James Lyne 2022-01-22 12:05:54 +00:00
parent 3ca7a72703
commit c7c17af6d5

View File

@ -138,8 +138,8 @@ export class GenericIcon extends Layer implements Icon<GenericIconOptions> {
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),