I'm trying to set up a KMZ file for use in Google Earth where the balloon contents are mostly defined in HTML files, which are embedded using iframes. The setup works with a plain KML file and the extra HTML files when using relative links on the local filesystem (assuming filesystem access is enabled).
My problem is that I can't find a way to create a KMZ file containing all files in an interlinked fashion. The KML specification doesn't talk about the issue at all (in fact KMZ appears only a few times in the whole document). I couldn't find any other documentation on KMZ either.
Is it possible to link to other HTML files within a KMZ? If yes: how?
Yes the Kml specification allows this, you just use relative paths.
However your issue is really to do with the security restrictions in specific applications on certain types of content.
For example the full Google Earth Client allows you to load Flash (swf) content in to Balloons whilst the Goggle Earth Plug-in does not. The same goes for iFramed content, etc.
So the answer to question would totally depend on which application are you viewing the Kml/kmz in and has nothing to do with Kml or Kmz specification.
Realize that there is the OGC KML Standard and how the specification of that standard gets interpreted and implemented in the Google Earth software. In particular there are some grey areas not well-defined in the spec that Google Earth implements as it does. The rules governing KMZ files and embedded content is not well defined and are clearly implementation specific. Some of the details are defined in Google KML Reference documentation and some are not. Some inconsistencies and undocumented features of KML and Google Earth can be found in the KML Errata.
There are restrictions both for what media content (embedded inside KMZ file) can be displayed inline within a description balloon and as well as what content can be linked to and accessed.
Here are some restrictions for <iframe> content listed in the KMZ Tutorial
The <src> element within an <iframe> element cannot point to a local
file on disk, nor can it point to a file inside a KMZ file; it must
point to a URL on the Internet that a browser can visit.
As an exception to this rule you can in fact have an HTML file within a KMZ file and include that as <src> element within an <iframe> in the feature description with a relative URL but not many other media types are supported.
If you enable the "Allow access to local files and personal data" option in Tools/Option/General menu panel then this relaxes some access rules and are able to access some links to content (e.g. HTML, PDF, etc.) as you would from a web browser but mostly local files external to the KMZ file.
Related
I have several Google Docs, each is a policy or png, etc. I want to create a consolidated Google doc that embeds each of the Google policies. This ‘consolidated’ document would contain all the other embedded documents, thus allowing a single print or view of all the policies in one place. I am currently using cut-paste but better would be to embed so that when my original is changed my consolidated document is also changed. I would like it to work similar to a png that is embedded / linked so that I see an UPDATE message if there is a change.
I created two KML files by copying and pasting their content directly from Google Manual. One file it the first example (using CDATA), another one is the second (without CDATA). I then created a new custom Google Map and added two layers importing both KML files.
The problem is that I cannot make formatting work. There are no red, italic, or bold fonts on the description as they should be according to both KML files.
That is how I can see the description in both Chrome and IE, on two different computers (Windows 10 64 and Windows 7 64):
Any ideas why I cannot see formats and how to make them work?
I think Google Earth supports HTML tags, but Google custom map (old name : my map) does not support HTML tags currently. KML file is just a data file. Supporting all features of KML format, or not is depends on the application.
Is there a way to share a complex HTML file with box? Currently when I share an HTML5 file it opens in the embedded viewer and it is not rendered correctly. It would be great if I could share a file that could be responsively rendered on all devices without the need for it to be on a hosting site.
For paid Box.com accounts only, you can use a direct link as outlined here:
https://support.box.com/hc/en-us/articles/200519908-Direct-Linking
Unfortunately, with a complex HTML file as you're describing, it may not render properly anyway depending on the browser/device, since the file is downloaded as an attachment and not viewed in the browser via box.com.
I am creating a HTML 5 user manual. This contains a number of image folders and js fodlers. Now i wish to distribute this as a single document. In Windows there is mht or something to that effect. Is there any way I can do this on ubuntu that is not browser or OS dependent?
notice that :MHTML, short for MIME HTML, is a web page archive format used to bind resources which are typically represented by external links (such as images, Flash animations, Java applets, audio files) together with HTML code into a single file. The content of an MHTML file is encoded as if it were an HTML email message, using the MIME type multipart/related. The first of the file is normally encoded HTML; subsequent parts are additional resources identified by their original URLs and encoded in base64. This format is sometimes referred to as MHT, after the suffix .mht given to such files by default when created by Microsoft Word, Internet Explorer or Opera. MHTML is a proposed standard, circulated in a revised edition in 1999 as RFC 2557.
So try to save document as regular html with none of dependency. this will be run at any OS independently.
Well, as far as I know you won't be able to really distribute this manual as HTML OS independent.
BUT: you can distribute it as PDF, ZIP-file, host it anywhere, ePub, etc. These are pretty good options for your needs. Safari has a pretty cool feature called webarchive, but this only zips ONE single page to a viewable, always-the-same-looking page. And it will only be viewable with Safari. So you'd have to do this for ALL your pages...
Within ArcMap, I have created KML's from various shapefiles with an attribute/column containting the location of an HTM document related to a particular point.
When I test the HTML pop-up via the verify button in ArcMap it works great. It opens the linked document just fine.
When I simply type out the link in word pad and save as .htm, the link works fine as well e.g.
test link
When I have this identical link in the pop-up window of a specific placemark in Google Earth, the document won't open. The text is blue signifying a hyperlink but when clicked nothing happens.
Any thoughts?
Google Earth has security enabled by default and won't allow arbitrary KML to access user files unless explicitly requested.
Under the Tools/Options menu of Google Earth click the General tab then check 'Allow access to local files and personal data'. Then you should be allowed to access the local files.
It's easiest to keep linked files relative to location of the KML file because absolute URLs can be burdensome. Also there are some issues in older versions of Google Earth if you have whitespace or special characters in the file names or paths.