maps api v3 google.maps.event.addListener(?,event, fn) for a thousand polygons
I have more than a thousand of polygons loaded in开发者_开发问答to my map and I don't want to attach addListener to every single one.
So how can I use google.maps.event.addListener(?,event, fn) to get this working?
Weel, it seems to be impossible. So, I created a function to instantiate each polygon, attacching google.maps.event.addListener($polygon,event, fn) to each one of them. thx!
精彩评论