|
-
Oct 23rd, 2011, 08:26 PM
#5
Re: Find the nearest store to a customer
Maps API: http://code.google.com/apis/maps/index.html
If you only need to search your own store locations, I would save the coordinates of each store in your database and execute a query ordered by distance ((customer latitude - store latitude) + (customer longitude - store longitude)).
See if you can use the Maps API to get the customer's coordinates.
The bonus of using the Google tools is that they will accept any sensible sort of input: suburb names and street addresses as well as postcodes.
Last edited by penagate; Oct 23rd, 2011 at 08:31 PM.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|