问题
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