ToolitKit https://bubble.io/plugin/toolit-kit---helpful-functions-1562812673262x109396480465567740
has distance plugin that calculate distance between two coordinates.
To create a list of all things within 20 miles you need to iterate your list of thing and calculate the distance between every thing from the list and “this thing”. If distance is <20 miles you can store it in a list or mark somehow.
If you have too many things and don’t want to iterate all of them (using API workflow or ListShifter) you could create four separate list of things based on Lon/Lat.
- lat > this thing lat
- lon > this thing lon
- lat < this thing lat
- lon > this thing lon
Than you stop iterate the list once you exceed the 20 miles distance and hence you won’t iterate the whole list of things.
Basically, it is a rough algorithm that you can build in Bubble.