Display kml file on a map

时间秒杀一切 提交于 2020-01-07 04:43:21

问题


In my application I would like to display a kml file over the google maps using google map api v3.

While I was searching for the solution I came across geoxml3, BUT i don't really understood its use and for what is used.

Can anyone explain if its the solution to use geoxml3 to overlay kml file stored locally in my application.

Or else what is the main use of geoxml3?


回答1:


The Google Maps API v3 method for displaying KML (using tile based rendering) is KmlLayer

Developer's Guide (including examples)

geoxml3 was developed before KmlLayer was released, it parses KML to native Google Maps API objects (losing the benefit of tile based rendering, but allowing access to individual objects)

KmlLayer requires the KML be accessible by Google's servers. If the file is local, geoxml3 can access local files (under some conditions, with some browsers) and render them on a Google Map, but remember, unless you have a Business License, to meet the terms of use, your map must be publicly available (or you app must be, IANAL, read the terms for yourself).




回答2:


geoxml3 is a KML processor for use with the Google Maps v3 API. It allows you to render KML data on a Google Maps application. This KML data can be used to generate markers, polylines, or whatever other objects you wish.



来源:https://stackoverflow.com/questions/15347309/display-kml-file-on-a-map

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