Add links to Kortrijk and Gent

This commit is contained in:
Robbe Van Herck 2019-12-13 15:39:42 +01:00
parent b5db3d5860
commit f11053024b
No known key found for this signature in database
GPG key ID: A66F76F7B81BD784
2 changed files with 16 additions and 1 deletions

View file

@ -98,6 +98,12 @@
<a href="http://schamper.be/"><img id="schamper" src="img/schamper.png"></a>
<a href="http://zeus.ugent.be/"><img id="zeus" src="img/zeus.png"></a>
</script>
<script id="city-select-template" type="text/x-handlebars-template">
<ul>
<li><a onclick="moveToCoords(51.0475378, 3.7261835, 13)">Gent</a></li>
<li><a onclick="moveToCoords(50.8276123, 3.2672309, 15)">Kortrijk</a></li>
</ul>
</script>
<script id="share-template" type="text/x-handlebars-template">
<div class="fb-share-button" data-href="//blok.ugent.be" data-layout="button_count"></div>
</script>

View file

@ -1,3 +1,4 @@
var map;
$(document).ready(function() {
/* change image path */
L.Icon.Default.imagePath = 'img';
@ -40,7 +41,7 @@ $(document).ready(function() {
return marker
}
var map = L.map('map').setView([51.0475378, 3.7261835], 13);
map = L.map('map').setView([51.0475378, 3.7261835], 13);
var osm = L.tileLayer('https://{s}.tiles.mapbox.com/v3/feliciaan.keoaj8d5/{z}/{x}/{y}{r}.png', {
attribution: '© <a href="https://www.mapbox.com/map-feedback/">Mapbox</a> | © <a href="https://www.openstreetmap.org/copyright" target="_blank">OpenStreetMap</a>-contributors | Made with ❤ by <a href="https://zeus.ugent.be">Zeus WPI</a>',
detectRetina: true
@ -163,6 +164,10 @@ $(document).ready(function() {
position: 'topright'
}).addTo(map);
var citySelect = new SimpleControl('#city-select-template', christmasHoliday ? "holiday-legend" : "legend", {
position: 'topleft'
}).addTo(map);
var sharePane = new SimpleControl('#share-template', 'info', {
position: 'bottomleft'
}).addTo(map);
@ -171,3 +176,7 @@ $(document).ready(function() {
position: 'bottomright'
}).addTo(map);
});
function moveToCoords(x, y, scale) {
map.setView([x, y], scale);
}