Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
civitas-digitalis
platform
Commits
b26b232f
Commit
b26b232f
authored
May 04, 2018
by
Elias Englmeier
Browse files
better bounds
parent
02e651dd
Changes
2
Hide whitespace changes
Inline
Side-by-side
modules/MapModule/bin/META-INF/resources/view.jsp
View file @
b26b232f
...
...
@@ -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
'
...
...
modules/MapModule/src/main/resources/META-INF/resources/view.jsp
View file @
b26b232f
...
...
@@ -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
'
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment