Mapbox from list of addresses AND user's GPS location

I have a list of addresses that I want to show on a map along with the current location of the user. The issue I’m running into is that I have these addresses in one sheet of their own and the only way to show the user’s location with them would be to add the user’s location as a new column value in a new row. If I have multiple users trying to use the map at the same time, this won’t work.

Is there a way to show all of the pre-set addresses AND the user’s location on the same map?

With classic apps, there used to be a “show user location” toggle for the maps component. It looks like this is no longer available in the new maps component.

I recommend voting here:

1 Like

I see that option in the map I have added, but the way it works is to add a column value in the user row that has their current location. That’s fine BUT there’s no way for me to have the map show the user’s location in addition to the other pre-set addresses at the same time. I would have to either add all of the addresses to the User sheet (then filter the map to display the preset addresses and the user’s position) or add a row for every user to the Map sheet (which uses up a bunch of rows).

I see that there is Google Maps integration but only for the paid plans which I am not using yet (but hope to soon).

If you did manage to display all location addresses and the user’s current location (I assume by writing lat-long coordinates to user-specific columns), how would you tell the difference between the location pins and the user’s pin on the map?

  • Add a “Your location” row to your locations table.
  • Add an if-then-else column, if the location name is “Your location”, then use the coordinates from signed-in user’s row, else use the location from the Locations table.
  • Use that if-then-else column in the map.
  • Color the “Your location” pin using CSS.
1 Like

I actually have 2 maps and a dropdown menu. The menu has a list of all the locations that the user would want to see. If no location is selected, then the user sees Map 1 which is just all of the locations on a single map and they can tap on a location to see the name. If a location is selected in the menu, then the user sees Map 2 which shows only the location they selected and their current location on the map (so they can see where they need to go).

The problem is that this would only work if one user at a time is using the map. As soon as more than one person tries to use it, the “Your location” cell would pull from multiple people’s rows, right? Would it filter out to ONLY show the user’s location or would it cause issues?

As for the CSS, that’s a great idea but I am on the free plan (for now) and plan to upgrade to Maker later so I can’t use the CSS right now.

No that’s not correct. The If-Then-Else column points to the signed-in user’s location, so there would be no issue with multiple users.

Well that’s awesome, thanks!

1 Like

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.