Make cluster "bubbles" ignorable by Geoman #1249
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Thanks to #1220, the base
Layer
class now setspm_ignore
by default to True so that Geoman ignores created layers by default -- including for example, markers. However, the Leaflet.markercluster plugin also creates additionalL.Marker
s with an icon that represent the clusters, i.e. a "cluster bubble" which is shown as a circle and a label indicating the number of markers represented by the cluster. Currently, Geoman doesn't ignore this by default and causes issues such as being able to move the cluster bubble around the map or deleting the bubble.This PR intercepts the creation of this
L.Marker
(injupyter_leaflet
) so that it can also be ignored by Geoman.@martinRenou and/or @iisakkirotko could you please review? If possible, a new release (latest one was in July 2024) including these latest improvements (see also #1250, #1251) would be appreciated.