Search code examples
angularjsangular-leaflet-directiveui-leaflet

update markers when not watched


In angular-leaflet-directive is there a way how to update markers and paths on the map when we switch off the $watch using markersWatchOptions?


Solution

  • I think you are look for something similar to this example:

    http://angular-ui.github.io/ui-leaflet/examples/0000-viewer.html#/mixed/overlays-markers-nested-no-watch-example

    In which, markers are updated via getDirectiveControls().

    There is more about it in this issue:

    https://github.com/angular-ui/ui-leaflet/issues/239