Leaflet.markercluster
Leaflet.markercluster copied to clipboard
clusterclick event doesn't work for leaflet 1.8
- [x] I'm reporting a bug, not asking for help
- [x] I'm sure this is a Leaflet.MarkerCluster code issue, not an issue with my own code nor with the framework I'm using (Cordova, Ionic, Angular, React…)
- [x] I've searched through the issues to make sure it's not yet reported
How to reproduce
- Leaflet version I'm using: 1.8
- Leaflet.MarkerCluster version I'm using: unknown
- Browser (with version) I'm using: Chrome 79
- OS/Platform (with version) I'm using: Windows 7
- Create clusterclick handler on marker cluster group
- Click a cluster icon
What behaviour I'm expecting and which behaviour I'm seeing
The handler is called after click, and the event not propagated to map.
Minimal example reproducing the issue
- [x] this example is as simple as possible
- [x] this example does not rely on any third party code
Using http://leafletjs.com/edit.html or any other jsfiddle-like site.
I am having the same issue, I just updated leaflet to the latest build (not release) and the click and clusterclick events are not being registered/bubbled up.
Same issue here, if zoomToBoundsOnClick: false is set.
MarkerCluster works for markers with identical ddresses (lat/lon). No event on click, if one of the markers in the cluster has a different address (lat/lon).
In my case, I have 5 markers with identical addresses (52.50615039, 13.37566891), and the 6. marker of the cluster has another street in the same city (52.49671197, 13.38293081).
leaflet-core-1.4.0.js Leflet.markercluster-1.4.1
I can confirm the problem with Leaflet 1.9.0, but not with 1.8 - it works fine for me when I switch back to core v1.8.
Versions in use:
- Leaflet 1.9.0
- Leaflet Markercluster 1.5.3
Nothing in the console, no error or warning, but the click event doesn't work, both in Firefox and in Chrome.
The clusters per se work, it's only the click event on a cluster icon, that does nothing.
probably because leaflet stopped exporting L globally. They revert it in 1.9.2, so maybe this works again?
In fact, they fixed it in 1.9.1. Works for me - Leaflet 1.9.1 and Leaflet.markercluster 1.5.3 play nicely again.
Maybe people still struggling want to give updating Leaflet.markercluster to its latest version a try? 1.4.1 is a little dated.
People using integration frameworks should probably have a look at Leaflet 1.9.2.