Commit c9df0150 authored by Elias Englmeier's avatar Elias Englmeier
Browse files

added fields to map

parent ccd5bd43
......@@ -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
......@@ -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
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment