Managing / specifying URIs for KML in Google Earth

I have a web application that creates a Google Earth KML file. I am trying to create a download using a URI to avoid having to travel to the server.

Cross browser problem. It works in Chrome, almost works in FireFox, and does not seem to run at all in Internet Explorer.

Here is the code:

domKML = geItem.getKml(); 

uriContent = "data:application/vnd.google-earth.kml+xml; charset=UTF-8'," + encodeURIComponent(domKML); 

window.open(uriContent, 'ROSE Download' + studyName);

By “Works”, I mean that when the calling browser is Chrome, the data is downloaded and displayed on Google Earth (if necessary).

By “almost working,” I mean that when the FireFox browser, the data is loaded, but the file extension is ..part; and he refuses to switch to google earth

And according to the testimony of "not fulfilled," I mean that IE is sitting there and taunting me.

Any thoughts on the wizards of intervention?

+3
1

IE, .

  • IE7 DataURI
  • IE8 DataURI 32kb, URI , css.
  • IE9 DataURI 4gb, , , Javascript.

, Firefox DataURI, .

0

All Articles