Translate posts to Experimental | Feedback
Google
Official Google Earth Download Site
Topic Options
Rate This Topic
Previous Topic
View All Topics Index
Next Topic
#59317 - 07/19/05 07:51 AM Problem opening kmz files from IE ****
DanielC Offline
Traveler

Registered: 07/19/05
Posts: 3
Google has some sample kmz links on their web site (e.g. http://services.google.com/earth/kmz/GrandCanyon.kmz). If I click on the link, IE asks me to choose to open it (with Google Earth) or save the file as you'd expect.

I wanted to provide some kmz links on my own web site, but when I click the link to my kmz file (http://www.christinesbeachcottage.com/ct_virtual_tour.kmz), IE changes the extension from .kmz to .zip, and treats it as if it's a zip file. Even if I right-click on it & choose "Save Target as...", IE pops up with the dialog box asking where I want to save "ct_virtual_tour.zip" (Note: There is no file named ct_virtual_tour.zip on my site!).
The problem is not limited to my site, as I get the same problem when I click on links to kmz files on some forum sites.

This seems specific to my setup: Windows XP + SP2 running IE 6 with all updates. I don't get this problem when I test using my laptop running Windows 2000 with IE 6, or from my Linux setup running Firefox.

As a test, I copied Google's "GrandCanyon.kmz" file to my site, but again when I download it using IE, IE wants to open or save it as "GrandCanyon.zip".

Anyone seen a problem like this or has any ideas? How is it that my IE opens a kmz file correctly when it's on the Google site, but changes its extension to .zip when I open or download it from my site?

Top
#59318 - 07/19/05 08:09 AM Re: Problem opening kmz files from IE [Re: DanielC]
dropzone Offline
Traveler

Registered: 07/18/05
Posts: 43
Loc: Chicago, IL
DanielC,

you need to configured your webserver to send the correct MIME types to the browser. More explanation is at the KML tutorial:

http://www.keyhole.com/kml/kml_tut.html

5 KML Server requirements
When responding to a request from the Google Earth client, a KML server must follow a certain set of rules so that the client can correctly interpret responses.

Upon success, the server must return a response code of HTTP 200 and set the response's content-type to a suitable MIME type.
Google Earth reads KML and KMZ files, and the MIME types for these are:
application/vnd.google-earth.kml+xml kml
application/vnd.google-earth.kmz kmz
The body of the response must contain valid KML data, including the xml declaration header (<?xml version="1.0" encoding="UTF-8"?>). If the server returns invalid KML, the Network Link will stop deactivate and output an error message.
_________________________
Move along - there is nothing to see here www.prupref.com

Top
#59319 - 07/27/05 12:15 AM Re: Problem opening kmz files from IE [Re: dropzone]
DanielC Offline
Traveler

Registered: 07/19/05
Posts: 3
Thanks very much

I used the "Mime Types" utility in CPanel to do this. It added the following lines to the .htaccess file in the same directory as my kmz file:

AddType application/vnd.google-earth.kml+xml kml
AddType application/vnd.google-earth.kmz kmz

Top
#59320 - 07/28/05 03:47 PM Re: Problem opening kmz files from IE [Re: DanielC]
JohnBoZ Offline
Traveler

Registered: 07/19/05
Posts: 33
Hi Daniel,

I have exact the same problem on my (dutch) site.

http://www.webkwestie.nl/google_earth_columbus/verwerking_02.htm

It's a educational site. When the student clicks on "KLIK HIER". He gets de zip-problem.

I see that there is a solution (?), but I don't understand how the problem is solved. Can you give me a example? I'm not a technical men, so if you can give me a simple explantion or example, I would be very happy.

Greetings,

John Demmers
Netherlands

Top
#59321 - 07/28/05 08:55 PM Re: Problem opening kmz files from IE [Re: JohnBoZ]
Hulk Offline
Traveler

Registered: 07/01/05
Posts: 521
Loc: Denmark
Well technically a KMZ file IS a zip file, so its not doing that much wrong But don't you have a web master who can set the MIME types for you?
_________________________
Google is evil.

Top
#59322 - 07/29/05 02:16 AM Re: Problem opening kmz files from IE [Re: Hulk]
JohnBoZ Offline
Traveler

Registered: 07/19/05
Posts: 33
Hi Hulk,

I am just a simple webmaster.
Could you send a example of such a code?
Or could you refer to a webpage where a can study the html-code?

Greetings,

John Demmers

Top
#59323 - 07/29/05 07:36 AM Re: Problem opening kmz files from IE [Re: JohnBoZ]
horizon Offline
Traveler

Registered: 07/11/05
Posts: 10
John, there are two options for Apache servers.

1. If you have root access find the mime.types file on your server and add two new lines:
application/vnd.google-earth.kml+xml kml
application/vnd.google-earth.kmz kmz

2. Or create a .htaccess file in the directory where your html files are stored and add two lines to .htaccess:
AddType application/vnd.google-earth.kml+xml kml
AddType application/vnd.google-earth.kmz kmz

Top
#59324 - 09/20/05 02:01 PM Re: Problem opening kmz files from IE [Re: horizon]
briantos Offline
New Poster

Registered: 09/20/05
Posts: 1
Hi there,

I added the code to .htaccess on my Apache server. It worked great for the .kmz file, but if I establish a hyperlink to a kml file, it simply displays the contents of the file:

<?xml version="1.0" encoding="UTF-8" ?>
- <kml xmlns="http://earth.google.com/kml/2.0">
- <Placemark>
<name>New Placemark</name>
- <LookAt>
<longitude>-96.44467995828418</longitude>
<latitude>40.43171495313342</latitude>
<range>24672630.37205456</range>
<tilt>2.058821340121152e-012</tilt>
<heading>0.23622985662122</heading>
</LookAt>
<visibility>1</visibility>
<open>0</open>
<styleUrl>root://styleMaps#default+nicon=0x307+hicon=0x317</styleUrl>
- <Point>
<extrude>0</extrude>
<tessellate>0</tessellate>
<altitudeMode>clampToGround</altitudeMode>
<coordinates>-96.44467995828418,40.43171495313342,0</coordinates>
</Point>
</Placemark>
</kml>

Top