yukk1
yukk1
Add onEachFeature to the geojson of http://tombatossals.github.io/angular-leaflet-directive/examples/0000-viewer.html#/basic/geojson-update-example ``` javascript angular.extend($scope, { center: { ... }, geojson : { data: { ... }, style: { ... }, onEachFeature: function (feature, layer)...
Use `map.getBounds().contains(L.latLng())` ```javascript $scope.$watch('bounds', function(){ leafletData.getMap().then(function(map){ $scope.markersWithinBounds = $scope.markers.filter(function(marker){ return map.getBounds().contains(L.latLng(marker.lat, marker.lng)); }); }) }); ``` [plunker](http://embed.plnkr.co/dFF4MfNcpbcg4eA9Y46J/)
You should install babel-core. `npm install babel-core --save-dev`