Sort by location

Might be missing something obvious here, but is there a straightforward way to simply sort a RG by location. Not by distance from a point, just sort on location the same way you can sort on date, text, number etc.

The documentation seem to suggest this is not possible, which has me a bit stumped.

@boston85719 I believe you have been messing a lot with this type of stuff, any ideas?

1 Like

A good question.
I worked on this with an app once, and realised that since the GPS Lat/Long values are different even a few meters apart, the sort by location functionality can’t be necessarily used meaningfully by itself. The bare location values by themselves are just numbers unless you convert them to an address.

I ended up extracting the locality from each user’s address which was extracted from their Lat/Long locations and then sorted people by their localities.

Check out the ‘:extract’ functionality on location data within Bubble. That might help. Additionally, a combination of ‘distance from’ and locality via :extract might make sense too.

Cheers,
Ranjit | Blur Apps

Screen Shot 2021-09-27 at 1.16.52 PM

If you put a data field of type geographic address on the datatype you are searching you can select from the Sort By the data field that is geographic address

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