Do all distance functions in Bubble use Google APIs?

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.

  1. lat > this thing lat
  2. lon > this thing lon
  3. lat < this thing lat
  4. 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.

1 Like