Relative links in KMZ file stopped working

646 views
Skip to first unread message

Lia

unread,
Jun 13, 2011, 10:34:40 AM6/13/11
to KML Developer Support - Advanced Support for KML
Hello Everyone,

In new Google Earth version (6.0+) simple link to a file (PDF) on
local server using relative path works in KML format. But as soon as
it is saved as KMZ (saveas in Google Earth), relative link stops
working (absolute path works). As we are sharing these files we need
them to work in the relation to each other.

Could you please help to figure out what can be done to make it work?

We were using version 5.2 and all relative links work in KML or KMZ
the same way.

Thank you very much for your help.

Lia

Message has been deleted

Lia

unread,
Jun 13, 2011, 2:16:51 PM6/13/11
to KML Developer Support - Advanced Support for KML
Hi everyone,

I have found solution:

for kml: <a href="Mypdf.pdf">My PDF</a>

for kmz: <a href="../Mypdf.pdf">My PDF</a>

and it works.

Except, when saved as KMZ on local computer (desktop for example) the
link works in both internal and external browsers. But when saved on
network server, it only works in external borwser and when option to
open in internal browser is on an error is displayed:

" Error opening ///server_name/folder1/kmz_folder/pdf_files/
mypdf.pdf : The filename, directory name, or volume label syntax is
incorrect."

Something in the network file string is not recognized by Google
Earth. Though the link in the kmz is the same for local and for
network location: <a href="../pdf_files/mypdf.pdf">my pdf</a>

Thank you for any help.

Lia

Brendan Kenny

unread,
Jun 14, 2011, 9:03:09 PM6/14/11
to KML Developer Support - Advanced Support for KML
Hi Lia,

Do you have an example kmz that illustrates this issue?

Thanks,
Brendan

Lia

unread,
Jun 17, 2011, 10:10:06 AM6/17/11
to KML Developer Support - Advanced Support for KML
Hi Brendan,

A small example :

<?xml version="1.0" encoding="UTF-8"?><kml xmlns="http://
www.opengis.net/kml/2.2">
<Document>
<Placemark>
<name>PDF Link</name>
<Snippet maxLines="0"></Snippet>
<description>
<![CDATA[ <a href="../Mypdf.pdf">My PDF</a> ]]>
</description> n>
<Point>
<coordinates>102.595626,14.996729</coordinates>
</Point>
</Placemark>
</Document>
</kml>

This works only when saved as KMZ file with both KMZ and Mypdf.pdf in
the same folder. it will not work saved as KML because of the "../"
shift.

As for the network/internal browser problem (please see my second
post), I have tested this code on network with 2 conditions:

for example my 2 files (kmz and pdf) are saved on network folder
here : \\server_name\folder1\kmz_folder\my_files\

1. 1st condition is when '\\server_name\folder1\' is mapped as 'W:'
shortcut, then address to the files is W:\kmz_folder\my_files\

when kmz file is clicked from this W:\kmz_folder\my_files\mykmz.kmz
address, internal bowser works

2. 2nd condition: when kmz file is clicked from the same folder opened
from complete network address: \\server_name\folder1\kmz_folder
\my_files\mykmz.kmz address, internal bowser gives error: "Error
opening ///server_name/folder1/kmz_folder/my_files/mypdf.pdf : The
filename, directory name, or volume label syntax is incorrect."


Thank you for your help.

Lia
> > Lia- Hide quoted text -
>
> - Show quoted text -
Reply all
Reply to author
Forward
0 new messages