tombatossals / angular-openlayers-directive

AngularJS directive to embed an interact with maps managed by the OpenLayers library
http://tombatossals.github.io/angular-openlayers-directive/
MIT License
282 stars 183 forks source link

fix(marker.js): add check to scope teardown #315

Closed njirem closed 8 years ago

njirem commented 8 years ago

On a $scope.$destroy the unregisterHandler function is called. This function removes all the eventListeners. The properties object that these listeners are attached to, might not exist. So during the teardown, an error will be raised.

This fixes issue #314