This is some kind of a hack-ish solution, but after the fitBounds
, you could zoom one level out, so you get enough padding for your markers.
Assume map
variable is your reference to the map object;
map.setZoom(map.getZoom() - 1);
This is some kind of a hack-ish solution, but after the fitBounds
, you could zoom one level out, so you get enough padding for your markers.
Assume map
variable is your reference to the map object;
map.setZoom(map.getZoom() - 1);