View Full Version : Using links in Google Earth

03-10-2011, 03:30 PM
I have a KMZ file with a KML document (doc.kml) that has features that look something like this:

<name><![CDATA[<a href="metadata/471.html" type="text/html">ESI Index (FL)</a>]]></name>
<Schema name="layer_471" id="layer_471">
<SimpleField name="arpmapname" type="string"></SimpleField><SimpleField name="esi_link" type="string"></SimpleField><SimpleField name="gid" type="string"></SimpleField><SimpleField name="mapangle" type="string"></SimpleField><SimpleField name="objectid" type="string"></SimpleField><SimpleField name="pagesize" type="string"></SimpleField><SimpleField name="scale" type="string"></SimpleField><SimpleField name="shape_area" type="string"></SimpleField><SimpleField name="shape_leng" type="string"></SimpleField><SimpleField name="tile_name" type="string"></SimpleField><SimpleField name="topo_name" type="string"></SimpleField>

In the same KMZ file there is a folder called 'metadata' with a file inside it called 471.html .

If I open the KmZ file in GE, the name of the layer appears as a link, which I can click on - but it does nothing.

If I rename the file to .zip, uncompress it, and open it in google earth, when I click on the layer name it shows me the 471.html file's contents.

Is there a way I can get this to work while it's a KMZ file?

Additionally, there's another link in the 471.html file (to 471/esri.html) that doesn't work either (<a href="471/esri.html">blah</a>) - I'd like the link inside the HTML file to work as well if possible...

03-10-2011, 04:27 PM
I think it's looking for you file in a sub-folder in the same folder as the KMZ called metadata. Try this...

Open the KML file into GE uncompressed, so that it work like it should. Then use GE to create the KMZ file by rt-click and select Save As with file type KMZ. Not 100% sure, but I think that will create a KMZ file that works the way you want. Then unzip the KMZ file to see how it's coded.