Send data from marker in Leafy Map

How do you send the related data of a marker in (Leafy Maps) to another page when a marker is clicked? (Using spa navigations)

Are you using a plugin or custom code for Leafy maps?

Using this plugin Leafy Maps Plugin | Bubble

Each marker on the map represents products from other users. (it works)

Now, I don’t know how to open a popup or navigate to the product detail page to display the product when the marker is clicked

There should be an event “Marker is clicked” and reference the Map element’s clicked marker’s ID and use that when going to a page

how do you exactly do that, to send the data to other page with “marker is clicked”? @tylerboodman

I have almost the same problem I can’t extract the latitude or longitude of the marker when we click on the marker


Doing as in the picture doesn’t work.

It is weird how the plugin does this but try this:

Save the list of things on the page via custom state

Set the latitudes and longitudes with the same search (make sure it is sorted exactly the same). Also set the Unique name to something predictable like marker-

Then when the user clicks the marker it triggers the event:

So you basically take the marker # clicked, it finds the Thing in the custom state list with the same # position and sends that to the next page. The next page has the same datatype as the custom state list.

nice thank very mutch it’s perfect :ok_hand:

1 Like