SINTEF-9012 / PruneCluster

Fast and realtime marker clustering for Leaflet
MIT License
552 stars 131 forks source link

tooltips with permanent option issue #186

Closed raph-tr closed 3 years ago

raph-tr commented 4 years ago

hi, i wish my unclustered markers would have a permanent tooltip so i use the following code : sitesCluster.PrepareLeafletMarker = function(siteMarker, data) { siteMarker.bindTooltip( data.name, { className: 'siteTooltip', permanent: true, opacity : 0.6 }).openTooltip(); ... }

problem is that after a zoomout tooltips sometimes disappear when marker is clustered back (desired behaviour), but some markers remain on the map after clustering (bug ?)

the clustering works fine if the "permanent" option is disabled.

Am i coding something wrong or is it a pruneCluster issue ? could someone think of a fix to my code or a fancy workaround ?

when zoomed, unclustered markers show tooltips : Capture d’écran de 2020-06-12 09-47-33

after zoomout, some tooltips of the clustered markers remain on map : Capture d’écran de 2020-06-12 09-47-11

thx !! :)

raph-tr commented 4 years ago

hi again seems like i found a way to prevent this unwanted behavior by avoiding firing the event thanks to the trick given here #69 !