Storelocation database with GPS

Hello!
I’m getting close to publish one of my apps, thanks to a lot of you people here!

I’ve begun on a different project involves a storelocator based on the position of the iphone.
I want to search through a database of stores and then calculated the closest one from where I am and then show it on google maps in a webpopup.

My question is:
How do I code to calculate the closest store from searching through an array/database using my position?

Cheers! [import]uid: 10657 topic_id: 3687 reply_id: 303687[/import]

does your database have latitude/longitude for all these places?
http://www.scribd.com/doc/2569355/Geo-Distance-Search-with-MySQL

[import]uid: 6645 topic_id: 3687 reply_id: 11409[/import]

Thank you! I totally forgot about this thread, but now with the ny mapkit I’m back on it again!

Gonna check it out!! Thanx [import]uid: 10657 topic_id: 3687 reply_id: 13481[/import]