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

... }


Ramesh,


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.


Thanks,

Pranav

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

My site which is about shoes shopping is in development. It is like this Payless shoes coupons through which you can get amazing shoes with greater rates. I am having IOs interface issues, it is not properly showing.

Ramesh,


Check sort modifiers for iOS.


Thanks,

Pranav

Hey Pranav Thank you for your answer. I'm utilizing MKCircle. I'm attempting to sort the information came back from the question in light of separation... So closes to uttermost. In Android the arrival is naturally arranged. In ios the information returned appears to be arbitrary... Is there a method for arranging this?


Terrarium tv ad free

Terrarium tv on Roku

@andruplintoff: Hey, could you please tell me how arrival is naturally arranged in Android? I am working on a project of PennySaviour and your help in this regard will be highly appreciated. Thanks in advance :)

Login or Signup to post a comment