2
votes

Is it possible to pass a secure KML file to Google Earth?

This KML file will require either a token or authentication of some sort. (I'll adapt the solution based on the possible methods of securing the KML file that are acceptable.)

We need to display some secure information on a google map, and yes we are an enterprise customer. (If that helps.)

That alternative is to plot the points using the google API, but that require's slightly more effort.

3

3 Answers

2
votes

If your intention is just to protect the Kml from unauthorized access, you can use the following approach. I tried this approach in one of the scenarios and it worked for me.

http://keelypavan.blogspot.com/2011/07/protect-kml-kmz-files-from-unauthorized.html

1
votes

Just some information..

If you pay Google you can have your website run via HTTPS.

If you want something that's a bit more powerful to play with, you might want to try something like GeoServer with an OpenLayers frontend. It can serve your data dynamically from a postgres database as kml (or kmz, gif, jpeg, png, svg, and even pdf) out of the box. You don't have to code a single line to get that done, and it's free.

And indeed, you could draw stuff yourself by using the Google Maps API, but if your page is HTTPS, your users will get a warning about Google's javascript files.

Furthermore, if your browser sucks (at rendering maps), Google does the actual rendering for you server-side, and for that, the actual data will be sent to Google, and a rendered overlay image will be sent back. Maybe you can disable that behaviour, but at least you should be aware of that if you're concerned about security.

0
votes

As KML files are loaded by Google servers, you can restrict access to KML file only for Google servers.