Access KML placemarks in a Google Maps overlay via Javascript?

I have a KML file overlay on an embedded Google Map using the GGeoXml object. I'd like to be able to access specific placemarks in the KML file from Javascript (for example to highlight a selected polygon on the map in response to user action). Ideally what I'd like to do is something like this (pseudo-code): geoXml.getPlacemarkByName('Foo').focus(); Unforunately the [Google Maps API]( doesn't seem to expose the placemarks or any other internals of the KML overlay. Does anyone have any thoughts as to how I might accomplish this? I don't know anything about how the overlays are implemented internally, but it seems like there might be a hack that would let me do this. I'm also using jQuery FWIW.

以上就是Access KML placemarks in a Google Maps overlay via Javascript?的详细内容,更多请关注web前端其它相关文章!

赞(0) 打赏
未经允许不得转载:web前端首页 » JavaScript 答疑

评论 抢沙发

  • 昵称 (必填)
  • 邮箱 (必填)
  • 网址

前端开发相关广告投放 更专业 更精准