views:

36

answers:

1

Is it necessary to remove Event listeners in when using google maps javascript api? "assume that code is working fine"

In other words do even listeners hinder website performance in such a way that one should ALWAYS remove/minimized unused listeners.

Thanks

A: 

I assume you talk about GEvent's from the Google Maps API. Personally, I haven't had any difficulties with them.

Nor have I had any problems with adding say jQuery .mouseup() on the map canvas to trigger map events, although I recommend using GEvent's for triggering and handling map-related stuff.

Edit: It'd be interesting with some profiling on having a simple map canvas, and see if other actions and performance is affected by removing GEvents.

David Andersson