tombatossals / angular-leaflet-directive

AngularJS directive to embed an interact with maps managed by Leaflet library
http://tombatossals.github.io/angular-leaflet-directive
MIT License
1.5k stars 637 forks source link

(fix) isSameCenterOnMap returns false if coords are nil #1154

Open ekrtf opened 7 years ago

ekrtf commented 7 years ago

isSameCenterOnMap helper function returns true when mapCenter and centerModel's coordinates (lat and lng) are all equal to 0.000. This causes the 'moveend' event to fire multiple times and which puts the digest in an infinite loop with the watcher on bounds.