Closed ValentinH closed 9 years ago
There is a way, use leafletData to get the map instance and then set fitBounds. There might not be a current angular way to do it.
The goal is to declare it like this in my controller:
{
markers: {}
bounds: {
northEast: {},
southWest: {},
options: {
padding: [50, 50]
}
}
}
Ok, feel free to look at the leaflet.js directive and add it in and make a PR.
Ok I'm doing it
In Leaflet, the fitBounds is defined like this:
http://leafletjs.com/reference.html#map-fitboundsoptions but in this directive, there is no way (AFAIK) to specify these options.
Do you think it would be a good idea to support this? I can try to make a pull request.