Sort list of Google Places by distance

Hello,

I have a repeating group that search for a list of Google Places. How can I sort them by the distance from current geographic positions? I tried everything on the Sort By options, but I cannot solve it. I am using the Get Google Places directly on the Data Source of the Repeating Group

Thank you

1 Like

Were you able to figure this out?

af1

af2

yes except its a random order,. you can load the distance from your current location but how do you then sort it? Can you sort a list by a cell in the list?

Just worked on this today. I think there are two options:

  1. retrieve the results to a database and sort / filter them using various methods in bubble. You could use something like list shifter to iterate and process the list sort order.
  2. Google’s Places API by default returns 20 random Places, prioritizing within the radius. If you put aside the plugin, you can use the api connector (to duplicate what the plugin is doing, but sending different parameters) and send an additional optional parameter of: rankby distance. Set the radius to blank and keyword to *. The first result should be the closest address :grinning:

Place Search  |  Places API  |  Google Developers