Skip to main content
Announcements
Customer Spotlight: Discover what’s possible with embedded analytics Oct. 16 at 10:00 AM ET: REGISTER NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Postcodes in Google Maps

Is there an easy way of using UK Postcodes in the Google Maps function in QlikView?

The demo QVW's only appear to use lat and long but I only have post codes in my data.

Any help much appreciated.

7 Replies
Anonymous
Not applicable
Author

Andrew,
As far as I know, Google map uses coordainates to show locations. That means that you need to find latitude and longitude for each UK Postcode and create a table. The chances are that such a table has been created already, and you only need to find it.

Not applicable
Author

Thanks Michael. Any ideas where I can get a copy of such a table? I've been looking but not found anything so far.

Not applicable
Author

Here is one link which one of the member referenced earlier. This might help you.

http://www.mapsofworld.com/lat_long/

--Arun

stevedark
Partner Ambassador/MVP
Partner Ambassador/MVP

Hi Arun,

Did you get this working in the end? I have a demo application based on UK postcodes, and a couple of files that map postcodes onto other information - such as latitude and longitude.

Cheers,
Steve

Not applicable
Author

Hi Steve, Please can you share these files with us, they would be very useful. Thanks

Not applicable
Author

Hi AndrewL,

Take a look at this string :

http://community.qlik.com/thread/6832?start=0&tstart=0

and below is some code taken from a post in that string where J.J was kind enough to post an example containing below code, pulling data from the google maps API, querying it for postcodes in the UK and bringing those into a table. Below code assumes you have a field called 'PostCode', you can adjust to match your tables.

let vNbRecords = fieldvaluecount('PostCode');

for i=1 to $(vNbRecords) ;

let vPcode = FieldValue('PostCode',$(i)) ;

sleep 200 ;

Adresses:

LOAD //@1,

     //@2,

     @3 as latitude,

     @4 as longitude,

     '$(vPcode)' as 'PostCode'

FROM

[http://maps.google.com/maps/geo?q=$(vPcode)+uk&output=csv]

(txt, codepage is 1252, explicit labels, delimiter is ',', msq);

next i ;

lzimmermann
Partner - Contributor II
Partner - Contributor II

Hi,

look at http://www.geonames.org/export/ .

There you will find from many countries, the postal code (with Lat and Long). There is a web service or you can download for each country a CSV file.