kml and cold fusion for google earth

Latest post 02-27-2009 6:30 AM by tclaremont. 8 replies.

kml and cold fusion for google earth

02-26-2009 6:29 AM

We created dynamic map and map point tools with .cfm. We use IIS6 and Cold Fusion Sever 7 for our development server.

 

For local viewing only one of 4 pc's will resolve the map points. All four have exactly the same version of Google Earth and pc hardware/software.

 

Server Mime mapping is set per Google instructions. We get the following error:

 

 http://www.koreanwar.org/google2/ams_l751.kmz  | Error when parsing file

 

I have posed a question on Adobe Cold Fusion Community but thought some of you might have had similar issues.

 

I can post the code to create the map points if needed.

 

Ted

Re: kml and cold fusion for google earth

02-26-2009 6:36 AM

Ted, is it the same PCs that cannot access it, or are you saying only one AT A TIME can access it?

I assume you are using a licensed version of CF, and not just the development version?

Feel free to post the code and I will see what I can do for you. The oddity here is that it works for one and not others. This conjures thougths of security issues and rights on the server, etc, etc.

Re: kml and cold fusion for google earth

02-26-2009 7:03 AM

Ted,

You might want to double-check how the MIME type is set. The page you linked to show me:

Content-Type: text/html; charset=UTF-8

I use Web Sniffer to check the HTTP headers 

Re: kml and cold fusion for google earth

02-26-2009 7:36 AM

We allow unlimited access for our Google Earth project which maps Korean War battlefields.

Only one of the four machines works the code properly.  The file I posted dumps the contents and I should have posted the original link.

http://www.koreanwar.org/google2/ams_l751.kmz   You will see the error I had in the original posting.

Here Here is Ted's Brother on the problem.

The code above works on one of my machines but not the others. This is not a local view, it is a full www.koreanwar.org/google3/link.kmz online.

I had to play around and finally came up with the NetworkLink page that likes to the koreanwar.cfm page.

I can't rename the koreawar.cfm page to .kmz or .kml. If I do, It will parse up to the <cfquery> and then it stops.

It looks like there is some problem with MIME settings but as one said, this could be some sort of security of permissions issue.

 

 

 

 

 

Re: kml and cold fusion for google earth

02-26-2009 7:39 AM

Dave,

Thanks for the heads up. I will double-check the headers. The Mime Types are set per the instructions from Google Earth.  They are added at the IIS level. We do use registered Cold Fusion software, see above comments.

Re: kml and cold fusion for google earth

02-26-2009 10:24 AM

Are you still having problems?

I installed Google Earth on my work PC during lunch to test, and I'm able to load the file without any problem:
http://www.koreanwar.org/google2/ams_l751.kmz

It looks like you might have it sorted out. What was the fix?

Re: kml and cold fusion for google earth

02-26-2009 11:20 AM

Arrggghhh:

I am glad that one other person out there can see the files. We still have the persistant error. I have not heard any others chip in yet, from TechSoup Communities.

Nobody from Adobe Forums has really chipped in yet, well, anyone who has hands on with kml.

Try coming through our Maps front door at:

http://www.koreanwar.org/html/korean_war_google_earth.html

This link is the one for the 1000 pins:  

http://www.koreanwar.org/google2/link.kmz

 

 

Re: kml and cold fusion for google earth

02-26-2009 1:53 PM

Is that the complete error message you get in the original post?

When I hit the links, I'm prompted to either save or run the KMZ file. Try saving it on a flash drive and see if you can load that same exact file on each computer. That would eliminate/isolate... er, something (i'm sure)

--

If you suspect MIME type to be the problem (not sure if you just mentioned it in passing and I fixated on it :) ), you can try setting it in the ColdFusion script. I Googled for syntax, and this should work:

<cfcontent type="application/vnd.google-earth.kmz">

--

I have no trouble opening Topo Maps - Army Map Service L552 1:250,000 Google Earth Overlays from the Korean War Project Maps On Google Earth page.

--

My setup:

XP Pro SP2
Google Earth 5.0

Used both:
IE 7.0
Firefox 3.0

Re: kml and cold fusion for google earth

02-27-2009 6:30 AM

I am thinking the problem is that the kmz file has no association on the visitors computer. I know that my PC had no idea what to do with it, so it merely prompted me to save it.

Remember that ColdFusion is server side, and at the point in the code in question, it is handing the file off to the client. If the client does not have an association for that file extension things are not going to go smoothly.

Because of this, I also believe that the MIME type is your issue. Essentially, you need to tell the visitor's browser exactly what type of program should be used to open the file in question. If you do not, it leaves the surfer's computer guessing as to what to do with it. I am guessing that the one computer that DOES open the file correctly already has an association for kmz files, and therfore it processes the request without issue.

I just did a web search and came up with lots of possibilites. Do a google on "correct MIME type for kmz file"