Commit b26b232f authored by Elias Englmeier's avatar Elias Englmeier
Browse files

better bounds

parent 02e651dd
......@@ -25,8 +25,16 @@
$(document).ready(function(){
//init the map
var map = L.map('map').setView([51.312066, 9.492901],12);
map.setMaxBounds(map.getBounds());
map.options.minZoom = 11;
var southWest = L.latLng(51.18994825699286, 9.743328094482424),
northEast = L.latLng(51.455778558471586, 9.244995117187502);
var bounds = L.latLngBounds(southWest, northEast);
map.setMaxBounds(bounds);
map.on('drag', function() {
map.panInsideBounds(bounds, { animate: false });
});
map.options.minZoom = 12;
var wmsUrl = 'https://geoportal.stadt-kassel.de/arcgis/services/Raster/Geoportal_WebMaps_WGS84/MapServer/WMSServer?';
L.tileLayer.wms(wmsUrl,{
layers:'1:4.514,1:9.028,1:18.056,1:36.112,1:72.224,1:144.448,1:288.895'
......
......@@ -25,8 +25,16 @@
$(document).ready(function(){
//init the map
var map = L.map('map').setView([51.312066, 9.492901],12);
map.setMaxBounds(map.getBounds());
map.options.minZoom = 11;
var southWest = L.latLng(51.18994825699286, 9.743328094482424),
northEast = L.latLng(51.455778558471586, 9.244995117187502);
var bounds = L.latLngBounds(southWest, northEast);
map.setMaxBounds(bounds);
map.on('drag', function() {
map.panInsideBounds(bounds, { animate: false });
});
map.options.minZoom = 12;
var wmsUrl = 'https://geoportal.stadt-kassel.de/arcgis/services/Raster/Geoportal_WebMaps_WGS84/MapServer/WMSServer?';
L.tileLayer.wms(wmsUrl,{
layers:'1:4.514,1:9.028,1:18.056,1:36.112,1:72.224,1:144.448,1:288.895'
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment