From 1bbdaa4c902282d396564764a9a59c561855e798 Mon Sep 17 00:00:00 2001 From: Yohan Boniface Date: Fri, 26 Jul 2024 15:45:51 +0200 Subject: [PATCH] wip: do not try to redraw cluserized marker --- umap/static/umap/js/modules/rendering/ui.js | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/umap/static/umap/js/modules/rendering/ui.js b/umap/static/umap/js/modules/rendering/ui.js index c4f913c3..9ac02f97 100644 --- a/umap/static/umap/js/modules/rendering/ui.js +++ b/umap/static/umap/js/modules/rendering/ui.js @@ -205,8 +205,11 @@ export const LeafletMarker = Marker.extend({ }, _redraw: function () { - this._initIcon() - this.update() + // May no be on the map when in a cluster. + if (this._map) { + this._initIcon() + this.update() + } }, getCenter: function () {