Domanda

You see them on shopping carts etc, you type in your postcode and it gives you a list of house numbers, then the user selects the house number from the list... Is this just done with a database or is there anyway to do this using google maps or another api?

this is for the UK

È stato utile?

Soluzione

I have implemented this before for clients. The only reliable way i found was to use a comercial API. the cheapest and most reliable i found to be "postcodeAnywhere"

http://www.postcodeanywhere.co.uk/

Altri suggerimenti

You will have to use an external web service to accomplish this. As it is for UK only, that makes it easier, but there are no free API's which will do it.

You can however fill in the rest of an address (minus house number/name) using just the Post Code by accessing the google web service:

http://code.google.com/apis/maps/documentation/geocoding/#GeocodingRequests

This is free as long as you do not plan to have large numbers of requests per year.

Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top