Services Plugins FAQs

Mapbox Plugin - Remove all markers bug

I’m using the Mapbox Map and adding markers on load. There are a few situations where I want to remove all the markers on a map, like when a filter is added so I can add back the relevant markers, or when moving to a different page etc. It was working fine until a few days ago, but I’ve now been getting this error every time:

image

I tried editing the action to only run when “Mapbox Map’s visible marker id:count >0” so that it’s not trying to remove all markers when there are no markers on the map, but it didn’t help.

Is it a timing thing that the markers are not initialised by the time the action is run? Or a bug?

Hey @jenna :wave:

Thanks for sharing the details — the issue you’re encountering with removing markers on the Mapbox Map does sound like it could be related to timing or initialization.

You’re absolutely right to try conditioning the action using visible marker id:count > 0, but in some cases, especially if the map is still loading or markers haven’t been fully initialized, actions may fire before the plugin has finished rendering. This can cause the “remove markers” function to throw an error if the internal marker list hasn’t been established yet.

A few general suggestions:

  • Try adding a slight delay (e.g. 100–300ms) before running the “Remove All Markers” action after the map is loaded or filter is applied.
  • If you’re dynamically adding markers based on filters or page context, try clearing and re-adding them in separate workflows (one for removal, one for addition) to reduce conflicts.

We recommend checking your setup against the working example on our live demo page:
:point_right: Mapbox Plugin Demo Page

You’ll be able to see how we manage marker rendering and removal, including any conditions and event triggers used in the logic. This could help isolate where the issue is coming from in your own implementation.

Looking forward to your reply. :sunflower:

Best,
Support Team
Browse all Zeroqode Plugins for bubble
Banner_Last3

Thanks Mina, I’ll try and tweak the timing. Just a heads up, there is a record in your demo data that is preventing the testing of the add/remove list of markers functionality.
image
image

Hi Mina, after playing around a bit in the demo, there is only one occurrence of “Remove all map markers” in the demo and it is in a disabled workflow so I can’t test it. The remove list action also doesn’t work like I mentioned in the previous comment so it doesn’t seem like there is a working example of bulk removing markers that I can use. The only thing that does work is removing more than one simple marker at a time, but only if they have the exact same Marker ID which in practice is not realistic.

Hi @jenna ,

Thanks for your patience, and I apologize for the confusion earlier! :pray:

I’ve gone ahead and set up a working test page for the Mapbox Plugin where you can test both adding and removing markers in bulk. You should be able to compare it with your own setup to see how the workflow and conditions are applied.

You can access the test page here: Test Page

Please give it a try, and feel free to let me know if you run into any issues or have further feedback.

Looking forward to hearing from you. :sunflower:

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

Hi Mina, thanks very much.

Hi @jenna ,

I’m so glad to hear back from you! :blush: It’s always a pleasure to assist, and we really appreciate you being part of the Zeroqode community.

If you’ve been enjoying the plugin and found it helpful, we’d be incredibly grateful if you could leave a quick 5-star review. It only takes a minute and really helps others in the Bubble community discover tools that work!

You can leave a review by heading to the Plugins tab in the Bubble editor, searching for the plugin, and submitting your rating. :star2:

And if you’d like to share your experience even further, feel free to drop a quick note on:

:link: Zeroqode Reviews
:link: G2
:link: Clutch
:link: Trustpilot

Your support means a lot and helps us keep building great tools for awesome creators like you :rocket:

Thanks again, and have a fantastic rest of your week! :pray:

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