Skip to content
GitLab
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
cb384bb1
Commit
cb384bb1
authored
Mar 05, 2014
by
Matija Obreza
Browse files
Global map on entry page
parent
5cf3401c
Changes
5
Hide whitespace changes
Inline
Side-by-side
src/main/java/org/genesys2/server/servlet/controller/ExplorerController.java
View file @
cb384bb1
...
...
@@ -336,7 +336,7 @@ public class ExplorerController extends BaseController {
@RequestMapping
(
value
=
"/explore/map"
,
method
=
RequestMethod
.
GET
)
public
String
map
(
ModelMap
model
,
@RequestParam
(
value
=
"crop"
,
required
=
false
,
defaultValue
=
""
)
String
cropName
,
@RequestParam
(
value
=
"filter"
,
required
=
true
)
String
jsonFilter
)
{
@RequestParam
(
value
=
"filter"
,
required
=
false
,
defaultValue
=
"{}"
)
String
jsonFilter
)
{
ObjectNode
jsonTree
=
updateFilterWithCrop
(
cropName
,
jsonFilter
);
...
...
src/main/resources/content/language.properties
View file @
cb384bb1
...
...
@@ -389,6 +389,7 @@ oauth-client.active-tokens=List of tokens issued
maps.loading-map
=
Loading map...
maps.view-map
=
View map
maps.accession-map
=
Accession map
audit.createdBy
=
Created by {0}
audit.lastModifiedBy
=
Last updated by {0}
...
...
src/main/webapp/WEB-INF/jsp/accession/map.jsp
View file @
cb384bb1
...
...
@@ -4,11 +4,11 @@
<html>
<head>
<title><spring:message
code=
"accession
.page.data.title
"
/></title>
<title><spring:message
code=
"
maps.
accession
-map
"
/></title>
</head>
<body>
<h1>
<spring:message
code=
"accession
.page.data.title
"
/>
<spring:message
code=
"
maps.
accession
-map
"
/>
</h1>
<div
class=
"main-col-header"
>
...
...
@@ -33,7 +33,7 @@
opacity
:
0.6
}).
addTo
(
map
);
L
.
tileLayer
(
"
{s}/explore/tile/{z}/{x}/{y}?filter=
"
+
'
${jsonFilter}
'
,
{
attribution
:
"
Genesys
"
,
attribution
:
"
<a href='${props.baseUrl}'>
Genesys
</a>
"
,
styleId
:
22677
,
subdomains
:
[
$
{
props
.
tileserverCdn
}]
}).
addTo
(
map
);
...
...
src/main/webapp/WEB-INF/jsp/index.jsp
View file @
cb384bb1
...
...
@@ -98,6 +98,13 @@
</div>
</div>
</c:if>
<div
class=
"content-block"
>
<h2><spring:message
code=
"maps.accession-map"
/></h2>
<div
class=
"blurp"
>
<div
id=
"globalmap"
class=
"gis-map"
></div>
</div>
</div>
</div>
</div>
<content
tag=
"javascript"
>
...
...
@@ -114,6 +121,25 @@
messages
:
{
noResults
:
''
,
results
:
function
()
{}
},
select
:
function
(
event
,
ui
)
{
document
.
location
.
pathname
=
'
/acn/t/
'
+
ui
.
item
.
value
;
}
});
});
$
(
"
#globalmap
"
).
on
(
"
click
"
,
function
(
e
)
{
e
.
preventDefault
();
window
.
location
=
'
<c:url
value=
"/explore/map"
/>
'
;
});
var
map
=
L
.
map
(
'
globalmap
'
,
{
minZoom
:
0
,
maxZoom
:
0
,
dragging
:
false
,
zoomControl
:
false
,
keyboard
:
false
}).
setView
([
20
,
0
],
0
);
L
.
tileLayer
(
'
https://otile{s}-s.mqcdn.com/tiles/1.0.0/sat/{z}/{x}/{y}.png
'
,
{
attribution
:
"
MapQuest
"
,
styleId
:
22677
,
noWrap
:
true
,
subdomains
:
[
'
1
'
,
'
2
'
,
'
3
'
,
'
4
'
],
opacity
:
0.6
}).
addTo
(
map
);
L
.
tileLayer
(
"
{s}/explore/tile/{z}/{x}/{y}?filter={}
"
,
{
attribution
:
"
<a href='${props.baseUrl}'>Genesys</a>
"
,
styleId
:
22677
,
noWrap
:
true
,
subdomains
:
[
$
{
props
.
tileserverCdn
}]
}).
addTo
(
map
);
});
</script>
</content>
...
...
src/main/webapp/html/css/custom.css
View file @
cb384bb1
...
...
@@ -1860,3 +1860,9 @@ html[dir="rtl"] ul.statistics .stats-number {
font-weight
:
bold
;
margin-bottom
:
1px
;
}
#globalmap
.gis-map
{
max-width
:
250px
;
height
:
180px
;
margin-top
:
0
;
}
\ No newline at end of file
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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