Services Plugins FAQs

MapBox: Marker Loading Issues

Hi,

I’ve build a map (using the MapBox plugin) that provides strore locations throughout Germany. By clicking on one of the three buttons (Green, Blue and Red), the store type changes on the map and only the location icons that correspond to the respective type are displayed.

Check it out here: Canpass | Cannabis Geschäfte in Deiner Nähe

My problem is that the markers take a while to load (which in itself is not the problem), but if a user switches to a different type within the loading time, the previously added stores are not deleted and remain on the map as “icon corpses” and cannot be clicked or removed. Here I have a little recording: Loom | Free Screen & Video Recording Software

To switch between the marker icons I use the following commands:

  1. With the “Remove Marker” command, all current markers on the map with the marker ID “store_markers” are deleted.

  2. A custom workflow is triggered in which a number of stores markers are created (with the ID “store_markers”) by using the “Add List of Markers” command.

Do you have any idea how to work around this behavior?

I think the problem is not so much the long loading times (optimizing the PNG file would not help, for example) but rather the strange behavior that the markers added via “Add List of Markers” are not directly added to the respective marker ID, but only after the last marker was added. Can the developers release an update in which the added icons are directly added to the marker ID?

Hre’s the (view-only) access to my app: Canpass | Bubble Editor
Zerocode Support is already added as a collaborator.

Best regards and thank you for your help!
Robert

Hi @robkre1, thanks for such a detailed message.
A possible solution in your case would be to use the “Remove all markers” action instead of the “Remove marker”.

When using the action “Remove marker”, it is possible that some of the markers (due to the list volume) will remain on the map.

Hope the provided hint will help. If the issue will persist, please let me know :slightly_smiling_face:

Regards,

Hi @Serg ,

thanks for the help! I’ve tried the “Remove All Markers” action instead of “Remove Marker” but unfortunately the issue still remains:

For this reason I also believe that I was wrong in my initial assumption: the icon corpses have nothing to do with the assignment of the markers to the marker ID.

It looks like the “Add List of Markers” command is running in a simultaneous process thread while Bubble is running the workflows in parallel. Therefore the “Add List of Markers” command is still placing markers even though “Remove All Markers” has already been triggered.

I don’t know how to counteract this behavior. Even if I increase the performance of the “Add List of Markers” action (or limit the amount of markers), there is still a high probability that the user will trigger a “Remove All Markers” command while the markers are being placed on the map.

I don’t see a way to block the “Remove All Markers” command until the “Add List of Markers” has finished its work. Or alternatively how to capture and delete all markers with the remove-action even if the “Add List of Markers” command is still running.

Do you have any idea how to work around this behaviour or is this something the devs could have a look at?

Hi @robkre1, thanks for your reply and provided information.
I’ve passed mentioned moments to the developer team for consideration and investigation.

Once any feedback will become available, I will let you know asap :pray:

Regards,

Hi @robkre1, thanks for your patience :pray:

We have pushed a plugin update, that added a new event (When a list of markers displayed), that might be useful for your case setup.
image

To check changes, please upgrade your plugin to the latest version (Version 1.47.0: Added a new event that occurs when all markers are loaded. ) and give it a try.

Please let us know if the deployed update helped you, or there is anything else that I can help with.

Looking forward to your reply.

Regards,

1 Like