Results 1 to 5 of 5

Thread: Find the nearest store to a customer

Threaded View

  1. #5
    I'm about to be a PowerPoster!
    Join Date
    Jan 2005
    Location
    Everywhere
    Posts
    13,647

    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
  •  



Click Here to Expand Forum to Full Width