Recall this post is about trying to build a kmz with icons embedded
into the kmz. Funny how seemingly easy stuff gets you. GE keeps
reconfiguring the <href> pointing to the icon files embedded in the
kmz -- so the icons fail to resolve. Is this where you need some
CData type statement to tell GE not to think too hard?
This points to the kmz that I made that is giving the problem:
http://backroom.terradex.com/share/Google/Current_AURN_Stations_Monitoring_Data.kmz
Here is a snippet from the vbScript generated KML that would be placed
into a kmz package. This uses the Unix style file reference:
<Style id="normal_current_style_2">
tf.write "<IconStyle>"
<scale>0.7</scale>
<Icon>
--> <href>files/current_low.png</href>
</Icon>
</IconStyle>
<LabelStyle>
<scale>0</scale>
</LabelStyle>
<BalloonStyle>
<text>$[description]</text>
</BalloonStyle>
</Style>
<Style id="highlight_current_style_2">
<IconStyle>
<scale>1.0</scale>
<Icon>
<href>files/current_low.png</href>
</Icon>
</IconStyle>
<LabelStyle>
<scale>1.0</scale>
</LabelStyle>
<BalloonStyle>
<text>$[description]</text>
</BalloonStyle>
</Style>
This is placed into a folder structure in early post:
placemarks.kmz (zipped kml)
placemarks.kml
files
icon.png
However when it is uploaded from GE, it creates its own dynamic file
reference to the icons. They do not resolve. Below is a placemark
where the local icon reference is generated. This was copied from the
kmz as it resolved in a GE session.
<name>KmlFile</name>
<Style id="normal_current_style_2">
<IconStyle>
<scale>0.7</scale>
<Icon>
---> <href>C:/Script/BureauVeritas/files/current_low.png</href>
</Icon>
</IconStyle>
<LabelStyle>
<scale>0</scale>
</LabelStyle>
<BalloonStyle>
<text>$[description]</text>
</BalloonStyle>
</Style>
<Style id="highlight_current_style_2">
<IconStyle>
<Icon>
<href>C:/Script/BureauVeritas/files/current_low.png</href>
</Icon>
</IconStyle>
<LabelStyle>
</LabelStyle>
<BalloonStyle>
<text>$[description]</text>
</BalloonStyle>
</Style>
<StyleMap id="current_style_2">
<Pair>
<key>normal</key>
<styleUrl>#normal_current_style_2</styleUrl>
</Pair>
<Pair>
<key>highlight</key>
<styleUrl>#highlight_current_style_2</styleUrl>
</Pair>
</StyleMap>
<Placemark id="data_137_copy0">
<name>Aberdeen Station</name>
<Snippet maxLines="2"></Snippet>
<description><![CDATA[<table border=0 >
<tr bgcolor="#E6E6FA"><td colspan=4 align=left><font
size=4><b>Aberdeen Air Pollution Monitoring Station</b></font></td></
tr>
<tr><td colspan=4 align=center><img width=250 src="
http://www.bv-
aurnsiteinfo.co.uk/client/images/MainPhotoSmall/aberdeenmain.jpg"/></
td></tr>
<tr><td colspan=4 align=center><b>Station Description:</b> Close
to city centre and approximately 80 metres from main
road.
</td></tr>
<tr bgcolor="#E6E6FA" align=center ><td colspan=2 VALIGN=BOTTOM>
<b>Current Air Quality Level</b></td><td
VALIGN=BOTTOM><b>Concentration</b></td><td VALIGN=BOTTOM><b>Air
Pollutant</b></td></tr>
<tr valign="middle" bgcolor="#FFFFFF"><td width=75
valign=middle><img src="C:/Script/BureauVeritas/files/current_low.png"
width=30></td><td>Low</td><td align=center>58<td> <b>Ozone</b> -
Hourly Mean (µgm <sup>-3</sup> )</td></tr>
<tr valign="middle" bgcolor="#E6E6FA"><td width=75><img src="C:/
Script/BureauVeritas/files/current_low.png"width=30></td><td>Low</
td><td align=center>11<td> <b>Nitrogen dioxide </b> - Hourly Mean
(µgm<sup>-3</sup>)</td></tr>
<tr valign="middle" bgcolor="#FFFFFF"><td width=75><img src="C:/
Script/BureauVeritas/files/current_low.png"width=30></td><td>Low</
td><td align=center>19<td> <b>Particles</b> - 24 Hour mean PM10
(µgm<sup>-3</sup> Grav Equiv)</td></tr>
<tr bgcolor="#E6E6FA"><td colspan=4><a href="
http://www.bv-
aurnsiteinfo.co.uk/viewSite.asp?pageRef=151&stationID=137&#">Link to
Station Information</a></td></tr>
<tr ><td align=left colspan=4>Data updates hourly and was last
collected by <a href="
http://www.terradex.com">Terradex</a> at
2/14/2008 5:07:00 PM GMT on behalf of Defra and the Devolved
Administrations.</td></td></tr>
</table><br><br>]]></description>
<styleUrl>#current_style_2</styleUrl>
<Point>
<coordinates>-2.094277778,57.15736111,0</coordinates>
</Point>
</Placemark>
</Document>
</kml>
Any obvious errors?