Services Plugins FAQs

MapBox: Using the "Marker Clicked Event" to show information of a store

Hi everyone,

I have placed various markers in the MapBox element using the “Add List of Markers” action by using addresses from a dataset of shopping stores. These records also contain other info like name, opening times, website, etc.

Now I want to display this store information in a sidebar when a marker is clicked. But how can I do that? I found the “Marker Clicked” event, but I don’t know how to trace back which marker belongs to which record.

There’s no thing such as “Clicked Markers corresponding dataset” - Please help, I do not know what to do, I would be very grateful!

Best,
Robert

Hi @robkre1, thanks for reaching out.

Regarding your use case, you might use Custom State for this.
In the workflow under the action: When MapBox Marker is Clicked, Set Custom State for the whole page. I’ve called this custom state: Marker(type text) with the value this Mapbox marker’s ID.
After that, you Display the List in the Repeating Group.

Please see the screenshots and screencast below.

Attached screenshots:





https://www.loom.com/share/5e6f9b85edb84265b685fdc49ef80fc4

Please let me know if this was helpful for you.
Best regards,

1 Like

This was perfect! The “unique id” was the missing piece in my puzzle!

Thank you for your efforts Igor.

Best,
Robert

1 Like

Hi, @robkre1 you are very welcome.
Glad that it helped you.

If you like our plugin you can rate it by going to the Plugins tab in Bubble editor. Find the plugin by name and it gives it as many stars as it deserves :slightly_smiling_face:

The more feedback we get, the more motivated we are to make things better in Bubble. Take care!

Best regards,