Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

clusterclick event doesn't work for leaflet 1.8 #1065

Open
5 tasks done
brynne8 opened this issue Jun 1, 2022 · 5 comments
Open
5 tasks done

clusterclick event doesn't work for leaflet 1.8 #1065

brynne8 opened this issue Jun 1, 2022 · 5 comments

Comments

@brynne8
Copy link

brynne8 commented Jun 1, 2022

  • I'm reporting a bug, not asking for help
  • 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…)
  • 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

  • this example is as simple as possible
  • this example does not rely on any third party code

Using http://leafletjs.com/edit.html or any other jsfiddle-like site.

@nathanh2011
Copy link

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.

@birgitberlin
Copy link

birgitberlin commented Jul 4, 2022

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

@indigoxela
Copy link

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.

@goapunk
Copy link

goapunk commented Oct 5, 2022

probably because leaflet stopped exporting L globally. They revert it in 1.9.2, so maybe this works again?

@indigoxela
Copy link

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants