Skip to main content

Posts

Showing posts with the label Google Chart

Using Google Charts with KML

In my last post , I showed how KML icon images could be utilised for proportional symbol mapping. Instead of loading a custom image, images can be requested from the URL based Google Chart API as shown below ( download KMZ ). These pie charts are generated on-the-fly. The dataset is the same I used for my OpenLayers and Google Chart mashup . The charts are scaled according to total population and the pie shows the age distribution for each country. If you click on a chart, you'll see a larger version in the balloon: Since the pie charts are loaded from an external service, the KMZ file is only 10 kB. There are some performance issues since around 200 pie charts are requested from the Google Chart API. I hope to see chart functionality as an integral part of KML and various geobrowsers in the future. The map is also viewable in Google Maps and Microsoft Live Maps (Virtual Earth). The KML IconScale element is not supported by these geobrowsers, so all pie charts have the s...

Google Chart and OpenLayers Mashup

In a previous blog post , I demonstrated the new thematic map feature of the Google Chart API . I was not too impressed with the choropleth map it returned. A greater advantage of this API is the possibility to put charts on top of web maps. I here demonstrate how this can be achieved using OpenLayers . This map shows the total population and the age distribution in each country of the world in 2005. Instead of proportional circles , I’m here using pie charts to symbolise the population. The chart size is mathematically scaled in direct proportion of the total population. The pie chart itself shows the age distribution as shown in the right figure. The chart URL’s are generated with JavaScript from parameters stored in a GeoJSON FeatureCollection , and the chart images are loaded using the OpenLayers API. By loading the images into a vector layer (even though it sounds a bit strange), you have access to the new styling capabilities of OpenLayers 2.6. There are some performance issu...

Making maps with Google Chart API

A new version of Google Chart API was released last week. The most important change was the removal of the limit on the number of daily requests. I also noticed that a thematic map feature was added, and this is the result after some tweaking hours: The map above shows the number of Internet user in the world (proportional). Only unclassified choropleth maps are so far supported by the API. Right-click on the image and select Properties to see the URL generating the map image. The URL contains country codes and values for most of the world countries, but the length (1308 characters) is still within the 2083 limit . You'll find a quick tutorial for making maps with Google Chart API on this page . So far, I find the mapping feature of Google Chart API more suitable for "country highlighting" than for thematic mapping. The maximum size for maps (440 by 220 pixels) is too restrictive, as a world map needs more detail. I also miss a map legend, so the map reader can sp...