don't load tiles outside of bounds
@@ -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);
}
};
