gpt4 book ai didi

google-maps - 我可以使用 Google Maps API v3 操作 KML 吗?

转载 作者:行者123 更新时间:2023-12-04 06:19:23 26 4
gpt4 key购买 nike

我正在使用 Google Maps API v3 中的 KMLLayer 加载 KML。是否可以引用 map 上的多边形并执行更改颜色或透明度之类的操作?

最佳答案

不,您不能这样做,因为 kmllayer 中没有像对象这样的多边形。来自 google docs :

The Maps API converts the provided geographic XML data into a KML representation which is displayed on the map using a V3 tile overlay. This KML looks (and somewhat behaves) like familiar V3 overlay elements. KML and GeoRSS point elements are rendered as markers, for example, elements are rendered as polylines and elements are rendered as polygons. Similarly, elements are rendered as rectangular images on the map. Importantly, however, these objects are not Google Maps API Markers, Polylines, Polygons or GroundOverlays; instead, they are rendered into a single object on the map.



This page可能有助于探索替代方案

关于google-maps - 我可以使用 Google Maps API v3 操作 KML 吗?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/6793493/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com