Hi, I have a map that I am using to show recent locations of a truck. I am using a custom event called “Load Ping Data” to get the marker locations from an API and display them on the map. All markers are using one static png that I specified in the “add list of markers” action in the custom event. When I first go to this tab by clicking the button “Ping Data”, it works well and displays all the icons. However, when I now click Satellite, Street, Update, or even if I click Ping Data again, it reloads and zooms to the correct place, but the icons are not showing.
All of these buttons trigger the same “Load Ping Data” custom event, so there is no change in the way the markers are retrieved and loaded. The only difference with the Street and Satellite buttons being that they set the theme before calling the custom event. When I inspect the mapbox element, it says it has 48 markers and lists all of their ids.
How come are the icons not showing?
I tried to upload screenshots of everything to make it clearer but it says I can’t embed media in my post.
Thanks
Hi @jen ,
Thanks for the detailed rundown.
What you’re running into is a Mapbox-GL quirk: when you change the map style/theme (Street/Satellite), Mapbox reloads the style and drops any custom images that were previously registered on the map. Your markers are still “there” (hence seeing 48 marker IDs in the inspector), but their icon image is no longer registered after the style switch, so nothing is rendered.
Here are some suggestions to try with the MapBox Maps plugin:
- Re-register the icon after every style change
- If you’re using Add list of markers with a custom PNG, add a step before adding markers that (re)registers the icon image (same name) each time you address your “Load Ping Data” event.
- When a button changes the theme, change the style first, then use your custom event to (re)register the icon and add the markers. If needed, add a short pause (100–300ms) or use the plugin’s “map is loaded/ready” event before re-adding.
- (Optional) Clear & re-add markers after style change
- After switching style, run Remove all markers, then Add list of markers again (with the icon re-registered as above).
Quick checklist:
- Update to the latest plugin version.
- Ensure the icon URL is reachable (no CORS blocks). If the image is stored externally, try hosting on Bubble/AWS or use a base64 image to rule out loading issues.
- Make sure the style change happens first, then the marker load (with icon registration), all in one flow.
If you’d like us to double-check your setup, please share:
- A link to a minimal test page
- The exact steps/workflow order for the Street/Satellite buttons + the “Load Ping Data” event
- A short Loom with Bubble debugger (step-by-step) and open console showing the moment you switch the style and reload markers
We’ll review and help you get it rendering reliably.
Best regards,
Support Team
Browse all Zeroqode Plugins for bubble
Thanks so much @constantin.raicovici
I’m getting a popup saying I can’t include a link in my message? I have a loom video but I don’t know how to share the link with you.
Hi @jen,
Thanks for clarifying that.
The Bubble forum does indeed restrict posting external links for new users.
Here are a couple of ways you can still share the Loom recording with us:
- Break the link up with spaces, for example:
loom . com / share / your-video-id
We’ll piece it back together. - Alternatively, you can paste the link text but replace part of it with something like
[dot]
, e.g.:
https://loom[dot]com/share/your-video-id
- Or, if it’s easier, you could also upload the video to a file-sharing service (Google Drive, Dropbox, etc.) and share the modified link in the same way.
This way the forum won’t block your post, and we’ll still be able to check the recording.
Best,
Support Team
Browse all Zeroqode Plugins for bubble
@constantin.raicovici I don’t know why I didn’t think of that
https:// www. loom. com/ share/ d2e90b87f88748afb49480031c051af9? sid= e522fa4a-0703-4321-a7e3-4e94c2b80203
Hi @jen,
Thanks for the recording - it clarified things.
We can see the same behavior on our side: after you press the theme button and trigger “Ping Data” again, the markers are still added (IDs present), but the icon image isn’t applied. Also, in the debugger, the List of Icons input is empty on both runs.
What’s happening:
- Changing the map style (Street/Satellite) forces Mapbox to reload its style and drops previously registered images. If the icon isn’t explicitly supplied again on the next “Add list of markers” step, Mapbox has nothing to render for those markers.
What to adjust in your workflow:
- After switching style, re-add the icon on every run
- In the “Add list of markers” action, make sure the Default Icon field (or List of Icons, if you use per-marker icons) is populated again. If you’re pulling the icon URL from a custom state/var, ensure that state is set before this action on every run.
- Order: Set Style → (optional small pause or “map is ready”) → Remove all markers → Add list of markers (with Default Icon/List of Icons filled).
- If you rely on a single PNG for all markers, you don’t need List of Icons, but the Default Icon must not be empty on the second trigger. Double-check that the data source or state feeding Default Icon isn’t cleared by the style switch.
- If you use per-marker images, provide a List of Icons with the same length/order as the markers list on each retrieval.
Quick checks:
- Confirm the Default Icon input is filled on the second run (your recording only showed List of Icons; if Default Icon becomes empty on the second run, that explains the blank markers).
- Host the PNG on Bubble/AWS (or base64) to avoid any intermittent CORS/expiry issues.
- Keep the style change as the first step, then re-add markers with the icon.
If you can, please share an editor link to a minimal test page, and we’ll inspect the exact step order and inputs. This can be achieved by adding support@zeroqode.com as a collaborator to your app
We’ll get this sorted.
Best regards,
Support Team
Browse all Zeroqode Plugins for bubble
Hi @constantin.raicovici
Unfortunately this is work for a client so I can’t share the app, and I don’t have the plugin on my personal account. I am assigning the icon as a default icon after the style refreshes. I will work on minimizing how much the style needs to refresh and perhaps ways to make the icon more permanent somehow. Thanks for the help
Hello @jen,
Thanks for clarifying
You’re absolutely right: the key issue is the style refresh wiping out the registered images. Re-assigning the icon as the default after each refresh is the correct approach. Two extra tips that may help you stabilize things:
-
Fallback handling
As a safeguard, add a conditional step after your “Add markers” action to verify that the marker layer was rendered correctly. If not, trigger a quick re-register of the default icon and re-add markers. -
Keep the icon in a stable source
Hosting the PNG on Bubble/AWS or embedding it as base64 ensures it remains accessible when the map refreshes. Sometimes Mapbox silently fails to reload external icons if the request times out.
This way, even if you need to refresh styles, your markers should consistently reappear without manual intervention.
Let us know how it goes once you’ve tried those tweaks - happy to help refine further if needed
Best,
Support Team
Browse all Zeroqode Plugins for bubble