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 635 forks source link

Updating a moving polygon dynamically #1125

Open naveenjafer opened 8 years ago

naveenjafer commented 8 years ago

Background to problem: I have a nvd3 tooltip event that fires everytime i move the tooltip over it. What I am trying to achieve is to highlight the same location on leaflet corresponding to the timeseries object of the nvd3 line graph. I have reached this point in the code where, I modify $scope.paths every time there is a change in tooltip event(by the user, after the page completely loads).

Issue: The map only displays this dynamic polygon object and renders it on the map when some event is triggered on the map(mouseover or anything else too). I have ensured that watch-paths is set to true. how do I ensure that the leaflet renders the path polygon item without me having to move my mouse over the map to see it render.