My polygons are loaded dynamically from a .kml file using KMLLayer.
I need these polygons (on click) to link to a page.
Can anyone advise me or provide a solution please开发者_开发技巧?
Thanks!
You can just simply add a listerer to the polygon.
var polygon = google.maps.Polygon(....);
polygon.addListener('click', function(){
});
Polygon reference
If i'm not mistaken i think that features loaded from kml cannot have listeners attached to them.Please take a close look here
精彩评论