Map based on address

Hello Gliders,

I would like to know your opinion on how would you manage this:

The Map can display up to 1000 pins, (Pro version) so we are trying to display these pins based on a location that the user can decide before seeing the map: at the moment, this address is requested in user profile but this is not really intuitive… Do you have any ideas?

This?

https://docs.glideapps.com/all/reference/components/pickers/location-component

1 Like

Hi Darren, It is something alike, but that feature insert only latitude and longitude, is there any way to auto convert it into a complete address?

2nd, the visible pins should not be visible only based on a complete addresse but within a “range” wich could be a whole city for example.

I know this is pretty complicated, so here’s a practical example:

Eg. Me (user) I’m looking for a vehicle in Rome (Italy), so I have to insert the city before opening the map in order to display only the available items in that town.

You would have to use a script/external service to get an address from latitude and longitude, store it on your Sheet then display on the app.

Looking at your example, I think you can have a column for city and let users filter in-app by that column.

2 Likes

Actually I think you could either use the location component, or let the user type in an address. I’m not sure how your app is set up, but you would need to get that address/coordinates loaded into your vehicle sheet (maybe with a single value column), so every row in that sheet contains the address or coordinates that the user typed in. Then you can create a distance column that would calculate the distance between the single value column address and the vehicle address. Finally you can set a filter on your list to only show vehicles with a distance less than or equal to a preset distance (50km for example).

3 Likes

Looks interesting! I’ll try to set this up today, thanks for the hint!

@ThinhDinh thanks for the answer, but this operation should be done before you even open the tab “Map”, with in app- filter you first see all the pins in the map and only after can reduce the item displayed.

2 Likes