don't load tiles outside of bounds
This commit is contained in:
parent
a39b3e0536
commit
38a63c5a6a
1 changed files with 3 additions and 1 deletions
|
@ -13,7 +13,9 @@ c3nav = {
|
|||
});
|
||||
c3nav.map.fitBounds(c3nav.bounds, {padding: [30, 50]});
|
||||
L.control.scale({imperial: false}).addTo(c3nav.map);
|
||||
L.tileLayer('/map/7/{z}/{x}/{y}.png').addTo(c3nav.map);
|
||||
L.tileLayer('/map/7/{z}/{x}/{y}.png', {
|
||||
bounds: c3nav.bounds
|
||||
}).addTo(c3nav.map);
|
||||
}
|
||||
};
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue