Wednesday, April 30, 2008

Google Earth and Charts Tutorial Part 2

Thanks to an anonymous poster below it was brought to my attention that the chart in the description info window does not load in Google Earth 4.3. At first I thought it was just a very slow load time, but then it doesn't ever load. After some experimenting, I discovered for some reason when I add the labels to the chart, the image never loads. If I remove the following line from the url then it loads fine: &chl=MaleFemale. I haven't the slightest idea why it does this, and afterall GE 4.3 is still in beta (what of Google's isn't still in beta?)



If you want to see this in action, create an empty text file with .kml instead of .txt for the extension. Paste the following kml in the file and then save it. The image shouldn't load in the info window. Then remove the &chl=MaleFemale, and save. Now the image should load.



<?xml version="1.0" encoding="UTF-8"?>
<kml xmlns="http://earth.google.com/kml/2.2">
<Placemark>
<name>080690013023044</name>
<description><![CDATA[<img src="http://chart.apis.google.com/chart?chs=250x100&chd=t:59,41&cht=p3&chf=bg,s,65432100&chl=Male|Female"> ]]></description>
<Style>
<IconStyle>
<Icon>
<href>http://chart.apis.google.com/chart?chs=250x100&chd=t:59,41&cht=p3&chf=bg,s,65432100</href>
</Icon>
</IconStyle>
</Style>
<Point>
<coordinates>-105.040382,40.615846,0</coordinates>
</Point>
</Placemark>
</kml>

No comments: