forked from MapComplete/MapComplete
Chore: fix scripts
This commit is contained in:
parent
f76e2b4c88
commit
285ec2b256
6 changed files with 155 additions and 128 deletions
|
@ -5,12 +5,7 @@
|
|||
"nl": "Oplaadpunten",
|
||||
"de": "Ladestationen"
|
||||
},
|
||||
"description": {
|
||||
"en": "A charging station",
|
||||
"nl": "Oplaadpunten",
|
||||
"ca": "Una estació de càrrega",
|
||||
"de": "Eine Ladestation"
|
||||
},
|
||||
"minzoom": 10,
|
||||
"source": {
|
||||
"osmTags": {
|
||||
"and": [
|
||||
|
@ -25,7 +20,6 @@
|
|||
]
|
||||
}
|
||||
},
|
||||
"minzoom": 10,
|
||||
"title": {
|
||||
"render": {
|
||||
"en": "Charging station",
|
||||
|
@ -71,103 +65,13 @@
|
|||
}
|
||||
]
|
||||
},
|
||||
"pointRendering": [
|
||||
{
|
||||
"location": [
|
||||
"point",
|
||||
"centroid"
|
||||
],
|
||||
"marker": [
|
||||
{
|
||||
"icon": "pin",
|
||||
"color": "#fff"
|
||||
},
|
||||
{
|
||||
"icon": {
|
||||
"render": "./assets/themes/charging_stations/plug.svg",
|
||||
"mappings": [
|
||||
{
|
||||
"if": "bicycle=yes",
|
||||
"then": "./assets/themes/charging_stations/bicycle.svg"
|
||||
},
|
||||
{
|
||||
"if": {
|
||||
"or": [
|
||||
"car=yes",
|
||||
"motorcar=yes"
|
||||
]
|
||||
},
|
||||
"then": "./assets/themes/charging_stations/car.svg"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
],
|
||||
"iconBadges": [
|
||||
{
|
||||
"if": {
|
||||
"or": [
|
||||
"disused:amenity=charging_station",
|
||||
"operational_status=broken"
|
||||
]
|
||||
},
|
||||
"then": "close:#c22;"
|
||||
},
|
||||
{
|
||||
"if": {
|
||||
"or": [
|
||||
"proposed:amenity=charging_station",
|
||||
"planned:amenity=charging_station"
|
||||
]
|
||||
},
|
||||
"then": "./assets/layers/charging_station/under_construction.svg"
|
||||
},
|
||||
{
|
||||
"if": {
|
||||
"and": [
|
||||
"bicycle=yes",
|
||||
{
|
||||
"or": [
|
||||
"motorcar=yes",
|
||||
"car=yes"
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"then": "circle:#fff;./assets/themes/charging_stations/car.svg"
|
||||
}
|
||||
],
|
||||
"anchor": "bottom",
|
||||
"iconSize": "50,50"
|
||||
}
|
||||
],
|
||||
"lineRendering": [],
|
||||
"presets": [
|
||||
{
|
||||
"tags": [
|
||||
"amenity=charging_station",
|
||||
"motorcar=no",
|
||||
"bicycle=yes"
|
||||
],
|
||||
"title": {
|
||||
"en": "charging station for electrical bikes",
|
||||
"nl": "oplaadpunt voor elektrische fietsen",
|
||||
"de": "Ladestation für Elektrofahrräder"
|
||||
}
|
||||
},
|
||||
{
|
||||
"tags": [
|
||||
"amenity=charging_station",
|
||||
"motorcar=yes",
|
||||
"bicycle=no"
|
||||
],
|
||||
"title": {
|
||||
"en": "charging station for cars",
|
||||
"nl": "oplaadstation voor elektrische auto's",
|
||||
"de": "Ladestation für Autos"
|
||||
}
|
||||
}
|
||||
],
|
||||
"description": {
|
||||
"en": "A charging station",
|
||||
"nl": "Oplaadpunten",
|
||||
"ca": "Una estació de càrrega",
|
||||
"de": "Eine Ladestation"
|
||||
},
|
||||
"#": "no-question-hint-check",
|
||||
"tagRenderings": [
|
||||
"images",
|
||||
{
|
||||
|
@ -2509,6 +2413,103 @@
|
|||
}
|
||||
}
|
||||
],
|
||||
"lineRendering": [],
|
||||
"pointRendering": [
|
||||
{
|
||||
"location": [
|
||||
"point",
|
||||
"centroid"
|
||||
],
|
||||
"marker": [
|
||||
{
|
||||
"icon": "pin",
|
||||
"color": "#fff"
|
||||
},
|
||||
{
|
||||
"icon": {
|
||||
"render": "./assets/themes/charging_stations/plug.svg",
|
||||
"mappings": [
|
||||
{
|
||||
"if": "bicycle=yes",
|
||||
"then": "./assets/themes/charging_stations/bicycle.svg"
|
||||
},
|
||||
{
|
||||
"if": {
|
||||
"or": [
|
||||
"car=yes",
|
||||
"motorcar=yes"
|
||||
]
|
||||
},
|
||||
"then": "./assets/themes/charging_stations/car.svg"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
],
|
||||
"iconBadges": [
|
||||
{
|
||||
"if": {
|
||||
"or": [
|
||||
"disused:amenity=charging_station",
|
||||
"operational_status=broken"
|
||||
]
|
||||
},
|
||||
"then": "close:#c22;"
|
||||
},
|
||||
{
|
||||
"if": {
|
||||
"or": [
|
||||
"proposed:amenity=charging_station",
|
||||
"planned:amenity=charging_station"
|
||||
]
|
||||
},
|
||||
"then": "./assets/layers/charging_station/under_construction.svg"
|
||||
},
|
||||
{
|
||||
"if": {
|
||||
"and": [
|
||||
"bicycle=yes",
|
||||
{
|
||||
"or": [
|
||||
"motorcar=yes",
|
||||
"car=yes"
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"then": "circle:#fff;./assets/themes/charging_stations/car.svg"
|
||||
}
|
||||
],
|
||||
"anchor": "bottom",
|
||||
"iconSize": "50,50"
|
||||
}
|
||||
],
|
||||
"presets": [
|
||||
{
|
||||
"tags": [
|
||||
"amenity=charging_station",
|
||||
"motorcar=no",
|
||||
"bicycle=yes"
|
||||
],
|
||||
"title": {
|
||||
"en": "charging station for electrical bikes",
|
||||
"nl": "oplaadpunt voor elektrische fietsen",
|
||||
"de": "Ladestation für Elektrofahrräder"
|
||||
}
|
||||
},
|
||||
{
|
||||
"tags": [
|
||||
"amenity=charging_station",
|
||||
"motorcar=yes",
|
||||
"bicycle=no"
|
||||
],
|
||||
"title": {
|
||||
"en": "charging station for cars",
|
||||
"nl": "oplaadstation voor elektrische auto's",
|
||||
"de": "Ladestation für Autos"
|
||||
}
|
||||
}
|
||||
],
|
||||
"filter": [
|
||||
{
|
||||
"id": "vehicle-type",
|
||||
|
@ -2714,19 +2715,6 @@
|
|||
]
|
||||
}
|
||||
],
|
||||
"deletion": {
|
||||
"softDeletionTags": {
|
||||
"and": [
|
||||
"amenity=",
|
||||
"disused:amenity=charging_station"
|
||||
]
|
||||
},
|
||||
"neededChangesets": 10
|
||||
},
|
||||
"allowMove": {
|
||||
"enableRelocation": false,
|
||||
"enableImproveAccuracy": true
|
||||
},
|
||||
"units": [
|
||||
{
|
||||
"maxstay": {
|
||||
|
@ -2885,5 +2873,17 @@
|
|||
}
|
||||
}
|
||||
],
|
||||
"#": "no-question-hint-check"
|
||||
}
|
||||
"allowMove": {
|
||||
"enableRelocation": false,
|
||||
"enableImproveAccuracy": true
|
||||
},
|
||||
"deletion": {
|
||||
"softDeletionTags": {
|
||||
"and": [
|
||||
"amenity=",
|
||||
"disused:amenity=charging_station"
|
||||
]
|
||||
},
|
||||
"neededChangesets": 10
|
||||
}
|
||||
}
|
|
@ -3,14 +3,17 @@
|
|||
"title": {
|
||||
"en": "Changes made with MapComplete"
|
||||
},
|
||||
"description": {
|
||||
"en": "This maps shows all the changes made with MapComplete"
|
||||
},
|
||||
"shortDescription": {
|
||||
"en": "Shows changes made by MapComplete"
|
||||
},
|
||||
"description": {
|
||||
"en": "This maps shows all the changes made with MapComplete"
|
||||
},
|
||||
"icon": "./assets/svg/logo.svg",
|
||||
"hideFromOverview": true,
|
||||
"startLat": 0,
|
||||
"startLon": 0,
|
||||
"startZoom": 1,
|
||||
"layers": [
|
||||
{
|
||||
"id": "mapcomplete-changes",
|
||||
|
|
|
@ -1495,6 +1495,11 @@
|
|||
},
|
||||
"question": "What is the relative location of this bicycle parking?"
|
||||
},
|
||||
"charge": {
|
||||
"question": "How much does it cost to park your bike here?",
|
||||
"questionHint": "This is the amount which is charged for a single bike",
|
||||
"render": "Parking your bike costs {charge}"
|
||||
},
|
||||
"fee": {
|
||||
"mappings": {
|
||||
"0": {
|
||||
|
@ -10665,6 +10670,10 @@
|
|||
"4": {
|
||||
"human": "{quantity} months",
|
||||
"humanSingular": "one month"
|
||||
},
|
||||
"5": {
|
||||
"human": "{quantity} years",
|
||||
"humanSingular": "one year"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1211,6 +1211,11 @@
|
|||
},
|
||||
"question": "Wat is de relatieve locatie van deze parking??"
|
||||
},
|
||||
"charge": {
|
||||
"question": "Hoeveel kost het om een fiets te stallen?",
|
||||
"questionHint": "Dit is de kostprijs voor een enkele fiets",
|
||||
"render": "Je fiets hier parkeren kost {charge}"
|
||||
},
|
||||
"fee": {
|
||||
"mappings": {
|
||||
"0": {
|
||||
|
@ -8724,6 +8729,10 @@
|
|||
"4": {
|
||||
"human": "{quantity} maanden",
|
||||
"humanSingular": "één maand"
|
||||
},
|
||||
"5": {
|
||||
"human": "{quantity} jaar",
|
||||
"humanSingular": "één jaar"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -224,10 +224,12 @@ export default class ScriptUtils {
|
|||
})
|
||||
const timeoutPromise = new Promise<any>((resolve, reject) => {
|
||||
setTimeout(
|
||||
() =>
|
||||
timeoutSecs === undefined
|
||||
? reject(new Error("Timout reached"))
|
||||
: resolve("timeout"),
|
||||
() => {
|
||||
if(timeoutSecs === undefined){
|
||||
return // No resolve
|
||||
}
|
||||
resolve("timeout")
|
||||
},
|
||||
(timeoutSecs ?? 10) * 1000
|
||||
)
|
||||
})
|
||||
|
|
File diff suppressed because one or more lines are too long
Loading…
Reference in a new issue