tombatossals/angular-leaflet-directive — pull request #451 by ni-ka (2014-08-25 09:08:30+00:00)
Title: Added protection for endless loops (prevent map shaking)

In my application I use a map on a search results page. Whenever a filter is updated I update the bounds to fit all results on the page. Without these changes the map often gets into an endless loop where center and bounds are updated with slightly different (but more than decimal precision) values (probably due to use of map.fitBounds / autopadding). I was inspired by google maps angular directive where a similar approach is used, however I had to use $timeout due to the use of events to propagate the bound changes.