Unable to sort products via a dynamic position (HELP!)

Me again, hi!

I’m sincerely loosing it, therefore I’m begging someone to help me here please haha

All I need to do is to sort a Repeating Group with Products by the distance the Shops they are in have to the user.

The thing is, the Two Points from which I’m measuring aren’t still, the User is dynamic (meaning when they move the starting point in the Calculation needs to move). This is easily traceable through the Google Maps API but I’m unable to convert it into a sorting mechanism.

All the RG needs to do, is sort products by the distance their store has to the start point (which is dynamical).

Has anyone an Idea how to go about this? Should i work with states? Options? Create new Fields in the Data type?

Hope you have a lovely day and cheers

From this I assume you are getting the distances from google in javascript? How is the app sending product info to javascript?

You could use Javascript to Bubble and send it a sorted list of products, with sorting done in javascript.

Don’t forget to consider google’s fees when deciding the refresh interval.