Services Plugins FAQs

MapBox: Events order bug: Map is clicked then Cluster is clicked

Hi Zerocode

I have an app: www.storypilot.io, where I want to show a group when Cluster Is Clicked (clicking an marker) and showing a group when Map Is Clicked (clicking outside a cluster marker, on the map)

Currently, both events are fired clicking the marker, showing 2 both groups. This should not happen as the marker is clicked, and not the map behind the marker.

Any idea on how to avoid firing the Map Is Clicked when clicking a cluster marker?

I don’t see the use case of both firing the cluster event and map clicked events. A bug?

But maybe there is a workaround till it’s fixed?

The workflow execution order is A. Map Is Clicked then B. Cluster Is Clicked. Which means, I cant disable the When Map is Clicked workflow beforehand on the Cluuster Is Clicked - which would have worked…

Maybe you can reverse the Event firing order to A. Cluster Is Clicked > B. Map Is Clicked.

See the issue in action on www.storypilot.io - click on the map and click a marker. Currently I hide the first group on Marked is Clicked, but is loaded over about 50 ms which is visible and a solution.

Best
Sejr

1 Like

Hello @siticum ,

I hope you’re doing well.

I looked into your concern here and noticed that the “Map clicked” event is also triggered before the “Cluster clicked” event when you click on a cluster. This can indeed cause difficulties when both events need to be used in the app. I’ve forwarded this to our development team for further investigation and will let you know as soon as there are any news or updates on this. :pray:

As a workaround, you could use one or two states to verify if only the map was clicked or if both events occurred before displaying the pop-ups.

In the meantime, if you have any other questions or concerns, please let me know.

Best regards,
Support Team
Browse all Zeroqode Plugins for Bubble
Banner_Last3

Much appreciated @Stephan. The workaround have a small delay, looking forward to the fix or adjustment.

Cheers

Hello @siticum ,

You’re very welcome!

The development team will investigate the best way to remove the “Map is clicked” event when a marker or cluster is clicked. I will promptly inform you of any updates. :pray:

Regarding the workaround, it may indeed cause a delay. We will strive to fix this promptly so you can adjust it in the app.

Thanks again, and I wish you a great day ahead!

Best regards,
Support Team
Browse all Zeroqode Plugins for Bubble
Banner_Last3

1 Like