Start a new topic

iOS location query - sorting

Hi there, is there way of sorting the location query by distance? I'm using the query below if this is helpful... thank you

let store = sellerOnlineStore

let query = Query(format: "_geoloc = %@", MKCircle(center: currentLocation, radius: 20))


store.find(query) { sellers, error in

... }


There are 2 ways you can write the location queries, 'MKCircle' and 'MKPolygon'. For more details, please check this link. If this doesn't help, please elaborate your use-case.



Hi Pranav Thank you for your reply. I'm using MKCircle. I'm trying to sort the data returned from the query based on distance... So closes to furthest. In Android the return is automatically sorted. In ios the data returned seems random... Is there a way of sorting this? Thanks Ramesh
Login or Signup to post a comment