Saturday 2 May 2009

Google Maps and UK Postcodes

Had a real problem yesterday, when testing the use of UK Postcodes and trying to geocode the location using Google Maps API. Turns out that Royal Mail has copyright on the data and does not want everybody to use it.

Found a very useful article at http://www.tomanthony.co.uk/blog/geocoding-uk-postcodes-with-google-map-api/ that gave a very useful solution! The solution is to combine the google maps search with the google AJAX API to do a local search, if the search string 'looks like' a UK postcode. Implemented these changes and we can now reliably find UK postcodes. We need to quickly find locations, as the location is used in our new Sun/Shadow simulation. If you are intested in knowing the exact validation for UK postcodes - have a look http://www.govtalk.gov.uk/gdsc/html/frames/PostCode.htm

No comments:

Post a Comment

Using Attributes and Colours

Here I am showing how we can use pattern attributes to display objects using different colours. We are using an attribute called ROOM_USE to...