Restrict viewable map area area

This commit is contained in:
Arne Schlüter 2015-02-07 21:09:37 +01:00
commit 611b97510b

View file

@ -9,6 +9,10 @@
var layer = new L.StamenTileLayer('toner-lite');
map.addLayer(layer);
// restrict viewable area
map.setMaxBounds(map.getBounds());
map.options.minZoom = map.getZoom();
// get response from server and draw the map
var response;
$.getJSON('/articles/')