backbone.googlemaps icon indicating copy to clipboard operation
backbone.googlemaps copied to clipboard

Unbind / Remove Listeners

Open infacq opened this issue 11 years ago • 3 comments

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

infacq avatar Apr 17 '14 08:04 infacq

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)

eschwartz avatar Apr 17 '14 15:04 eschwartz

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

infacq avatar Apr 17 '14 16:04 infacq

I was suggesting that you open a pull request :)

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

eschwartz avatar Apr 17 '14 16:04 eschwartz