Mapbox UI component - Missing context block for On Marker Click Event


While trying to leverage the Mapbox UI component, I find there is a missing context block for the On Marker Click Event : the marker object itself !

As of now, it is only possible to use the Coordinates and the Description of the marker, but not the marker itself. As a result, I can’t find a way to open a page based on what is clicked, for example, since I can’t pass data.

Is there a way to do so easily ? Or is this something you could add soon ?

Hi @Nicolas_REMY,

At this moment we don’t have possibility to pass data in every marker.
We’ll add a new property, like data with the JSON type which will be available in the onMarkerClick event.
An internal ticket is created for this feature.


1 Like

Also while you’re at it, here’s another issue which might be linked to this and also perhaps to this other ticket.

I can’t find a way to change a marker’s color when clicking on it (to highlight which one was clicked).

Despite updating the Marker’s bound value, it looks as though the display is not refreshed with the new color value.

With a handle on the marker itself, perhaps it would work ?

Hi @Nicolas_REMY

I’ve added the update to the ticket


1 Like

Hi, @Nicolas_REMY !
Check the update 1.2.1 of the “Mapbox” component. It already available on the Marketplace.

Happy Codeless Coding!

Hi @Stanislav_Podlesnyi ,

Thanks for the update. Indeed, once I understood how it has to be set up, it works fine.

There is just one little last thing missing : when I click on a marker, it becomes “active” (i.e. it can be shown in a different color). This is good. I am also looking for a way to set a given marker as “active” programmatically, and can’t find a way to do so.

The use case is : I have a map displaying markers with a text list of all the markers. When clicking on a marker, I can now highlight the item in the text list. But when I click on an item in the text list, how can I highlight the right marker ?

@Nicolas_REMY, there is no possibility to reproduce your vision at now, but we’ll create an internal ticket to improve the component with this functionality and let you know when it will be ready.

1 Like

OK, that’s what I thought.
Thanks and I will gladly look forward to this updated capability.