diff --git a/assets/layers/parking_spaces/hgv.svg b/assets/layers/parking_spaces/hgv.svg
new file mode 100644
index 0000000000..f7aab188c5
--- /dev/null
+++ b/assets/layers/parking_spaces/hgv.svg
@@ -0,0 +1,9 @@
+
+
\ No newline at end of file
diff --git a/assets/layers/parking_spaces/hgv.svg.license b/assets/layers/parking_spaces/hgv.svg.license
new file mode 100644
index 0000000000..2de8e7ea06
--- /dev/null
+++ b/assets/layers/parking_spaces/hgv.svg.license
@@ -0,0 +1,2 @@
+SPDX-FileCopyrightText: MarianSigler
+SPDX-License-Identifier: CC0-1.0
\ No newline at end of file
diff --git a/assets/layers/parking_spaces/license_info.json b/assets/layers/parking_spaces/license_info.json
index b375368435..5d3f3deb45 100644
--- a/assets/layers/parking_spaces/license_info.json
+++ b/assets/layers/parking_spaces/license_info.json
@@ -1,4 +1,14 @@
[
+ {
+ "path": "hgv.svg",
+ "license": "CC0-1.0",
+ "authors": [
+ "MarianSigler"
+ ],
+ "sources": [
+ "https://commons.wikimedia.org/wiki/File:Sinnbild_LKW.svg"
+ ]
+ },
{
"path": "parking_space.svg",
"license": "CC0-1.0",
@@ -6,5 +16,13 @@
"Robin van der Linde"
],
"sources": []
+ },
+ {
+ "path": "parking_space_private.svg",
+ "license": "CC0-1.0",
+ "authors": [
+ "Robin van der Linde"
+ ],
+ "sources": []
}
]
\ No newline at end of file
diff --git a/assets/layers/parking_spaces/parking_space_private.svg b/assets/layers/parking_spaces/parking_space_private.svg
new file mode 100644
index 0000000000..47805b50f8
--- /dev/null
+++ b/assets/layers/parking_spaces/parking_space_private.svg
@@ -0,0 +1,6 @@
+
diff --git a/assets/layers/parking_spaces/parking_space_private.svg.license b/assets/layers/parking_spaces/parking_space_private.svg.license
new file mode 100644
index 0000000000..75299f8845
--- /dev/null
+++ b/assets/layers/parking_spaces/parking_space_private.svg.license
@@ -0,0 +1,2 @@
+SPDX-FileCopyrightText: Robin van der Linde
+SPDX-License-Identifier: CC0-1.0
\ No newline at end of file
diff --git a/assets/layers/parking_spaces/parking_spaces.json b/assets/layers/parking_spaces/parking_spaces.json
index ab10f4bf4f..1ece3a3fe5 100644
--- a/assets/layers/parking_spaces/parking_spaces.json
+++ b/assets/layers/parking_spaces/parking_spaces.json
@@ -37,6 +37,13 @@
"de": "Behindertenparkplatz",
"cs": "Parkovací místo pro osoby se zdravotním postižením"
}
+ },
+ {
+ "if": "parking_space=charging",
+ "then": {
+ "en": "Electric Vehicle Charging Parking Space",
+ "nl": "Parkeerplek voor opladen van elektrische voertuigen"
+ }
}
]
},
@@ -50,6 +57,22 @@
{
"if": "parking_space=disabled",
"then": "./assets/layers/toilet/wheelchair.svg"
+ },
+ {
+ "if": "parking_space=charging",
+ "then": "./assets/themes/charging_stations/plug.svg"
+ },
+ {
+ "if": "parking_space=private",
+ "then": "./assets/layers/parking_spaces/parking_space_private.svg"
+ },
+ {
+ "if": "parking_space=bus",
+ "then": "./assets/layers/transit_stops/bus_stop.svg"
+ },
+ {
+ "if": "parking_space=hgv",
+ "then": "./assets/layers/parking_spaces/hgv.svg"
}
]
}
@@ -264,4 +287,4 @@
]
}
]
-}
+}
\ No newline at end of file
diff --git a/assets/layers/trolley_bay/license_info.json b/assets/layers/trolley_bay/license_info.json
new file mode 100644
index 0000000000..f2a2da71ba
--- /dev/null
+++ b/assets/layers/trolley_bay/license_info.json
@@ -0,0 +1,13 @@
+[
+ {
+ "path": "trolley_bay.svg",
+ "license": "CC-BY-SA 3.0",
+ "authors": [
+ "Manuel Campagnoli",
+ "Robin van der Linde"
+ ],
+ "sources": [
+ "https://commons.wikimedia.org/wiki/File:Shopping_Cart.svg"
+ ]
+ }
+]
\ No newline at end of file
diff --git a/assets/layers/trolley_bay/trolley_bay.json b/assets/layers/trolley_bay/trolley_bay.json
new file mode 100644
index 0000000000..b8a84b359e
--- /dev/null
+++ b/assets/layers/trolley_bay/trolley_bay.json
@@ -0,0 +1,206 @@
+{
+ "id": "trolley_bay",
+ "name": {
+ "en": "Trolley Bays"
+ },
+ "description": {
+ "en": "Find trolley bays for shopping trolleys."
+ },
+ "title": {
+ "en": "Trolley Bay"
+ },
+ "source": {
+ "osmTags": "amenity=trolley_bay"
+ },
+ "minzoom": 18,
+ "allowMove": {
+ "enableImproveAccuracy": true,
+ "enableRelocation": true
+ },
+ "deletion": true,
+ "tagRenderings": [
+ {
+ "id": "covered",
+ "question": {
+ "en": "Is this trolley bay covered?"
+ },
+ "mappings": [
+ {
+ "if": "covered=yes",
+ "then": {
+ "en": "This trolley bay is covered"
+ }
+ },
+ {
+ "if": "covered=no",
+ "then": {
+ "en": "This trolley bay is not covered"
+ }
+ }
+ ]
+ },
+ {
+ "id": "deposit",
+ "question": {
+ "en": "Is a deposit (e.g. a coin) required for the trolleys?"
+ },
+ "mappings": [
+ {
+ "if": "trolley:deposit=yes",
+ "then": {
+ "en": "A deposit is required for the trolleys"
+ }
+ },
+ {
+ "if": "trolley:deposit=no",
+ "then": {
+ "en": "No deposit is required for the trolleys"
+ }
+ }
+ ]
+ },
+ {
+ "id": "denominations",
+ "condition": {
+ "and": [
+ "trolley:deposit=yes",
+ "_currency~.*EUR.*"
+ ]
+ },
+ "question": {
+ "en": "What coins are accepted for the deposit?"
+ },
+ "multiAnswer": true,
+ "mappings": [
+ {
+ "if": "trolley:deposit:denominations=0.50 EUR",
+ "icon": "./assets/layers/questions/denominations/eur/50cent.svg",
+ "then": {
+ "en": "50 cent coins are accepted",
+ "de": "50-Cent-Münzen werden akzeptiert",
+ "nl": "Munten van 50 cent worden geaccepteerd",
+ "nb_NO": "50-cent mynter aksepteres",
+ "fr": "Les pièces de 50 cents sont acceptées",
+ "pl": "Akceptowane są monety 50-centowe",
+ "ca": "S'accepten monedes de 50 cèntims",
+ "es": "Se aceptan monedas de 50 céntimos",
+ "cs": "Jsou přijímány mince v hodnotě 50 centů",
+ "id": "Koin 50 sen diterima"
+ }
+ },
+ {
+ "if": "trolley:deposit:denominations=1 EUR",
+ "icon": "./assets/layers/questions/denominations/eur/1euro.svg",
+ "then": {
+ "en": "1 euro coins are accepted",
+ "de": "1-Euro-Münzen werden akzeptiert",
+ "nl": "Munten van 1 euro worden geaccepteerd",
+ "nb_NO": "1-euro mynter aksepteres",
+ "fr": "Les pièces de 1 euro sont acceptées",
+ "pl": "Akceptowane są monety 1 euro",
+ "ca": "S'accepten monedes de 1 euro",
+ "es": "Se aceptan monedas de 1 euro",
+ "cs": "Jsou přijímány mince v hodnotě 1 eura"
+ },
+ "hideInAnswer": "_currency!~.*EUR.*"
+ },
+ {
+ "if": "trolley:deposit:denominations=2 EUR",
+ "icon": "./assets/layers/questions/denominations/eur/2euro.svg",
+ "then": {
+ "en": "2 euro coins are accepted",
+ "de": "2-Euro-Münzen werden akzeptiert",
+ "nl": "Munten van 2 euro worden geaccepteerd",
+ "nb_NO": "2-euro mynter aksepteres",
+ "fr": "Les pièces de 2 euros sont acceptées",
+ "pl": "Akceptowane są monety 2 euro",
+ "ca": "S'accepten monedes de 2 euros",
+ "es": "Se aceptan monedas de 2 euros",
+ "cs": "Jsou přijímány mince v hodnotě 2 euro"
+ },
+ "hideInAnswer": "_currency!~.*EUR.*"
+ }
+ ]
+ },
+ {
+ "id": "cart_types",
+ "question": {
+ "en": "What kind of special trolleys are available?"
+ },
+ "multiAnswer": true,
+ "mappings": [
+ {
+ "if": "trolley:magnifier=yes",
+ "ifnot": "trolley:magnifier=no",
+ "then": {
+ "en": "Trolleys with a magnifier are available"
+ }
+ },
+ {
+ "if": "trolley:wheelchair=yes",
+ "ifnot": "trolley:wheelchair=no",
+ "then": {
+ "en": "Trolleys for wheelchair users are available"
+ }
+ },
+ {
+ "if": "trolley:children=yes",
+ "ifnot": "trolley:children=no",
+ "then": {
+ "en": "Trolleys for children are available"
+ }
+ },
+ {
+ "if": "trolley:seats=yes",
+ "ifnot": "trolley:seats=no",
+ "then": {
+ "en": "Trolleys with seats for children are available"
+ }
+ },
+ {
+ "if": "trolley:flatbed=yes",
+ "ifnot": "trolley:flatbed=no",
+ "then": {
+ "en": "Trolleys with a flatbed are available"
+ }
+ },
+ {
+ "if": "trolley:vertical=yes",
+ "ifnot": "trolley:vertical=no",
+ "then": {
+ "en": "Vertical trolleys for sheet-like goods are available"
+ }
+ }
+ ]
+ },
+ {
+ "id": "indoor"
+ }
+ ],
+ "presets": [
+ {
+ "title": {
+ "en": "a trolley bay"
+ },
+ "tags": [
+ "amenity=trolley_bay"
+ ],
+ "description": {
+ "en": "A trolley bay for parking shopping carts."
+ }
+ }
+ ],
+ "pointRendering": [
+ {
+ "location": [
+ "point",
+ "centroid"
+ ],
+ "marker": [
+ {
+ "icon": "./assets/layers/trolley_bay/trolley_bay.svg"
+ }
+ ]
+ }
+ ]
+}
\ No newline at end of file
diff --git a/assets/layers/trolley_bay/trolley_bay.svg b/assets/layers/trolley_bay/trolley_bay.svg
new file mode 100644
index 0000000000..6ab9e54559
--- /dev/null
+++ b/assets/layers/trolley_bay/trolley_bay.svg
@@ -0,0 +1,12 @@
+
diff --git a/assets/layers/trolley_bay/trolley_bay.svg.license b/assets/layers/trolley_bay/trolley_bay.svg.license
new file mode 100644
index 0000000000..2beb24295d
--- /dev/null
+++ b/assets/layers/trolley_bay/trolley_bay.svg.license
@@ -0,0 +1,2 @@
+SPDX-FileCopyrightText: Manuel Campagnoli; Robin van der Linde
+SPDX-License-Identifier: CC-BY-SA 3.0
\ No newline at end of file
diff --git a/assets/themes/nature/nature.json b/assets/themes/nature/nature.json
index 50bc46930f..c92b0a0e1d 100644
--- a/assets/themes/nature/nature.json
+++ b/assets/themes/nature/nature.json
@@ -52,7 +52,8 @@
"bench",
"picnic_table",
"toilet",
- "guidepost"
+ "guidepost",
+ "shelter"
],
"override": {
"minzoom": 16
@@ -60,4 +61,4 @@
}
],
"widenFactor": 2
-}
+}
\ No newline at end of file
diff --git a/assets/themes/onwheels/onwheels.json b/assets/themes/onwheels/onwheels.json
index 5a5ab9b322..4ecb2532c3 100644
--- a/assets/themes/onwheels/onwheels.json
+++ b/assets/themes/onwheels/onwheels.json
@@ -268,19 +268,7 @@
},
"pointRendering": [
{
- "marker": [
- {
- "mappings": null
- }
- ],
- "iconSize": "40,40",
- "anchor": "center",
- "iconBadges": [
- {
- "if": "parking_space=disabled",
- "then": "./assets/layers/toilet/wheelchair.svg"
- }
- ]
+ "iconSize": "40,40"
}
],
"name": {
@@ -599,4 +587,4 @@
},
"enableDownload": true,
"widenFactor": 2
-}
+}
\ No newline at end of file
diff --git a/assets/themes/parkings/parkings.json b/assets/themes/parkings/parkings.json
index c9a18cfb2a..9d96a04daa 100644
--- a/assets/themes/parkings/parkings.json
+++ b/assets/themes/parkings/parkings.json
@@ -58,7 +58,13 @@
"layers": [
"parking",
"parking_spaces",
- "parking_ticket_machine"
+ "parking_ticket_machine",
+ {
+ "builtin": "charging_station",
+ "override": {
+ "minzoom": 18
+ }
+ }
],
"widenFactor": 1.2
}
\ No newline at end of file
diff --git a/assets/themes/shops/shops.json b/assets/themes/shops/shops.json
index 0024d9837c..b19b67260b 100644
--- a/assets/themes/shops/shops.json
+++ b/assets/themes/shops/shops.json
@@ -52,7 +52,8 @@
"layers": [
"shops",
"pharmacy",
- "ice_cream"
+ "ice_cream",
+ "trolley_bay"
],
"widenFactor": 3
-}
+}
\ No newline at end of file
diff --git a/scripts/downloadCommons.ts b/scripts/downloadCommons.ts
new file mode 100644
index 0000000000..78cb8e217c
--- /dev/null
+++ b/scripts/downloadCommons.ts
@@ -0,0 +1,296 @@
+/**
+ * Script to download images from Wikimedia Commons, and save them together with license information.
+ */
+
+import { readFileSync, writeFileSync, existsSync, mkdirSync } from "fs"
+import { unescape } from "querystring"
+import SmallLicense from "../src/Models/smallLicense"
+
+interface ExtMetadataProp {
+ value: string
+ source: string
+ hidden: string
+}
+
+interface ImageQueryAPIResponse {
+ continue: {
+ iistart: string
+ continue: string
+ }
+ query: {
+ normalized?: {
+ from: string
+ to: string
+ }[]
+ pages: {
+ [key: string]: {
+ pageid: number
+ ns: number
+ title: string
+ imagerepository: string
+ imageinfo?: {
+ user: string
+ url: string
+ descriptionurl: string
+ descriptionshorturl: string
+ extmetadata?: {
+ DateTime: ExtMetadataProp
+ ObjectName: ExtMetadataProp
+ CommonsMetadataExtension?: ExtMetadataProp
+ Categories?: ExtMetadataProp
+ Assessments?: ExtMetadataProp
+ ImageDescription?: ExtMetadataProp
+ DateTimeOriginal?: ExtMetadataProp
+ Credit?: ExtMetadataProp
+ Artist?: ExtMetadataProp
+ LicenseShortName?: ExtMetadataProp
+ UsageTerms?: ExtMetadataProp
+ AttributionRequired?: ExtMetadataProp
+ Copyrighted?: ExtMetadataProp
+ Restrictions?: ExtMetadataProp
+ License?: ExtMetadataProp
+ }
+ }[]
+ }
+ }
+ }
+}
+
+interface CategoryMember {
+ pageid: number
+ ns: number
+ title: string
+}
+
+interface CategoryQueryAPIResponse {
+ batchcomplete: string
+ query: {
+ categorymembers: CategoryMember[]
+ }
+}
+
+interface TemplateQueryAPIResponse {
+ batchcomplete: string
+ query: {
+ normalized?: {
+ from: string
+ to: string
+ }[]
+ pages: {
+ [key: string]: {
+ pageid: number
+ ns: number
+ title: string
+ templates?: {
+ ns: number
+ title: string
+ }[]
+ }
+ }
+ }
+}
+
+// Map license names of Wikimedia Commons to different names
+const licenseMapping = {}
+
+// Map template names to license names
+const templateMapping = {
+ "Template:PD": "Public Domain",
+}
+
+async function main(args: string[]) {
+ if (args.length < 2) {
+ console.log("Usage: downloadCommons.ts