Combine getBounds and maxBounds

12 views
Skip to first unread message

Luca Moiana

unread,
Feb 8, 2016, 11:11:48 AM2/8/16
to Leaflet
Hi, 

what I thought it was an easy task, it's becoming a nightmare:

I want to set my maxBounds on the extent of my var lungo.

I can't find a way to have maxBounds working.

any example on that?

Luca Moiana

unread,
Feb 10, 2016, 11:07:39 AM2/10/16
to Leaflet
SOLVED:

map.setMaxBounds(LAYER.getBounds(), {
    padding: [150, 150]
});
Reply all
Reply to author
Forward
0 new messages