Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
A little while back, I posted a few mapping extensions that read in various kinds of data to allow mapping of regions and data on Google Maps. One major problem with those is that Google is now charging money for useof their mapping product, so in order to use this extension on any grand scale,they'd need to purchase licensing.
So, in response to this, I've built an extension which uses all open source (free) products to provide some similar mapping capabilities(and then some). The tool which provides the scrolling and "slippy" map features is called OpenLayers which reads in map imagery from OpenStreetMap. What I've done this time, however, is built the extension to read in KML files for the regions. KML is a format that is very common in the industry (Google Earth uses and creates the files) ,and there are many tools out there to convert other formats (like shape files) into the KML format.
So, for example, I went and found a KML file for the US 50 states and put it into this new extension, and was able to create a map similar to my other US Map extension:
New Features
Above and beyond the normal features of the extensions I created for Google, this extension provides a few new features:
I've attached the extension as well as a QVW and quick guide. In the extension is a sample KML file called us_states.kml that can be used with the example QVW.
Please let me know if you have any questions. Hopefully this is useful to people.
Due to some issues with versions of Internet Explorer prior to 9 and how it handles different data formats, it is now necessary to change the KML file into an XML file prior to loading it into the extension. So, for example, if you have a KML named "counties.kml" you need to change the file extension so it becomes "counties.xml". Hopefully I'll eventually get time so this last step can be avoided, but for now it's necessary in order for the extension to work in IE8.
I've updated the attatchments on this post to use an XML file, so the examples should now work.
Unfortunately, this is a bug in SR1. Please see here for a workaround.
Brian,
This helped a lot and I am getting very close.
The last issue I an having is the state of Washington does not work in the US view as far as changing colors, but if I select Washington it zooms in as the correct color. Any ideas?
Thanks,
Mike
Brian (Great name, btw ), i managed to make your extension work with UK Postcode areas, and to be honest, the most difficult part was sourcing a suitable KML file!
A suggestion as well: would it be possible to have a popup when mousing over an area on the map, that shows the region name and the relevant expression on there?
Great work, though. Very useful!
It there anyway to hide the base layer, so that this can be used as a Floorplan as well?
Brian, are you able to share your example? I need to have a go at a UK region heat map and don't see the point in re-inventing the wheel if someone else has done it!! Julie
Hi,
I'm trying to get my map in the qvw but after trying all the steps mencioned above i only get the message:
Can someone help me?
Thanks in advance
Hi
Seems like a really cool extension, but when I try to reload it it just says that the US States.txt could be found. Should I get that file from other source or what I´m doing wrong?
Brilliant extension object Brian, I have managed to get a kml file of UK post code regions and have managed to get that working with it .. will post up soon - however it would have been nice to have a county KML .. it appears that these are really difficult to find and are potentially chargeable - if anyone finds one, can you drop it my way and i'll be happy to get it up and running in my Extension object and send the whole thing through ;0)
Sorry i didn't reply to you earlier, Julie. I should've shared my solution also, but you beat me to it. I've attached a screenshot.
I encountered similar issues to you in sourcing files for more granular levels of postcode detail, these only appear to be available by paying. And believe me, i know, because i spent quite some time trying to source them for free.
With regards to county KML files, i would say your best bet is downloading that from Ordinance Survey. You'll then have to convert the ESRI shapefile format it's supplied in into KML, which was the bit that just proved a step too far for me. There are tools out there to do it, but i encountered various issues such as the KML files generated being massive, or having to purchase full versions of the conversion software.
In the end, the solution regarding postcodes was dealt with pretty gracefully in IdevioMaps, which has built in integration for UK postcode sectors, districts and areas.
Brian, are you able to share your kml file with me? You seemed to find a better rendering than me and it would be much appreciated! I can't even remember where I got mine in the end, but there was a lot of trawling the web! I'm still trying to see if I can get something for google but again it looks as if UK regions / cities aren't full supported. If you don't want to post on here, you can email me directly julie.main@qlik.com
Cheers,
Julie