Take the 2-minute tour ×
Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. It's 100% free, no registration required.

I have a large amount of data (thousands of polygons) that I want to share with people through my site. I want them to be able to view the polygons, and due to the large amount of data, I am not worried about them stealing this data through the displayed google map. However, since the kml file must be accessible to google, a proficient coder could discover the url of the kml files and simply download the entire file. Is there any way to restrict access to these kml files only to google so no outside people can get to them. I have tried .htaccess, but I can't figure out how to restrict access to everyone but google. Any ideas?

share|improve this question

3 Answers 3

You could provide as a WMS layer in which case the end users will only have a picture of your data. And with 1000s of polygons it will be faster to download too.

Otherwise I don't think there is any way to display the KML on Google with out allowing general access to your data.

share|improve this answer
    
I like the idea, but I also want them to be able to click the polygons and get specific info about each individual polygon. A WMS layer would not be able to do that. –  user2110 Mar 4 '11 at 14:35
    
WMS has a GetFeatureInfo request that can do exactly that –  iant Mar 4 '11 at 15:05

not a great solution but you could monitor the IP addresses used by Google calling back to your KML and then setup a frontend proxy to only allow those addresses access. Obviously, this list would need to be dynamic and constantly tended to but over time, you might find the block of IPs Google uses for KML Layer callbacks is fairly stable. It would also be great list to post back to this group :)

YMMV, cheers brian

share|improve this answer

KML can be partially protected served from a httpaccess passworded directory could be parsed using a third party KML parser.(such as EGeoXml or GeoXml)

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.