Limit repeating group content to User's location

Hi Bubblers!

I’m using a repeating group to show a bunch of info, including text and images. I’d like to have a Tinder-like location limit on the data, so that it only shows data which is within a certain radius of the User’s current location (eg 200m).

Anyone know how to do this?

Thanks!

Hey @mccjon :slight_smile: You can accomplish this by setting a constraint on the search:

This will show Users within 200 miles of the Current User’s current geographic position (Note: the browser will prompt the User for their Current Location for this). Alternatively, you could use a Location field on the User instead of Current geographic position - either way is possible!

You can also calculate how many miles away each User in the repeating group is by using this expression within the repeating group cell:

This would preview in the format of: New York, NY (25 miles away!)

Preview: users-within-distance
Editor: faye-demo-app | Bubble Editor

Feel free to let me know if you have any questions! :slight_smile:

@fayewatson

Thank you so much! That s incredibly helpful!

:smiley:

1 Like

No problem at all @mccjon! :slight_smile:

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