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
baa64e8d
Commit
baa64e8d
authored
Dec 22, 2015
by
Alexander Basov
Browse files
Map layers. Fixed cookies
parent
db62af72
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/main/webapp/WEB-INF/jsp/accession/map.jsp
View file @
baa64e8d
...
...
@@ -187,19 +187,15 @@
})
}
};
var
cookieValue
=
cookieUtils
.
getCookie
(
'
mapProviders
'
)
||
'
MapQuest
'
;
[].
forEach
.
call
(
$
(
'
.label-map-provider
'
),
function
(
label
){
label
.
inner
Text
==
cookieUtils
.
getCookie
(
'
mapProviders
'
)
?
$
(
label
).
find
(
'
input:radio
'
).
prop
(
'
checked
'
,
true
)
label
.
inner
HTML
.
indexOf
(
cookieValue
)
>
1
?
$
(
label
).
find
(
'
input:radio
'
).
prop
(
'
checked
'
,
true
)
:
$
(
label
).
find
(
'
input:radio
'
).
prop
(
'
checked
'
,
false
);
});
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
);
}
mapProviders
[
cookieValue
].
addTo
(
map
);
topPane
.
appendChild
(
mapProviders
[
cookieValue
].
getContainer
());
mapProviders
[
cookieValue
].
setZIndex
(
0
);
$
(
document
).
on
(
'
cookieUpdate
'
,
function
()
{
for
(
var
key
in
mapProviders
)
{
map
.
removeLayer
(
mapProviders
[
key
]);
...
...
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