diff --git a/Arteveldehogeschool.png b/Arteveldehogeschool.png new file mode 100644 index 0000000..10538e1 Binary files /dev/null and b/Arteveldehogeschool.png differ diff --git a/Odisee.png b/Odisee.png new file mode 100644 index 0000000..6347a43 Binary files /dev/null and b/Odisee.png differ diff --git a/Stad Gent.png b/Stad Gent.png new file mode 100644 index 0000000..7a1ee35 Binary files /dev/null and b/Stad Gent.png differ diff --git a/UGent.png b/UGent.png new file mode 100644 index 0000000..bbebcb1 Binary files /dev/null and b/UGent.png differ diff --git a/data.json b/data.json new file mode 100644 index 0000000..03a6ea9 --- /dev/null +++ b/data.json @@ -0,0 +1,409 @@ +[{ + "type": "Feature", + "geometry": { + "type": "Point", + "coordinates": [3.726759, 51.045660] + }, + "properties": { + "name": "Studentenrestaurant De Brug", + "address": "Sint-Pietersnieuwstraat 45", + "capacity": 700, + "period": { "start": "05/01/2015", "end": "23/01/2015" }, + "hours": { + "monday": "8u - 22u", + "tuesday": "8u - 22u", + "wednesday": "8u - 22u", + "thursday": "8u - 22u", + "friday": "8u - 22u", + "saturday": false, + "sunday": false + }, + "extra": "2 aparte zaaltjes doorlopend beschikbaar (120 plaatsen). Restaurant (1ste en 2de verdieping) gesloten tussen 11u15 en 14u en na 17u", + "type": "UGent" + } +}, +{ + "type": "Feature", + "geometry": { + "type": "Point", + "coordinates": [3.728294, 51.039980] + }, + "properties": { + "name": "Studentenrestaurant Kantienberg", + "address": "Stalhof 45", + "capacity": 600, + "period": { "start": "05/01/2015", "end": "23/01/2015" }, + "hours": { + "monday": false, + "tuesday": false, + "wednesday": false, + "thursday": false, + "friday": false, + "saturday": "8u30 - 22u", + "sunday": "8u30 - 22u" + }, + "extra": "Enkel weekend, kerstverlof en feestdagen,Registratie noodzakelijk! Registreer hier. Vanaf 9u kunnen studenten zonder registratie toegang krijgen.", + "type": "UGent" + } +}, +{ + "type": "Feature", + "geometry": { + "type": "Point", + "coordinates": [ 3.724770, 51.045507 ] + }, + "properties": { + "name": "Faculteit Letteren en Wijsbegeerte, faculteitsbibliotheek, vleugels Magnel & Loveling", + "address": "Rozier 44", + "capacity": 580, + "period": { "start": "24/11/2014", "end": "30/01/2014" }, + "hours": { + "monday": "9u - 20u", + "tuesday": "9u - 20u", + "wednesday": "9u - 20u", + "thursday": "9u - 20u", + "friday": "9u - 17u", + "saturday": false, + "sunday": false + }, + "extra": "Toegangkelijk voor iedereen. Gesloten tijdens het kerstverlof", + "type": "UGent" + } +}, +{ + "type": "Feature", + "geometry": { + "type": "Point", + "coordinates": [3.727952, 51.044599] + }, + "properties": { + "name": "Blok@Therminal", + "address": "Hoveniersberg 24", + "capacity": 300, + "period": { "start": "18/08/2014", "end": "12/09/2014" }, + "hours": { + "monday": "8u30 - 22u", + "tuesday": "8u30 - 22u", + "wednesday": "8u30 - 22u", + "thursday": "8u30 - 22u", + "friday": "8u30 - 22u", + "saturday": "8u30 - 22u", + "sunday": "8u30 - 22u" + }, + "extra": "Registratie noodzakelijk! Registreer hier. Vanaf 9u kunnen studenten zonder registratie toegang krijgen.", + "type": "UGent" + } +}, +{ + "type": "Feature", + "geometry": { + "type": "Point", + "coordinates": [3.723510, 51.052041] + }, + "properties": { + "name": "Blok@Aula", + "address": "Volderstraat 9", + "capacity": 210, + "period": { "start": "20/12/2014", "end": "23/01/2015" }, + "hours": { + "monday": "8u30 - 22u", + "tuesday": "8u30 - 22u", + "wednesday": "8u30 - 22u", + "thursday": "8u30 - 22u", + "friday": "8u30 - 22u", + "saturday": "8u30 - 22u", + "sunday": "8u30 - 22u" + }, + "extra": "Registratie noodzakelijk! Registreer hier. Vanaf 9u kunnen studenten zonder registratie toegang krijgen. Sluitingsdagen: 25/12, 01/01, 3/01, 4/01, 5/01,6/01, 13/01 en 20/01.
24/12 en 31/12: 8u-16u", + "type": "UGent" + } +}, +{ + "type": "Feature", + "geometry": { + "type": "Point", + "coordinates": [3.702897, 51.031507] + }, + "properties": { + "name": "BYTES & BOOKS @ gebouw D", + "address": "Openleercentrum campus Schoonmeersen", + "capacity": 444, + "period": { "start": "15/12/2014", "end": "30/01/2015" }, + "hours": { + "monday": "8u - 21u45*", + "tuesday": "8u - 21u45", + "wednesday": "8u - 21u45", + "thursday": "8u - 21u45", + "friday": "8u - 16u45*", + "saturday": false, + "sunday": false + }, + "extra": "Toegankelijk voor alle Gentse studenten. * Tot 19/12 gewone openingsuren, op 29/12, 30/12 en 2/01 open van 8u-16u45 en op31/12 open van 8u – 12u45", + "type": "hogent" + } +}, +{ + "type": "Feature", + "geometry": { + "type": "Point", + "coordinates": [3.702700, 51.031201] + }, + "properties": { + "name": "Resto D als blokruimte", + "address": "Openleercentrum campus Schoonmeersen", + "capacity": 250, + "period": { "start": "03/01/2015", "end": "25/01/2015" }, + "hours": { + "monday": false, + "tuesday": false, + "wednesday": false, + "thursday": false, + "friday": false, + "saturday": "8u - 18u", + "sunday": "8u - 18u" + }, + "extra": "Tijdens het weekend enkel HoGent en UGent studenten in bezit van campuskaart Schoonmeersen", + "type": "hogent" + } +}, +{ + "type": "Feature", + "geometry": { + "type": "Point", + "coordinates": [3.724278, 51.036589] + }, + "properties": { + "name": "BYTES & BOOKS LERA", + "address": "K.L. Ledeganckstraat 8", + "capacity": 110, + "period": { "start": "15/12/2014", "end": "30/01/2015" }, + "hours": { + "monday": "8u15 - 18u", + "tuesday": "8u15 - 18u", + "wednesday": "8u15 - 18u", + "thursday": "8u15 - 18u", + "friday": "8u15 - 18u", + "saturday": false, + "sunday": false + }, + "extra": "Toegankelijk voor alle Gentse studenten.", + "type": "hogent" + } +}, +{ + "type": "Feature", + "geometry": { + "type": "Point", + "coordinates": [3.726827, 51.019702] + }, + "properties": { + "name": "BYTES & BOOKS VESALIUS", + "address": "Keramiekstraat 80", + "capacity": 58, + "period": { "start": "05/01/2014", "end": "30/01/2015" }, + "hours": { + "monday": "9u - 17u", + "tuesday": "9u - 18u", + "wednesday": "9u - 11u30
12u45 - 16u45", + "thursday": "9u - 18u", + "friday": "9u - 17u", + "saturday": false, + "sunday": false + }, + "extra": "Toegankelijk voor alle Gentse studenten.", + "type": "hogent" + } +}, +{ + "type": "Feature", + "geometry": { + "type": "Point", + "coordinates": [3.718445, 51.045588] + }, + "properties": { + "name": "BYTES & BOOKS BIJLOKE", + "address": "J. Kluyskensstraat 2", + "capacity": 44, + "period": { "start": "05/01/2014", "end": "30/01/2015" }, + "hours": { + "monday": "8u30 - 17u", + "tuesday": "8u30 - 17u", + "wednesday": "8u30 - 17u", + "thursday": "8u30 - 17u", + "friday": "9u - 16u30", + "saturday": false, + "sunday": false + }, + "extra": "Toegankelijk voor alle Gentse studenten.", + "type": "hogent" + } +}, +{ + "type": "Feature", + "geometry": { + "type": "Point", + "coordinates": [3.726340, 51.054186] + }, + "properties": { + "name": "BYTES & BOOKS CONSERVATORIUM", + "address": "Hoogpoort 64", + "capacity": 15, + "period": { "start": "05/01/2014", "end": "30/01/2015" }, + "hours": { + "monday": "10u - 12u30
13u - 16u15", + "tuesday": "10u - 12u30
13u - 16u15", + "wednesday": "10u - 12u30
13u - 16u15", + "thursday": "10u - 12u", + "friday": "10u - 12u30
13u - 16u15", + "saturday": false, + "sunday": false + }, + "extra": "Toegankelijk voor alle Gentse studenten.", + "type": "hogent" + } +}, +{ + "type": "Feature", + "geometry": { + "type": "Point", + "coordinates": [3.746496, 51.038855] + }, + "properties": { + "name": "BYTES & BOOKS MELLE", + "address": "Brusselsesteenweg 161", + "capacity": 50, + "period": { "start": "05/01/2014", "end": "30/01/2015" }, + "hours": { + "monday": "9u - 12u30
13u - 17u", + "tuesday": "8u30u - 12u30
13u - 17u", + "wednesday": "9u - 12u30
13u - 17u", + "thursday": "8u - 12u
12u30 - 17u", + "friday": "8u - 12u
12u30 - 17u", + "saturday": false, + "sunday": false + }, + "extra": "Toegankelijk voor alle Gentse studenten.", + "type": "hogent" + } +}, +{ + "type": "Feature", + "geometry": { + "type": "Point", + "coordinates": [3.728505, 51.040832] + }, + "properties": { + "name": "Mediatheek campus Kantienberg", + "address": "Voetweg 66", + "capacity": 190, + "period": { "start": "05/01/2015", "end": "06/02/2015" }, + "hours": { + "monday": "9u - 17u", + "tuesday": "9u - 17u", + "wednesday": "9u - 17u", + "thursday": "9u - 17u", + "friday": "9u - 16u", + "saturday": false, + "sunday": false + }, + "extra": "Gesloten op 16 januari. Toegankelijk voor alle Gentse studenten. 40 stille plaatsen.", + "type": "Arteveldehogeschool" + } +}, +{ + "type": "Feature", + "geometry": { + "type": "Point", + "coordinates": [ 3.719359, 51.042548 ] + }, + "properties": { + "name": "Studentenhuis - Persellezaal", + "address": "Kortrijksepoortstraat 254", + "capacity": 20, + "period": { "start": "05/01/2015", "end": "06/02/2015" }, + "hours": { + "monday": "9u - 21u", + "tuesday": "9u - 21u", + "wednesday": "9u - 21u", + "thursday": "9u - 21u", + "friday": "9u - 21u", + "saturday": false, + "sunday": false + }, + "extra": "Ingang door groen poortje", + "type": "Arteveldehogeschool" + } +}, +{ + "type": "Feature", + "geometry": { + "type": "Point", + "coordinates": [3.708694, 51.061123] + }, + "properties": { + "name": "Bibliotheek", + "address": "Gebr. Desmetstraat 1", + "capacity": 50, + "period": { "start": "12/01/2015", "end": "30/01/2015" }, + "hours": { + "monday": "8u30 - 17u30", + "tuesday": "8u30 - 17u30", + "wednesday": "8u30 - 17u30", + "thursday": "8u30 - 17u30", + "friday": "9u - 16u", + "saturday": false, + "sunday": false + }, + "type": "Odisee", + "extra": false + } +}, +{ + "type": "Feature", + "geometry": { + "type": "Point", + "coordinates": [3.726730, 51.042146] + }, + "properties": { + "name": "Sint-Pietersabdij Kapittelzaal", + "address": "Sint-Pietersabdij Kapittelzaal", + "capacity": 60, + "period": { "start": "16/12/2014", "end": "30/01/2015" }, + "hours": { + "monday": false, + "tuesday": "10u - 18u", + "wednesday": "10u - 18u", + "thursday": "10u - 18u", + "friday": "10u - 18u", + "saturday": "10u - 18u", + "sunday": "10u - 18u" + }, + "extra": "Gesloten op 24, 25, 31/12 en 1/01.", + "type": "Stad Gent" + } +}, +{ + "type": "Feature", + "geometry": { + "type": "Point", + "coordinates": [3.731393, 51.047282] + }, + "properties": { + "name": "Openbare Bibliotheek Zuid", + "address": "Achilles Musschezaal", + "capacity": 100, + "period": { "start": "18/08/2014", "end": "12/09/2014" }, + "hours": { + "monday": "10u - 18u45", + "tuesday": "10u - 18u45", + "wednesday": "10u - 18u45", + "thursday": "10u - 18u45", + "friday": "8u30 - 16u45", + "saturday": "8u30 - 16u45", + "sunday": false + }, + "extra": "Kerstverlof: 23/12 - 3/1: open 10u - 16u45 en niet beschikbaar op 18/12 (voormiddag), 25 en 26/12, 1 en 2/01, 14/01 (voormiddag)", + "type": "Stad Gent" + } +} +] diff --git a/hogent.png b/hogent.png new file mode 100644 index 0000000..0af8e52 Binary files /dev/null and b/hogent.png differ diff --git a/index.html b/index.html index d4e1eb0..5965d0e 100644 --- a/index.html +++ b/index.html @@ -5,6 +5,6 @@ Blokken in Gent - + diff --git a/map.css b/map.css index 3b7a2bf..2eda086 100644 --- a/map.css +++ b/map.css @@ -10,10 +10,116 @@ html, body { height: 100%; } -.gmnoprint, .gm-style-cc { - display: none; -} - -#resto-popup { +.leaflet-popup-content-wrapper, +.leaflet-control-zoom { border-radius: 0px; } + +.leaflet-popup-content-wrapper { + width: 600px; + max-height: 400px; + overflow-y:auto +} + +.leaflet-popup-content { + width:auto !important; +} + +a img { + border: none; +} + +h4 { + margin-top: 5px; + margin-bottom: 5px; +} + +table { + padding-bottom: 10px; + border-spacing: 0; + width: 100% +} + +.desktop tr td { + padding-right: 5px; + width: 75; + vertical-align: top; +} + +.mobile tr td:first-child { + padding: 0; + padding-right: 10px; +} + +.mobile tr:nth-child(2n) { + background: rgb(244,244,244); +} + +.info { + padding: 6px 8px; + font: 14px/16px Arial, Helvetica, sans-serif; + background: white; + background: rgba(255,255,255,0.0); +} + +#zeus { + padding-left: 10px; +} + +.legend { + + height: 52px; + width: 130px; + background-color: #fff; + box-shadow: 0 1px 5px rgba(0,0,0,0.65); +} + +.type { + position: absolute; + top: 15px; + right: 15px; +} + + +.mobile { + display: none; +} + +@media screen and (max-width: 1000px) { + .leaflet-popup-content-wrapper { + width: 250px; + } + + .desktop { + display: none; + } + + .mobile { + display: block; + width: 213px; + } + + h3, .text { + max-width: 150px; + } +} + +@media screen and (max-width: 800px) { + .info { + max-width: 90px;s + } + + #schamper { + width: 90px; + } + + #zeus { + width: 75px; + } +} + +@media screen and (max-height: 400px) { + .leaflet-popup-content-wrapper { + max-height: 150px; + } +} diff --git a/map.html b/map.html index 8597606..ce0c5d9 100644 --- a/map.html +++ b/map.html @@ -2,83 +2,132 @@ - Blokken in Gent + Bloklocaties in Gent + + + + + + + + + + + + + + + + + - - - + +
+ + + - + + diff --git a/map.js b/map.js new file mode 100644 index 0000000..3cc43c9 --- /dev/null +++ b/map.js @@ -0,0 +1,67 @@ +$(document).ready(function() { + var popuptemplate = Handlebars.compile($('#popup-template').html()); + var RedIcon = L.Icon.Default.extend({ + options: { + iconUrl: 'red-marker.png' + } + }); + var redIcon = new RedIcon(); + var BlueIcon = L.Icon.Default.extend({}); + var blueIcon = new BlueIcon(); + + function onEachFeature(feature, layer) { + if (feature.properties) { + layer.bindPopup(popuptemplate(feature.properties)); + } + } + + function pointToLayer(feature, latlng) { + if (feature.properties) { + if (!feature.properties.hours.saturday && !feature.properties.hours.sunday) { + return L.marker(latlng, {icon:blueIcon}); + } + } + return L.marker(latlng, {icon: redIcon}); + } + + var 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}.png', { + attribution: 'Mapbox | Made with ❤ by Zeus WPI' + }).addTo(map); + + $.getJSON('data.json') + .done(function(data) { + var geojson = L.geoJson(data, { + onEachFeature: onEachFeature, + pointToLayer: pointToLayer + }); + map.addLayer(geojson); + }); + + var SimpleControl = L.Control.extend({ + initialize: function(templateId, divClass, options) { + this.template = Handlebars.compile($(templateId).html()); + this.divClass = divClass; + L.Util.setOptions(this, options); + }, + + onAdd: function (map) { + this._div = L.DomUtil.create('div', this.divClass); + this._div.innerHTML = this.template(); + + return this._div; + } + }); + + var info = new SimpleControl('#info-template', 'info', { + position: 'topright' + }).addTo(map); + + var sharePane = new SimpleControl('#share-template', 'info', { + position: 'bottomleft' + }).addTo(map); + + var legend = new SimpleControl('#legend-template', 'legend', { + position: 'bottomright' + }).addTo(map); +}); diff --git a/red-marker.png b/red-marker.png new file mode 100644 index 0000000..364ac35 Binary files /dev/null and b/red-marker.png differ diff --git a/schamper.png b/schamper.png new file mode 100644 index 0000000..063b713 Binary files /dev/null and b/schamper.png differ diff --git a/share.jpg b/share.jpg new file mode 100644 index 0000000..c93cf88 Binary files /dev/null and b/share.jpg differ diff --git a/zeus.png b/zeus.png new file mode 100644 index 0000000..43817fb Binary files /dev/null and b/zeus.png differ