Forum Moderators: phranque
Help gratefully appreciated please.
I'm developing a "classifieds" Ads website (that allows people to add and browse classifieds Adverts) that needs a “search Ads” facility, by UK postcode.
Can someone please help and tell me how you can develop a facility for users to search the site ads by typing in UK postcode that brings up the nearest areas featuring the ads (say within a selected distance of nearest 10 miles) A good example of what i'm trying to achieve is the search facility on top left of loot.com that allows you to search by postcode and nearest distance.
Do some sort of plug-ins exist that i can integrate or is it moe complicated then that...?
Thanks a million in advance
Sonia
The way it works is each postcode has a latitude and logitude assigned to it. The script then works out the distance between them using simple maths.
The hardest part is finding a list of UK postcodes with their respective co-ordinates. However, there are one or two sources that will give you a list of the first half of the postcodes (e.g. just the SW1 part) and their co-ordinates for free. To get the full postcode (e.g. SW1 2BB), you have to pay. It all depends on exactly how accurate you need it to be. From what I can tell, the half-postcode list would suit your needs fine...