highlight a polygon while on click using kml

后端 未结 2 514
星月不相逢
星月不相逢 2021-01-26 02:41

I am using kml file to draw polygons in google map. I am setting click events for those polygon which is working. Now I want the clicked polygon to be highlighted. I had tried t

相关标签:
2条回答
  • 2021-01-26 03:32

    If you are using KmlLayer (a guess), you can't change the properties of the Polygons. If you use a third party KML parser like geoxml3. Here is a link to that.. http://developers.cloudmade.com/projects/web-maps-api/examples/kml-and-geo-rss

    0 讨论(0)
  • 2021-01-26 03:43

    If you are using KmlLayer (a guess), you can't change the properties of the Polygons. If you use a third party KML parser like geoxml3 or geoxml-v3 to render the polygons as native Google Maps API v3 objects you can change their properties (but whether the performance is acceptable will depend on how complex your KML is). You can also dynamically change Polygons in tiles rendered using FusionTablesLayer (import your KML into a Fusion Tabel).

    Example changing the color of Polygons from KML rendered using geoxml3 on mouseover

    0 讨论(0)
提交回复
热议问题