If the location of the things is stable you could store the distances in the database.
How to do it:
- Create a new datatype “Relation” that will include reference to two things and a distance field.
- Create a backend workflow that is triggered when a new thing is added. The workflow should iterate all things and create “Relations”.
- then you can use “Relation” for sorting.
If it is not your use case and you need to calculate the distance every time within a certain radius then a different a bit more complex approach could be used. It requires more explanation. Let me know you need it.