Situation: I have a collection where the geographic position (lat, long) for each field is saved (these fields represent products, for example a t-shirt).
Whenever a search is performed on this collection, the results must be sorted by the distance between the user and each field.
Problem:
I can’t sort the elements of the repeater using the data I calculated using the function that calculates the distance.
Note: I cannot save the data of the distance between user and product on the collection because this data changes every time a user makes a new search and the repeater is populated.
I have tried in every way and I am looking for everywhere but I still have not found a solution. Anyone have any suggestions?