How can I call fitbounds on a map with angular leaflet? I saw a post somehwere to look for the map binding event but couldn't find any sample code.
Asked
Active
Viewed 1,231 times
1 Answers
0
Try to use
angular.module('myModule').controller('MapController', ['$scope', 'leafletData',
function($scope, leafletData) {
leafletData.getMap().then(function(map) {
map.fitBounds(bounds);
});
}
]);
and check out Dynamically changing Leaflet map bounds in Angular?

Community
- 1
- 1

Marina Zubkova
- 95
- 1
- 2
- 7