Filter choices to those near my current location

Does anyone have an example of this being done yet?

In my case I have a CSV with a list of trees and their GPS points and I would want a selects question that uses a choice filter to show which trees that are within 10 meters or less of the current gps location that could be a previous question using a geopoint. Surely someone has done this by now and I don't need to reinvent the wheel right...? Right?

1 Like

You can use the distance function in a choice_filter on a select_one to only show choices that are within 10 meters of a previously selected current_location.

distance(geometry, ${current_location}) < 10

There is a sample form at the bottom of the distance documentation that shows this and more.

2 Likes