Multiple Map Pins on same location

Hi everyone!

How can I display multiple pins on the same location on the map?
I use a map function and display some data on a card corresponding to the map pin, but it seems that whenever I create a new data entry with the same location, it overwrites the previous card.

In a data base, I am able to store both data that has same location. It is only a problem when want to display both of them on the map.

Thank you so much for your help!

Check if you have enabled marker clustering on your map element in Bubble and that your data structure includes unique identifiers for each data entry. Also check that you are not inadvertently applying filters to your data source as it limits the displays on map.

1 Like

Thank you so much for your advice!!

Can unique identifiers be a unique ID given to the group of data?
or do you mean unique identifiers to a specific location? which in this case, how do I manage if people wants to add pins exactly the same location?

I want to create a map that display people’s experiences around the world. I don’t really need a detailed location though, I want it to be something like “Boston, MA, USA” instead of an exact location.

1 Like

Yes!! That’s exactly what I meant. This can be an ID or a unique field that Bubble can use to distinguish between different data entries, even if they share the same location.
But now that you have elaborated it a bit, we can actually do it with a different approach as well.
You can manage this by grouping data based on location attribute, such as city or region.
In your data structure, include fields such as “City,” “State,” “Country,” and any other relevant location information. and configure your map element to use that specific data structure.
Then set up the marker type to use these location attributes.
Let me simplify it by an example. It can work like, when a user adds an experience, you first search your database to check if a location entry with the same description already exists.
If it does, you append the new experience to the existing location entry. If not, you create a new location entry with that description and associate the experience with it.
I hope I was able to understand the question right? Let me know if it helped.

1 Like

Map Pins will be placed onto their location. If you have the same location twice on the same map, the first pin will be underneath the second pin. Try zooming in all the way to see if there is the overlap which would be expected since we would all expect the map markers to be pretty precise, so naturally they would overlap each other.

1 Like

Thank you for helping out! I tried zooming in to the max capacity but i still couldnt see the second one.

Thank you so much for the explanation.
Let me double check if I understood it correctly!

grouping data based on location attribute

I see, so i would create option sets for different cities and allow users to add them as well? and on the map, I will use that city option type as a market type instead of experiences?

you create a new location entry with that description and associate the experience with it.

How do I associate the experience with the city option type?

Also, how does this allow multiple markers to be displayed for the same location? What is the logic behind it?

This topic was automatically closed after 70 days. New replies are no longer allowed.