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
Genesys PGR
Genesys Backend
Commits
cff88353
Commit
cff88353
authored
Dec 03, 2015
by
Alexander Basov
Browse files
fixed map layer's order
parent
f53dd92e
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/main/webapp/WEB-INF/jsp/accession/map.jsp
View file @
cff88353
...
...
@@ -113,6 +113,7 @@
jQuery
(
document
).
ready
(
function
()
{
var
map
=
L
.
map
(
'
map
'
).
setView
([
20
,
0
],
2
);
var
topPane
=
map
.
_createPane
(
'
leaflet-top-pane
'
,
map
.
getPanes
().
mapPane
);
var
mapProviders
=
{
Openstreetmap
:
L
.
tileLayer
(
'
https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png
'
,
{
attribution
:
'
© <a href="http://www.openstreetmap.org/copyright">OpenStreetMap</a>
'
...
...
@@ -188,8 +189,12 @@
};
if
(
cookieUtils
.
getCookie
(
'
mapProviders
'
)
&&
cookieUtils
.
getCookie
(
'
mapProviders
'
)
!=
''
)
{
mapProviders
[
cookieUtils
.
getCookie
(
'
mapProviders
'
)].
addTo
(
map
);
topPane
.
appendChild
(
mapProviders
[
cookieUtils
.
getCookie
(
'
mapProviders
'
)].
getContainer
());
mapProviders
[
cookieUtils
.
getCookie
(
'
mapProviders
'
)].
setZIndex
(
0
);
}
else
{
mapProviders
.
MapQuest
.
addTo
(
map
);
topPane
.
appendChild
(
mapProviders
[
cookieUtils
.
getCookie
(
'
mapProviders
'
)].
getContainer
());
mapProviders
.
MapQuest
.
setZIndex
(
0
);
}
$
(
document
).
on
(
'
cookieUpdate
'
,
function
()
{
for
(
var
key
in
mapProviders
)
{
...
...
@@ -197,8 +202,12 @@
}
if
(
cookieUtils
.
getCookie
(
'
mapProviders
'
))
{
mapProviders
[
cookieUtils
.
getCookie
(
'
mapProviders
'
)].
addTo
(
map
);
topPane
.
appendChild
(
mapProviders
[
cookieUtils
.
getCookie
(
'
mapProviders
'
)].
getContainer
());
mapProviders
[
cookieUtils
.
getCookie
(
'
mapProviders
'
)].
setZIndex
(
0
);
}
else
{
mapProviders
.
MapQuest
.
addTo
(
map
);
topPane
.
appendChild
(
mapProviders
[
cookieUtils
.
getCookie
(
'
mapProviders
'
)].
getContainer
());
mapProviders
.
MapQuest
.
setZIndex
(
0
);
}
});
$
(
"
body
"
).
on
(
"
click
"
,
"
.map-provider
"
,
function
(
e
)
{
...
...
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