Re: [Google Maps API v3] Re: Event delegation vs Event handling

2011-12-15 Thread Andrew Leach
On 15 December 2011 01:53, Silver silv...@gmail.com wrote: Sorry, but was just an example no matter the overlay type, the question is about listeners. Somebody else with a similar doubt? I question the approach. What use to the *user* are 3000 polygons? Either they are too small to be

[Google Maps API v3] Re: Event delegation vs Event handling

2011-12-15 Thread Silver
Thanks Andrew, Sounds reasonable... please, do you know about some example of that functionality? Thanks a lot On 15 dic, 03:08, Andrew Leach andrew.leac...@gmail.com wrote: On 15 December 2011 01:53, Silver silv...@gmail.com wrote: Sorry, but was just an example no matter the overlay

[Google Maps API v3] Re: Event delegation vs Event handling

2011-12-14 Thread Marcelo
Polygons are not DOM objects, therefore you cannot make use of the javascript properties event bubbling and target that are used with the event delegation technique. According to the documentation, the map pane that holds the polygons, (overlayLayer), may not receive DOM events, so in terms of map

[Google Maps API v3] Re: Event delegation vs Event handling

2011-12-14 Thread Silver
Hi Marcelo, Thanks a lot. Please... check the follow example: MyMarker = function(opts) { for (var key in opts) this[key] = opts[key]; google.maps.event.addListener(this, 'click', function (ev) {

[Google Maps API v3] Re: Event delegation vs Event handling

2011-12-14 Thread Marcelo
On Dec 14, 5:26 pm, Silver silv...@gmail.com wrote: Hi Marcelo, Thanks a lot. Please... check the follow example: I don't parse code in my head as the compiler in my browser is much better at doing that. In this case... I'm creating 2,000 markers in the loop, but I don't need create 2,000

[Google Maps API v3] Re: Event delegation vs Event handling

2011-12-14 Thread Silver
Sorry, but was just an example no matter the overlay type, the question is about listeners. Somebody else with a similar doubt? On 14 dic, 19:04, Marcelo marcelo...@hotmail.com wrote: On Dec 14, 5:26 pm, Silver silv...@gmail.com wrote: Hi Marcelo, Thanks a lot. Please... check the