Skip to content
View in the app

A better way to browse. Learn more.

Web Designer Forum

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Postcode locator - create

Featured Replies

Hi all

 

I need to make a postcode finder so that:

 

You type in your postcode, and it finds your closest distributor.

 

Does anyone know how to do this or where I can find a tutorial etc?

 

Thanks very much

 

Sussextech

Hi all

 

I need to make a postcode finder so that:

 

You type in your postcode, and it finds your closest distributor.

 

Does anyone know how to do this or where I can find a tutorial etc?

 

Thanks very much

 

Sussextech

 

Afraid I cant help with that one, but if someone does know a way of doing this, I would be really interested and grateful :)

if its for the uk i would suggest using postcodeanywhere.co.uk i've made a nice little Jquery script that calls a simple script that communicates with their soap api... can't give out the code unfortunately but they are prob the best postcode peeps as their api documentation is really good...

 

it does cost but thats just how it is in the uk due to royal mail licensing for PAF lookups...

 

thinking about it they do have a javascript sample that works fully as long as you dont mind their address showing in the borwser during the look-ups... also if you talk to them they will give you the developer postcode that can be used without cost to get your script working...

if its for the uk i would suggest using postcodeanywhere.co.uk

 

nice. Cheers for that link, looks very useful.

 

IMO it's a scandal that Royal Mail owns the copyright to the UK postcode database. As tax-payers we pay for Royal Mail to generate a database of all our addresses which they license for a fee. Daylight robbery!

 

Fortunately someone leaked the entire .sql file with geo-location of all UK postcodes at wikileaks.

 

Sorry for the off-topic rant.

Fortunately someone leaked the entire .sql file with geo-location of all UK postcodes at wikileaks.

 

Don't forget that Royal Mail make anything from 1,000-10,000 postcode changes every month so that version is very outdated.

Just use the google API. i believe it's built in. you just have to work out how to generate the closest 'shop' to the location entered and only display that.

  • 2 weeks later...

If you're going to create one locally you may have to pay a fairly noticable amount to Royal Mail for the postcode database on a monthly basis (every month includes new updates)

 

 

The postcode database generally contains the important information you need.

 

Lat and long.

 

Heres a fairly good function which you can use to calculate the distance between two postcodes.

http://www.zipcodeworld.com/samples/distance.php.html

Create an account or sign in to comment

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.