MapKit Nearby

Any idea on how to calculate nearby positions using the new MapKit feature? I have a few lat/longs in a database that I would like to compare with the current location of the user, showing him the closest place.

questions are:

  • how to calculate the distances?
  • should I loop the entire database or is there a way/function to say “show only nearby places in the range of 10 miles”?

considering my database has points from USA and Australia, I would like to avoid a situation where an user in, for example, Mexico gets a return like “the nearest place is 2,034 miles from here”.

thanks for any return here.
Alex [import]uid: 4883 topic_id: 4571 reply_id: 304571[/import]

I’m having the exact same question.

is there a function or mapKit trick which will enable you to calculate distances between the users current location and locations in a database, searching for the nearest location?

Regards,

Jeroen [import]uid: 14085 topic_id: 4571 reply_id: 17811[/import]

+1 [import]uid: 33608 topic_id: 4571 reply_id: 60736[/import]