用Javascript读出KML文件 [英] read out KML FIle with Javascript

查看:469
本文介绍了用Javascript读出KML文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个带有城市区域的KML文件,并且想要用Javascript读出它,以便在地图上显示这些覆盖图(多边形)(Google Maps API v.3)。此外,我想将GeoPoints从KML文件和对象中区域的名称。
但我不知道该怎么做。任何人都可以帮助我解决这个问题。
Thanks $ / $>

解决方案

按照我的理解,您正在寻找 parser 来解析Google API 3返回的 KML 响应。



如果是这样,请查看 kmlmapparser ,特别针对Google Maps Javascript API版本3。



从文档看来,它似乎受到以下原创代码的启发:



所以你也可以试试这个。

希望你明白。


i have a KML File with Districts of a City and want to read it out with Javascript in order to display these Overlays(Polygons) on a Map(Google Maps API v.3) Further i want to save the GeoPoints from the KML File and the Names of the Districts in an Object. But i dont know how to do that. May anyone please help me with this Problem. Thanks

解决方案

As per my understanding, you're looking for a parser to parse the KML response returned by Google API 3.

If so look at kmlmapparser specifically for Google Maps Javascript API Version 3.

From the docs it seems original code inspired by:

So you may also try this.

Hope you understand.

这篇关于用Javascript读出KML文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆