diff --git a/couches/poubelles.geojson b/couches/poubelles.geojson index ac99b1f..52058e5 100644 --- a/couches/poubelles.geojson +++ b/couches/poubelles.geojson @@ -6,6 +6,6 @@ { "type": "Feature", "properties": { "tout-venant": true, "recyclage": false, "compost caca": false, "compost vegetal": false, "poubelle": true }, "geometry": { "type": "Point", "coordinates": [ -2.091632273753862, 47.541964182561429 ] } }, { "type": "Feature", "properties": { "tout-venant": false, "recyclage": true, "compost caca": false, "compost vegetal": false, "poubelle": true }, "geometry": { "type": "Point", "coordinates": [ -2.091609674840965, 47.541963379645793 ] } }, { "type": "Feature", "properties": { "tout-venant": false, "recyclage": false, "compost caca": true, "compost vegetal": false, "poubelle": true }, "geometry": { "type": "Point", "coordinates": [ -2.091148822106654, 47.542307623733166 ] } }, -{ "type": "Feature", "properties": { "tout-venant": false, "recyclage": false, "compost caca": false, "compost vegetal": true, "poubelle": false }, "geometry": { "type": "Point", "coordinates": [ -2.091149910988561, 47.542277486881417 ] } } +{ "type": "Feature", "properties": { "tout-venant": false, "recyclage": false, "compost caca": false, "compost vegetal": true, "poubelle": true }, "geometry": { "type": "Point", "coordinates": [ -2.091149910988561, 47.542277486881417 ] } } ] } diff --git a/icons/poubelle-caca.svg b/icons/poubelle-caca.svg new file mode 100644 index 0000000..783944a --- /dev/null +++ b/icons/poubelle-caca.svg @@ -0,0 +1,88 @@ + + + + diff --git a/icons/poubelle-compost.svg b/icons/poubelle-compost.svg new file mode 100644 index 0000000..4fc1325 --- /dev/null +++ b/icons/poubelle-compost.svg @@ -0,0 +1,89 @@ + + + + diff --git a/icons/poubelle-recyclable.svg b/icons/poubelle-recyclable.svg new file mode 100644 index 0000000..108f878 --- /dev/null +++ b/icons/poubelle-recyclable.svg @@ -0,0 +1,97 @@ + + + + diff --git a/icons/poubelle.svg b/icons/poubelle.svg new file mode 100644 index 0000000..60a2ee2 --- /dev/null +++ b/icons/poubelle.svg @@ -0,0 +1,83 @@ + + + + diff --git a/js/symbols.js b/js/symbols.js index 7015d51..170849d 100644 --- a/js/symbols.js +++ b/js/symbols.js @@ -99,6 +99,19 @@ function getBaseSymbolForFeature(feature){ return DRINKING_WATER_SYMBOL } + if(feature.properties["poubelle"]){ + if(feature.properties["recyclage"]){ + return RECYCLE_BIN_SYMBOL + } + if(feature.properties["compost vegetal"]){ + return COMPOST_BIN_SYMBOL + } + if(feature.properties["compost caca"]){ + return POOP_BIN_SYMBOL + } + return BIN_SYMBOL + } + if(feature.properties["batiment"] || feature.properties["piece-batiment"]){ return BUILDING_SYMBOL } @@ -213,4 +226,56 @@ export const WIFI_SYMBOL = new MapSymbol() { WIFI_SYMBOL.genericName = "Wifi" WIFI_SYMBOL.markerUrl = new URL("../icons/wifi.svg", import.meta.url) +} + +export const BIN_SYMBOL = new MapSymbol() +{ + BIN_SYMBOL.genericName = "Poubelle" + BIN_SYMBOL.markerUrl = new URL("../icons/poubelle.svg", import.meta.url) + BIN_SYMBOL.indexSynonyms = [ + "poubelle", + "dechet", + "déchet" + ] +} + +export const RECYCLE_BIN_SYMBOL = new MapSymbol() +{ + RECYCLE_BIN_SYMBOL.genericName = "Poubelle recyclable" + RECYCLE_BIN_SYMBOL.markerUrl = new URL("../icons/poubelle-recyclable.svg", import.meta.url) + RECYCLE_BIN_SYMBOL.indexSynonyms = [ + "poubelle", + "dechet", + "déchet", + "recyclable", + 'recyclage' + ] +} + +export const COMPOST_BIN_SYMBOL = new MapSymbol() +{ + COMPOST_BIN_SYMBOL.genericName = "Compost" + COMPOST_BIN_SYMBOL.markerUrl = new URL("../icons/poubelle-compost.svg", import.meta.url) + COMPOST_BIN_SYMBOL.indexSynonyms = [ + "poubelle", + "dechet", + "déchet", + "compost", + "épluchures" + ] +} + +export const POOP_BIN_SYMBOL = new MapSymbol() +{ + POOP_BIN_SYMBOL.genericName = "Compost des toilettes sèches" + POOP_BIN_SYMBOL.markerUrl = new URL("../icons/poubelle-caca.svg", import.meta.url) + POOP_BIN_SYMBOL.indexSynonyms = [ + "poubelle", + "dechet", + "déchet", + "compost", + "épluchures", + "toilettes sèches", + "caca" + ] } \ No newline at end of file