...

View Full Version : Nearest Store locator



mynotaur
05-14-2008, 02:16 PM
Hi all,

I'm looking to build a website for a local UK based kebab shop, i'm looking for a way to have a nearest store redirect where a customer can type in their postcode and they are then redirected to the page which will correspond to their nearest store.

After hours trawling the net the closest I can find to this is using the google maps API but if I can help it I don't want to have a map shown.

To give you an idea im looking for something like this:

http://www.pizzahut.co.uk/
http://www.dominos.co.uk/

any help or advice on this matter would be greatly appreciated.

Myn

mlseim
05-14-2008, 03:26 PM
In the U.S., there is a database for all zipcodes. It then has the GPS coordinates
for each zipcode. I'm guessing you might have the same type of thing in the UK?
With the GPS coordinates, some math functions give the closest location.

Do some Google searches for "postal code database" or "postal code GPS"

NancyJ
05-14-2008, 06:43 PM
The official UK postcode database costs thousands of pounds from the Royal Mail but there are a number of unofficial alternatives.

http://www.easypeasy.com/guides/article.php?article=64
http://www.freethepostcode.org/
http://www.jibble.org/ukpostcodes/

Of course, these are unofficial and may not be 100% accurate of up-to-date

NancyJ
05-14-2008, 07:03 PM
A quick and dirty alternative is to do partial post-code matching, how effective it will be depends on how many stores they have and how clustered they are.

For example. a Post Code: BL2 6TB would look for a store with a postcode starting with BL.
Obviously this doesn't work if they have multiple stores within the same city/area (with the first 2 letters of the postcode the same) and even then its not 100% accurate, the nearest store might be in a different post code area and anywhere there was no store would have to return 'no results in your area'. But its free.

GJay
05-14-2008, 07:55 PM
sites like postcodeanywhere and epostcode provide web-services that let you query the full database without paying quite so much money, they charge a few pence per query.

NancyJ
05-14-2008, 08:45 PM
sites like postcodeanywhere and epostcode provide web-services that let you query the full database without paying quite so much money, they charge a few pence per query.

that 1.3p per query easily adds up - if you want to use it for all visitors (like pizza hut and dominos) you could rack up a bill of 5k a year with a modest traffic of 1,000 visitors a day (plus, you only get that rate if you pay for 200,000 clicks)

gnomeontherun
05-15-2008, 08:09 PM
http://www.nearby.org.uk/api/convert-help.php

This site lets you download a database you could use on your own site to query.



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum