Timeline for MarkerCluster element popup does not appear when clicking a spiderfy element, instead unspiderfy is triggered in Leaflet
Current License: CC BY-SA 4.0
13 events
when toggle format | what | by | license | comment | |
---|---|---|---|---|---|
Sep 1, 2023 at 14:09 | vote | accept | ysi_d | ||
Sep 1, 2023 at 13:26 | comment | added | TomazicM | Answer is correct answer to solve the problem as described in the question, as it is obvious from JSFiddle. As such it deserves acceptance or it least upvote. | |
Sep 1, 2023 at 13:20 | comment | added | ysi_d | Unfortunately, it must be code elsewhere on my page that is having the unintended, unexpected consequence of preventing default behaviour of spiderfied items. There is a lot of code involved and it would be very difficult to guess what is causing this, so I have shelved the issue and taken an alternate approach to displaying the data: when the items are spiderfied, a custom popup with all their data appears at the central (cluster) point. You can close this question for now if you want, but if I ever find the answer, I will post an update. | |
Aug 30, 2023 at 16:56 | comment | added | TomazicM |
Tested with L.GeoJSON.AJAX and it still works.
|
|
Aug 30, 2023 at 16:05 | comment | added | TomazicM |
Only now I noticed you're using L.GeoJSON.AJAX for GeoJSON layer. I'll test also with this plugin.
|
|
Aug 30, 2023 at 15:56 | comment | added | TomazicM | So there must be some difference in your implementation from my JSFiddle example. | |
Aug 30, 2023 at 15:54 | comment | added | ysi_d | It's another plugin. I didn't write that part of the code, so I'm not sure why it's there, but I don't think it's causing the issue. When I remove it (so I just make a normal markerClusterGroup), the issue remains the same. | |
Aug 30, 2023 at 14:43 | comment | added | TomazicM |
I modified my JSFiddle to also use pointToLayer option, but it still works OK. But I noticed you use some extended marker cluster L.markerClusterGroup.layerSupport . What is this .layerSupport ?
|
|
Aug 30, 2023 at 14:20 | comment | added | ysi_d | Just an update: somehow, my 'pointToLayer' visual customization is causing the issue... sort of. In my code, if I comment out the 'pointToLayer' section, your suggestion works perfectly. But with the 'pointToLayer' content - even if I replace the function calls with hardcoded colours - I still have the issue of spiderfied elements disappearing when clicked. And yet, if I add the same 'pointToLayer' code to your JSFiddle, there is no issue. | |
Aug 28, 2023 at 16:27 | comment | added | TomazicM | See edited answer. I added JSFiddle example. | |
Aug 28, 2023 at 16:26 | history | edited | TomazicM | CC BY-SA 4.0 |
added 75 characters in body
|
Aug 28, 2023 at 15:56 | comment | added | ysi_d | This does not seem to be fixing the issue. Clicking a spiderfied element is still triggering unspiderfy. | |
Aug 25, 2023 at 21:16 | history | answered | TomazicM | CC BY-SA 4.0 |