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
civitas-digitalis
platform
Commits
c9df0150
Commit
c9df0150
authored
Apr 26, 2018
by
Elias Englmeier
Browse files
added fields to map
parent
ccd5bd43
Changes
2
Hide whitespace changes
Inline
Side-by-side
modules/MapModule/bin/META-INF/resources/view.jsp
View file @
c9df0150
...
...
@@ -42,17 +42,17 @@ $(document).ready(function(){
markerGroup
.
addLayer
(
loadedMarker
);
loadedMarker
.
dbId
=
value
.
id
;
loadedMarker
.
bindTooltip
(
value
.
title
).
openTooltip
();
loadedMarker
.
bindPopup
(
getMarkerPopUp
(
value
.
id
,
value
.
title
,
value
.
shortdescription
,
value
.
pageUrl
));
loadedMarker
.
bindPopup
(
getMarkerPopUp
(
value
.
id
,
value
.
title
,
value
.
userName
,
value
.
pageUrl
,
value
.
rating
));
map
.
addLayer
(
loadedMarker
);
//map.panTo(latlng);
}
});
map
.
fitBounds
(
markerGroup
.
getBounds
().
pad
(
0.5
));
}
else
{
map
.
setView
([
51.312066
,
9.492901
],
12
)
}
function
getMarkerPopUp
(
id
,
title
,
description
,
link
){
return
"
<h4>
"
+
title
+
"
</h4>
"
+
"
<p>
"
+
description
+
"
</p><br>
"
+
"
<a href=
"
+
link
+
"
>Goto</a>
"
;
function
getMarkerPopUp
(
id
,
title
,
username
,
link
,
votes
){
var
votescount
=
votes
.
split
(
"
,
"
);
return
"
<h4>
"
+
title
+
"
</h4>
"
+
"
<p> Eingereicht von
"
+
username
+
"
</p>
"
+
"
<p> Stimmen:
"
+
votescount
.
length
+
"
</p><br>
"
+
"
<a href=
"
+
link
+
"
>Details</a>
"
;
}
});
</script>
\ No newline at end of file
modules/MapModule/src/main/resources/META-INF/resources/view.jsp
View file @
c9df0150
...
...
@@ -42,17 +42,17 @@ $(document).ready(function(){
markerGroup
.
addLayer
(
loadedMarker
);
loadedMarker
.
dbId
=
value
.
id
;
loadedMarker
.
bindTooltip
(
value
.
title
).
openTooltip
();
loadedMarker
.
bindPopup
(
getMarkerPopUp
(
value
.
id
,
value
.
title
,
value
.
shortdescription
,
value
.
pageUrl
));
loadedMarker
.
bindPopup
(
getMarkerPopUp
(
value
.
id
,
value
.
title
,
value
.
userName
,
value
.
pageUrl
,
value
.
rating
));
map
.
addLayer
(
loadedMarker
);
//map.panTo(latlng);
}
});
map
.
fitBounds
(
markerGroup
.
getBounds
().
pad
(
0.5
));
}
else
{
map
.
setView
([
51.312066
,
9.492901
],
12
)
}
function
getMarkerPopUp
(
id
,
title
,
description
,
link
){
return
"
<h4>
"
+
title
+
"
</h4>
"
+
"
<p>
"
+
description
+
"
</p><br>
"
+
"
<a href=
"
+
link
+
"
>Goto</a>
"
;
function
getMarkerPopUp
(
id
,
title
,
username
,
link
,
votes
){
var
votescount
=
votes
.
split
(
"
,
"
);
return
"
<h4>
"
+
title
+
"
</h4>
"
+
"
<p> Eingereicht von
"
+
username
+
"
</p>
"
+
"
<p> Stimmen:
"
+
votescount
.
length
+
"
</p><br>
"
+
"
<a href=
"
+
link
+
"
>Details</a>
"
;
}
});
</script>
\ 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