Google Maps kml files

本秂侑毒 提交于 2019-11-28 02:20:57

问题


If I use an embeded google map in my website, will the data contained in an kml displayed be publicly viewable?

Will it be possible for the user to access just the data displayed (i.e., not the user interface) or would I have to provide that separately?


回答1:


If you load your KML through the API, with GGeoXml(), (V2), or KmlLayer(), (V3), then your data needs to be in a public server because it is parsed by Google's servers and they need to be able to get to it. If you load it with a third party extension then you can keep it private.

Third party extensions that can load and parse KML data are EGeoXml() by Mike Williams

http://econym.org.uk/gmap/extensions.htm#EGeoXml

and GeoXml() by Lance Dyas

http://www.dyasdesigns.com/geoxml/

but I believe that both of those are only available for the API V2 for now.




回答2:


I just upgraded my Google Maps JavaScript API Application from v2 to v3, following these instructions.

My v2 application was using the EGeoXml extension referred to by @Marcelo in the accepted answer to locally parse KML data.

A substitution of geoxml3 in its place, as suggested by @geocodezip (a contributor to the project) in a comment, functioned immediately in my v3 application.




回答3:


No, the data will not be public. I'm not sure about your other question though.



来源:https://stackoverflow.com/questions/3435566/google-maps-kml-files

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!