I am trying to protect my KML file, from being downloaded or its data extracted easily. All I want is the file to be viewed in google maps or google earth, but no one is allowed to download it or extract the data "easily" (the kml file isnt going to be available publicly). My kml files are a result of deep and exclusive analysis that is a signature I want to hide from competitors.
Also are there any alternatives to convert kml to a format that data cant be obtained easily from it. My KML files have polygons in 3D.
I understand the concept of everything that can be seen can be downloaded or extracted somehow,
I have 4 answers or 0 answers, depending on your project.
Using Google Maps Api for Business (~ 10.000$ per year) you can generate a Client ID and use that to protect a Fusion Table (can create in Google Drive) where you can import your KML and which you then can display using the Google Maps Api. It would be the perfect solution, but without Google Maps Api for Business your Fusion Table is not protected and so anybody can access it in Google Drive and view and copy-paste the Kml representation of the polygons.
Using Google Maps Engine (/Lite) you can import your
Kml to Google as well (if you use Lite then you first need to import to Google
"My Maps" and from within Google Maps Engine Lite you can then
import from "My Maps"). I don't know the pricing for non-lite. A
Google Maps Engine Map can be shared so its only viewable and in
this only viewable version I have not found a way to download or
view the raw-kml-data which would be what we want. Sounds all good,
but you are limited to 3 layers in Maps Engine Lite and I have not found a way to import all my polygons (districts in
my case) into one layer at once. I can only import them bit by bit as it seems (managed to import 10 polygons with a total of 353 Points into one layer). Each import results in one layer, can't move stuff from one layer to another and for some reason there are some polygons that I can't seem to import. Edit:
I can import all polygons, one polygon (due to algorithmic simplification of my polygons) got an intersection (line crossing) and as soon as I fixed that part the import didn't throw any errors anymore, but I see now that I can only embed that map using an iframe having the legend included as well, so this solution is nothing for me.
Restrict access to a KML on your server to Google servers only using a white list of Google Maps servers which might request your KML. Problem: can't find such a list online... must collect in some way first.
Also there are blog entries Protecting KML Files from general public access in Google Maps and Protect KML / KMZ Files from Unauthorized Access Using Cryptography