summaryrefslogtreecommitdiff
path: root/assets
diff options
context:
space:
mode:
authorhellekin <hellekin@cepheide.org>2018-11-27 15:22:57 +0100
committerhellekin <hellekin@cepheide.org>2018-11-27 15:28:08 +0100
commita6b7f3bfdca16210032f9a6757505b410f20a413 (patch)
treece7fa991000d18269a5f0ad614dcdbe1e7c80954 /assets
parent889ed973048106b4119e918c3acd9191082c5aef (diff)
downloadwallonie-demain-proto-a6b7f3bfdca16210032f9a6757505b410f20a413.tar.gz
Re-add 699 markersHEADmaster
Diffstat (limited to 'assets')
-rw-r--r--assets/mapper.js25
1 files changed, 13 insertions, 12 deletions
diff --git a/assets/mapper.js b/assets/mapper.js
index eef87ab..ad419d0 100644
--- a/assets/mapper.js
+++ b/assets/mapper.js
@@ -24,7 +24,7 @@ const Categories = [
{"name":"GASAP (groupes d'achat)", "id":27},
{"name":"GASAP (producteurs)", "id":185}
], "color":"#FF9200"},
-
+
{"id":11, "name":"2. Se laver, s'habiller", "subcategories":[
{"name":"Boîtes à dons", "id":210},
{"name":"Vestiaires sociaux", "id":156},
@@ -32,7 +32,7 @@ const Categories = [
{"name":"Douches publiques", "id":144},
{"name":"Friperies, vêtements de 2ème main", "id":104}
], "color":"#FFEB00"},
-
+
{"id":10, "name":"3. Guérir, se soigner", "subcategories":[
{"name":"Maisons médicales", "id":18},
{"name":"Réseaux de santé", "id":145},
@@ -40,6 +40,7 @@ const Categories = [
], "color":"#7CFB80"},
{"id":15, "name":"4. Recycler, réparer", "subcategories":[
+ {"name":"Magasins de seconde main", "id":699},
{"name":"Ateliers de travail du bois", "id":138},
{"name":"Récup' de cartouches d'imprimantes", "id":136},
{"name":"Boîtes à livres", "id":50},
@@ -79,7 +80,7 @@ const Categories = [
{"name":"Associations pour l'égalité des genres", "id":202},
{"name":"Centres communautaires NL", "id":204},
{"name":"Initiatives de récup' alimentaire", "id":201},
- {"name":"Soutien aux personnes précaires", "id":193},
+ {"name":"Soutien aux personnes précaires", "id":193},
{"name":"Systèmes d'échange locaux (SEL)", "id":184}
], "color":"#C6B117"},
@@ -189,7 +190,7 @@ function navSetup() {
} else {
showActiveCategoryMarkers(c.id)
}
- $(this).toggleClass('active')
+ $(this).toggleClass('active')
})
.append(listSections(c.subcategories))
ul.append(li)
@@ -223,7 +224,7 @@ function listSections(sections) {
return ul
}
-//
+//
function toggleMarkers(sec_id) {
var section = $('#s-' + sec_id)
if (section.hasClass('on-map')) {
@@ -422,7 +423,7 @@ function markerFor(data) {
var marker = L.marker([data.lat, data.lon], {
title: data.name,
alt: data.type + ' marker ' + data.id,
-
+
})
// Override pre-made popup data
data.popup = markerPopupFor(data)
@@ -447,7 +448,7 @@ function iconFor(data) {
var icon = new L.Icon({
iconUrl: asset_uri + 'img/marker-' + cat_id + '.png',
- iconAnchor: new L.Point(16, 16),
+ iconAnchor: new L.Point(16, 16),
})
}
@@ -473,7 +474,7 @@ function categoryHasSectionsOnMap(cat_id) {
var s = selected_sections()
s.forEach(function(s) {
console.log(s)
-
+
})
}
@@ -484,7 +485,7 @@ function current_state() {
var s = selected_sections();
console.log('current_state: ' + [ c.lat, c.lng, z, s ]);
-
+
return [ c.lat, c.lng, z, s ];
}
@@ -539,7 +540,7 @@ function renderAttribution() {
}
return Mustache.render(template, { data: attribution })
}
-
+
/*
function show_markers(sec_id) {
@@ -641,7 +642,7 @@ $(document).ready(function() {
attribution.addTo(map)
mcg.addTo(map)
-
+
navSetup()
var btnLocate = $('<button>')
@@ -662,7 +663,7 @@ $(document).ready(function() {
.removeClass('icon-menu-on').addClass('icon-menu-off')
aside.css('display', 'none')
$('#map .leaflet-top.leaflet-left').css('left', 0)
- } else {
+ } else {
btnToggle
.removeClass('icon-menu-off').addClass('icon-menu-on')
$('#map .leaflet-top.leaflet-left').css('left', '20rem')