Hi there,
I have a prblem with maxBounds and setView; after setting MaxBounds in my map I used setView in order to zoom to a certain layer, when active. Everything works, except that the layer activated is not center in the map as you can see here:
Here is part of the code:http://lucamoiana.github.io/MDR/index.html
map.setMaxBounds(lungo.getBounds(), {
padding: [500, 500]
});
map.on('layerremove', function(e) {
if (map.hasLayer(chiusuratraffico) == false) {
map.setView([45.642, 8.954], 14);
};
});