1

I have a number of stores, all have post codes/ZIP code...

I need to order nearest stores within a given radius...

A user enters a postcode (their post code) base on that post code we need to find the nearest store (which is store on my server database)

here is an example...

http://www.argos.co.uk/webapp/wcs/stores/servlet/ArgosStoreLocatorMain?storeId=10151

I have done a little research, however all my research lead me to the request limit policy which google has implemented to prevent abuse.

I want to find an effective way of querying google maps...

Any help/tutorial article or code would do to help me.

I have thought about this example: but I don't think it's effective enough making so many requests to compare it, there must be a better way.

Using PHP and google Maps Api to work out distance between 2 post codes (UK)

Community
  • 1
  • 1
Val
  • 17,336
  • 23
  • 95
  • 144
  • Do you want to have the linear distance or the driving distance? If you want to have the first one, there is no need to do that via the Google Maps API. – j0nes Sep 17 '12 at 09:57
  • @j0nes linear distance defiantly not the driving distance – Val Sep 17 '12 at 09:59

1 Answers1

0

If you need the linear distance, you can compute it on the server side. There is no need to use Google Maps for this. The formula you need is the "Great Circle Distance". I assume that you have both latitude and longitude of both your stores as well as the postal code.

Depending on your server side language, there are maybe already modules available for this calculation, for example in Perl.

j0nes
  • 8,041
  • 3
  • 37
  • 40