Fit bounds in which popups will be in vieweble area (Leaflet)

Viewed 20

I have markers with popups and I want fitBounds that markers popups always be in the viewable area.


I have an option to make fitBounds with padding but I have an issue that padding is discrete.

It mean when i set {padding:[0,0]} and {padding:[30,30]} I see the same picture like it was with padding = 0.

It starts changing when I increase values (not always) but it does not meet my needs because it set big padding.

Check it at http://jsfiddle.net/BC7q4/444/


Maybe there are some other solutions? Or how Can I change padding more precisely?

0 Answers
Related