eschwartz / backbone.googlemaps

A Backbone JS extension for interacting with the Google Maps API (v3.10)
MIT License
139 stars 55 forks source link

Unbind / Remove Listeners #34

Open infacq opened 10 years ago

infacq commented 10 years ago

as most BackboneJs apps are single page application, is there anyway we can manage this event listeners attached to the map

      this.bindMapEvents({
        'position_changed': 'updateModelPosition'
      });

perhaps need a function to unbind it properly

eschwartz commented 10 years ago

I agree. Note that when a view is closed, all of the google event listeners are unbound from the google maps view.

Do you want to open a pull request for an unbindMapEvent(eventName:string) method? It could simply proxy google.maps.event.clearListeners(instance:Object, eventName:string)

infacq commented 10 years ago

yes please. i guess it may help those working with google maps. thank you

eschwartz commented 10 years ago

I was suggesting that you open a pull request :)

I might be able to get to this, but probably not in the near future.