chico0052003 / kml-samples

Automatically exported from code.google.com/p/kml-samples
0 stars 0 forks source link

Link to content stored in KMZ files #300

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
Which products are affected?
Google Earth 5

What steps will reproduce the problem?
1.
Create valid kml with content, such as .pdf docs, in reletive paths that is
accessed by checking off "enabling placemeark ballons to access local
files" in Google Earth 
"Tools-> Options-> General-> Placemark Balloons" 
and opened by using <a> tags in placemark balloons, href is set to the
relative path of the PDF files.

2. Working doc.kml and relative files are bundled into a kmz file 

3. kmz fails to open the link for PDF content.

What is the expected output or behavior? What do you see instead?

Things work fine as the files doc.kml file and dpf content are in a
uncompressed folder.

Once packaged into the kmz, things no longer work.
Are there changes to the pathe that need to be for content packaeged as kmz?

What application versions (if any) are you using?
Google Earth 5 PRO

Which operating systems (and/or relevant web browsers) are affected?
Windows 7

Please provide any additional information (code snippets/links) below.

Original issue reported on code.google.com by Berwyn.M...@gmail.com on 7 Sep 2009 at 9:57

GoogleCodeExporter commented 8 years ago
This is somewhat more of a feature request than a bug. Thanks for filing, 
agreed it
would be nice.

Original comment by api.roman.public@gmail.com on 11 Sep 2009 at 10:24

GoogleCodeExporter commented 8 years ago
While a slight variation, it seems this truly is a bug (as opposed to an 
enhancement), as documented here:

http://groups.google.com/group/kml-support-
advanced/browse_thread/thread/d5b6ddb34815c6cc/d6626c66b34668a9?
lnk=gst&q=HREF#d6626c66b34668a9

If not, then many of us are misinterpreting the developer's guide description 
on how 
to link to content encapsulated in the KMZ file.

Original comment by mike.res...@gmail.com on 31 Mar 2010 at 2:20

GoogleCodeExporter commented 8 years ago
I disagree this is bug. As I understand the KML Developers guide, KML 
referencing
(that is for KML elements) is possible within the KMZ file. Not linking from
embedded HTML, that happens according to the HTML standard, which basically 
means
that relative linking in a <a href=""> is nonsense for a KMZ file since the 
location
of the embedded HTML is unknown/non-existing.

However the KMZ specification (and implementation) could be improved so that 
HTML
relative linking happens relative to the doc.kml file (within the KMZ file)

Original comment by j...@gavia.dk on 3 Jun 2010 at 7:22

GoogleCodeExporter commented 8 years ago
Disagree that it is NOT a bug.  There's a bug somewhere.  In the same 
description segment ( <![CDATA[ ), the following code:

<a href="multimedia/images/Air-Force.jpg"><img 
src="multimedia/images/Air-Force.jpg"></a>

does the following in:
KML:
Works fine.  Image is loaded in the description balloon.  When clicked, windows 
picture viewer (or a separate browser window depending on GE version) opens the 
image.

KMZ:
Partially Works.  Image is loaded in the description balloon.  When clicked, 
nothing happens.

If we want to blame it on HTML, then the <img src> should not work either, but 
it does.

I've tested this bug in GE 5.0.11337.1968 and GE Enterprise 5.1.3533.1731.  
It's either a bug in those versions (will try 6.0 when I get home) or a bug in 
the KML Developer's Guide.  

Original comment by mccon...@gmail.com on 20 Dec 2010 at 10:40

GoogleCodeExporter commented 8 years ago
Update after further testing:

5.1.x: Works as described above
5.2.x: Image does not even appear in bubble in .kmz
6.0.x: Works as described above

Original comment by mccon...@gmail.com on 21 Dec 2010 at 2:11

GoogleCodeExporter commented 8 years ago
Are there any updates or workarounds for this issue?

Original comment by marcoti...@gmail.com on 6 Apr 2012 at 3:16

GoogleCodeExporter commented 8 years ago
only workaround is to unpackage the KMZ and run the KML.  We modded our product 
to just deliver a .zip now...  very annoying that this bug (inconsistent 
operation amongst file types in kmz) keeps getting ignored.

Original comment by mccon...@gmail.com on 6 Apr 2012 at 3:22

GoogleCodeExporter commented 8 years ago
I agree this is a bug.

We have a thumnail that shows as the img tag, then a href that opens a large 
version of the image.  In a KML clicking on it opens the image in the "Inbuilt" 
image viewed in Google Earth 6.  In the KMZ the screen just flashes and the 
image doesn't open.

When in a KML it works fine, when packaged in KMZ the screen just flashes.

The only option is to not supply the KMZ but to supply a ZIP file which the 
user must unzip then open the KML and everything works ok.  This however 
defeats the purpose of a KMZ.

Original comment by fik...@gmail.com on 18 Apr 2012 at 10:47

GoogleCodeExporter commented 8 years ago
[deleted comment]
GoogleCodeExporter commented 8 years ago
With a file lieu.kml containing the line :
<description><![CDATA[<a href="d2\ABILLY.kml">ABILLY</a>]]></description>
A right click on "copy link" in the bubble give the past :
file:///C:/Users/Alain/Pictures/2013/d2/ABILLY.kml
And it work fine

With the  file lieu.kmz the past become :
file:///C:/Users/Alain/Pictures/2013/lieu.kmz/d2/ABILLY.kml
the name of the file has been added into the path and this does not work.

This seems to be a bug
Google Earth version:   7.1.1.1888

Original comment by alainrob...@gmail.com on 20 Oct 2013 at 6:49

GoogleCodeExporter commented 8 years ago
I just spent two days trying to figure this out -- it appears that it is still 
the case where the file name, etc. gets added onto the path and it does not 
work for me either.  Embedding a folder of pdfs into the KMZ and relative paths 
to that folder of pdfs results in hyperlinks that do nothing.  However a KMZ 
and a folder outside of the KMZ, using the ../files/xxx.pdf technique works 
fine - could you guys maybe just make this crystal clear in the Buffet example 
in the documentation, I read and re-read that documentation and still expected 
this to work, it's just not clear...thanks!

Original comment by aug....@gmail.com on 2 Oct 2014 at 5:28

GoogleCodeExporter commented 8 years ago
@Berwyn.M...@gmail.com - did you ever find a workaround/solution for this?

Original comment by aug....@gmail.com on 2 Oct 2014 at 3:17