diff --git a/assets/layers/charging_station/charging_station.json b/assets/layers/charging_station/charging_station.json
index 677695add..114ba2553 100644
--- a/assets/layers/charging_station/charging_station.json
+++ b/assets/layers/charging_station/charging_station.json
@@ -10,16 +10,7 @@
"it": "Stazioni di ricarica",
"uk": "Зарядні станції"
},
- "description": {
- "en": "A charging station",
- "nl": "Oplaadpunten",
- "ca": "Una estació de càrrega",
- "cs": "Nabíjecí stanice",
- "de": "Eine Ladestation",
- "es": "Un punto de carga",
- "fr": "Une station de recharge",
- "it": "Una stazione di ricarica"
- },
+ "minzoom": 10,
"source": {
"osmTags": {
"and": [
@@ -34,7 +25,6 @@
]
}
},
- "minzoom": 10,
"title": {
"render": {
"en": "Charging station",
@@ -95,119 +85,17 @@
}
]
},
- "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": [
- {
- "color": "black",
- "width": 2,
- "fillColor": "#80808080"
- }
- ],
- "presets": [
- {
- "tags": [
- "amenity=charging_station",
- "motorcar=no",
- "bicycle=yes"
- ],
- "title": {
- "en": "charging station for electrical bikes",
- "nl": "oplaadpunt voor elektrische fietsen",
- "ca": "Estació de càrrega de bicicletes elèctriques",
- "cs": "nabíjecí stanice pro elektrokola",
- "de": "Ladestation für Elektrofahrräder",
- "es": "punto de carga para bicicletas eléctricas",
- "it": "stazione di ricarica per biciclette elettriche",
- "uk": "зарядна станція для електровелосипедів"
- }
- },
- {
- "tags": [
- "amenity=charging_station",
- "motorcar=yes",
- "bicycle=no"
- ],
- "title": {
- "en": "charging station for cars",
- "nl": "oplaadstation voor elektrische auto's",
- "ca": "estació de càrrega per a cotxes",
- "cs": "nabíjecí stanice pro auta",
- "de": "Ladestation für Autos",
- "es": "punto de carga para coches",
- "it": "stazione di ricarica per auto",
- "uk": "зарядна станція для автомобілів"
- }
- }
- ],
+ "description": {
+ "en": "A charging station",
+ "nl": "Oplaadpunten",
+ "ca": "Una estació de càrrega",
+ "cs": "Nabíjecí stanice",
+ "de": "Eine Ladestation",
+ "es": "Un punto de carga",
+ "fr": "Une station de recharge",
+ "it": "Una stazione di ricarica"
+ },
+ "#": "no-question-hint-check",
"tagRenderings": [
"images",
{
@@ -3511,6 +3399,119 @@
}
}
],
+ "lineRendering": [
+ {
+ "color": "black",
+ "width": 2,
+ "fillColor": "#80808080"
+ }
+ ],
+ "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",
+ "ca": "Estació de càrrega de bicicletes elèctriques",
+ "cs": "nabíjecí stanice pro elektrokola",
+ "de": "Ladestation für Elektrofahrräder",
+ "es": "punto de carga para bicicletas eléctricas",
+ "it": "stazione di ricarica per biciclette elettriche",
+ "uk": "зарядна станція для електровелосипедів"
+ }
+ },
+ {
+ "tags": [
+ "amenity=charging_station",
+ "motorcar=yes",
+ "bicycle=no"
+ ],
+ "title": {
+ "en": "charging station for cars",
+ "nl": "oplaadstation voor elektrische auto's",
+ "ca": "estació de càrrega per a cotxes",
+ "cs": "nabíjecí stanice pro auta",
+ "de": "Ladestation für Autos",
+ "es": "punto de carga para coches",
+ "it": "stazione di ricarica per auto",
+ "uk": "зарядна станція для автомобілів"
+ }
+ }
+ ],
"filter": [
{
"id": "vehicle-type",
@@ -3854,19 +3855,6 @@
]
}
],
- "deletion": {
- "softDeletionTags": {
- "and": [
- "amenity=",
- "disused:amenity=charging_station"
- ]
- },
- "neededChangesets": 10
- },
- "allowMove": {
- "enableRelocation": false,
- "enableImproveAccuracy": true
- },
"units": [
{
"maxstay": {
@@ -4061,5 +4049,17 @@
}
}
],
- "#": "no-question-hint-check"
-}
+ "allowMove": {
+ "enableRelocation": false,
+ "enableImproveAccuracy": true
+ },
+ "deletion": {
+ "softDeletionTags": {
+ "and": [
+ "amenity=",
+ "disused:amenity=charging_station"
+ ]
+ },
+ "neededChangesets": 10
+ }
+}
\ No newline at end of file
diff --git a/langs/layers/nl.json b/langs/layers/nl.json
index 6837b84b7..500333af2 100644
--- a/langs/layers/nl.json
+++ b/langs/layers/nl.json
@@ -2148,6 +2148,9 @@
},
"title": {
"mappings": {
+ "0": {
+ "then": "{name}"
+ },
"1": {
"then": "Vogelkijkhut {name}"
},
@@ -6851,6 +6854,11 @@
}
},
"title": {
+ "mappings": {
+ "0": {
+ "then": "{name}"
+ }
+ },
"render": "Natuurgebied"
}
},
@@ -7385,6 +7393,21 @@
"render": "Picknicktafel"
}
},
+ "play_forest": {
+ "description": "Een speelbos is een vrij toegankelijke zone in een bos",
+ "name": "Speelbossen",
+ "title": {
+ "mappings": {
+ "0": {
+ "then": "{name}"
+ },
+ "1": {
+ "then": "Speelbos {name}"
+ }
+ },
+ "render": "Speelbos"
+ }
+ },
"playground": {
"deletion": {
"nonDeleteMappings": {
@@ -9133,6 +9156,9 @@
},
"title": {
"mappings": {
+ "0": {
+ "then": "{name}"
+ },
"1": {
"then": "Voetpad"
},
@@ -11382,13 +11408,25 @@
}
},
"village_green": {
- "description": "Een laag die dorpsgroen toont (gemeenschapsgroen, maar niet echt een park)"
+ "description": "Een laag die dorpsgroen toont (gemeenschapsgroen, maar niet echt een park)",
+ "name": "Speelweide",
+ "title": {
+ "mappings": {
+ "0": {
+ "then": "{name}"
+ }
+ },
+ "render": "Speelweide"
+ }
},
"visitor_information_centre": {
"description": "Een bezoekerscentrum biedt informatie over een specifieke attractie of bezienswaardigheid waar het is gevestigd.",
"name": "Bezoekerscentrum",
"title": {
"mappings": {
+ "0": {
+ "then": "{name:nl}"
+ },
"1": {
"then": "{name}"
}
@@ -11602,4 +11640,4 @@
"render": "windturbine"
}
}
-}
+}
\ No newline at end of file
diff --git a/langs/nl.json b/langs/nl.json
index d6b5c9ca5..c4f7699f0 100644
--- a/langs/nl.json
+++ b/langs/nl.json
@@ -619,8 +619,8 @@
"intro": "Kaarten over verschillende thema's waar je kan aan bijdragen",
"learnMore": "Lees meer",
"logIn": "Log in om andere thema's te zien waar je al in bewerkt hebt",
- "title": "Welkom bij MapComplete",
- "recentThemes": "Recent bekeken kaarten"
+ "recentThemes": "Recent bekeken kaarten",
+ "title": "Welkom bij MapComplete"
},
"move": {
"cancel": "Annuleer verplaatsing",
@@ -855,4 +855,4 @@
"startsWithQ": "Een wikidata-identificator begint met Q gevolgd door een nummer"
}
}
-}
+}
\ No newline at end of file
diff --git a/langs/themes/nl.json b/langs/themes/nl.json
index 6f49130c7..d9fee23dc 100644
--- a/langs/themes/nl.json
+++ b/langs/themes/nl.json
@@ -595,8 +595,37 @@
"building type": {
"question": "Wat voor soort gebouw is dit?"
},
+ "grb-fixme": {
+ "mappings": {
+ "0": {
+ "then": "Geen fixme"
+ }
+ },
+ "question": "Wat zegt de fixme?",
+ "render": "De fixme is {fixme}"
+ },
+ "grb-housenumber": {
+ "mappings": {
+ "0": {
+ "then": "Geen huisnummer"
+ }
+ },
+ "question": "Wat is het huisnummer?",
+ "render": "Het huisnummer is {addr:housenumber}"
+ },
+ "grb-min-level": {
+ "question": "Hoeveel verdiepingen ontbreken?",
+ "render": "Dit gebouw begint maar op de {building:min_level} verdieping"
+ },
"grb-reference": {
"render": "Werd geïmporteerd vanuit GRB, het referentienummer is {source:geometry:ref}"
+ },
+ "grb-street": {
+ "question": "Wat is de straat?",
+ "render": "De straat is {addr:street}"
+ },
+ "grb-unit": {
+ "render": "De wooneenheid-aanduiding is {addr:unit} "
}
}
},
@@ -638,7 +667,9 @@
"render": "Link op profiel verplicht"
}
}
- }
+ },
+ "shortDescription": "Grb import helper tool",
+ "title": "GRB import helper"
},
"guideposts": {
"description": "Wegwijzers (ook wel handwijzer genoemd) zijn vaak te vinden langs officiële wandel-, fiets-, ski- of paardrijroutes om de richtingen naar verschillende bestemmingen aan te geven. Vaak zijn ze vernoemd naar een regio of plaats en geven ze de hoogte aan.\n\nDe positie van een wegwijzer kan door een wandelaar/fietser/renner/skiër worden gebruikt als bevestiging van de huidige positie, vooral als ze een gedrukte kaart zonder GPS-ontvanger gebruiken. ",
@@ -1059,6 +1090,11 @@
},
"title": "Dierenartsen, hondenloopzones en andere huisdiervriendelijke plaatsen"
},
+ "play_forests": {
+ "description": "Een speelbos is een zone in een bos die vrij toegankelijk is voor spelende kinderen. Deze wordt in bossen van het Agentschap Natuur en bos altijd aangeduid met het overeenkomstige bord.",
+ "shortDescription": "Deze kaart toont speelbossen",
+ "title": "Speelbossen"
+ },
"playgrounds": {
"description": "Op deze kaart vind je speeltuinen en kan je zelf meer informatie en foto's toevoegen",
"shortDescription": "Een kaart met speeltuinen",
@@ -1132,6 +1168,47 @@
"description": "Alles om te skiën",
"title": "Skipistes en kabelbanen"
},
+ "speelplekken": {
+ "description": "
Welkom bij de Groendoener!
De Zuidrand dat is spelen, ravotten, chillen, wandelen,… in het groen. Meer dan 200 grote en kleine speelplekken liggen er in parken, in bossen en op pleintjes te wachten om ontdekt te worden. De verschillende speelplekken werden getest én goedgekeurd door kinder- en jongerenreporters uit de Zuidrand. Met leuke challenges dagen de reporters jou uit om ook op ontdekking te gaan. Klik op een speelplek op de kaart, bekijk het filmpje en ga op verkenning!
Het project groendoener kadert binnen het strategisch project Beleefbare Open Ruimte in de Antwerpse Zuidrand en is een samenwerking tussen het departement Leefmilieu van provincie Antwerpen, Sportpret vzw, een OpenStreetMap-België Consultent en Createlli vzw. Het project kwam tot stand met steun van Departement Omgeving van de Vlaamse Overheid. ",
+ "layers": {
+ "6": {
+ "name": "Wandelroutes van provincie Antwerpen",
+ "tagRenderings": {
+ "walk-description": {
+ "render": "
Korte beschrijving:
{description}"
+ },
+ "walk-length": {
+ "render": "Deze wandeling is {_length:km}km lang"
+ },
+ "walk-operator": {
+ "question": "Wie beheert deze wandeling en plaatst dus de signalisatiebordjes?"
+ },
+ "walk-operator-email": {
+ "question": "Naar wie kan men emailen bij problemen rond signalisatie?",
+ "render": "Bij problemen met signalisatie kan men emailen naar {operator:email}"
+ },
+ "walk-type": {
+ "mappings": {
+ "0": {
+ "then": "Dit is een internationale wandelroute"
+ },
+ "1": {
+ "then": "Dit is een nationale wandelroute"
+ },
+ "2": {
+ "then": "Dit is een regionale wandelroute"
+ },
+ "3": {
+ "then": "Dit is een lokale wandelroute"
+ }
+ }
+ }
+ }
+ }
+ },
+ "shortDescription": "Speelplekken in de Antwerpse Zuidrand",
+ "title": "Welkom bij de groendoener!"
+ },
"sport_pitches": {
"description": "Een sportveld is een ingerichte plaats met infrastructuur om een sport te beoefenen",
"shortDescription": "Deze kaart toont sportvelden",
@@ -1250,6 +1327,10 @@
},
"title": "Straatverlichting"
},
+ "street_lighting_assen": {
+ "description": "Op deze kaart vind je alles over straatlantaarns + een dataset van Assen",
+ "title": "Straatverlichting - Assen"
+ },
"surveillance": {
"description": "Op deze open kaart kan je bewakingscamera's vinden.",
"shortDescription": "Bewakingscameras en dergelijke",
@@ -1363,9 +1444,13 @@
"description": "Kaart met afvalbakken en recyclingfaciliteiten.",
"title": "Afval"
},
+ "waste_assen": {
+ "description": "Kaart met afvalbakken en recyclingfaciliteiten + een dataset voor Assen.",
+ "title": "Afval - Assen"
+ },
"waste_basket": {
"description": "Op deze kaart vind je afvalbakken bij jou in de buurt. Als er een afvalbak ontbreekt op deze kaart, kun je deze zelf toevoegen",
"shortDescription": "Een kaart met vuilnisbakken",
"title": "Vuilnisbakken"
}
-}
+}
\ No newline at end of file
diff --git a/package-lock.json b/package-lock.json
index 46fc30fb9..ea8e7be3f 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -12773,9 +12773,9 @@
}
},
"node_modules/caniuse-lite": {
- "version": "1.0.30001717",
- "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001717.tgz",
- "integrity": "sha512-auPpttCq6BDEG8ZAuHJIplGw6GODhjw+/11e7IjpnYCxZcW/ONgPs0KVBJ0d1bY3e2+7PRe5RCLyP+PfwVgkYw==",
+ "version": "1.0.30001720",
+ "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001720.tgz",
+ "integrity": "sha512-Ec/2yV2nNPwb4DnTANEV99ZWwm3ZWfdlfkQbWSDDt+PsXEVYwlhPH8tdMaPunYTKKmz7AnHi2oNEi1GcmKCD8g==",
"dev": true,
"funding": [
{
diff --git a/scripts/fixQuestionHint.ts b/scripts/fixQuestionHint.ts
index bd868f109..75d56600a 100644
--- a/scripts/fixQuestionHint.ts
+++ b/scripts/fixQuestionHint.ts
@@ -9,15 +9,10 @@ import { ConversionContext } from "../src/Models/ThemeConfig/Conversion/Conversi
class ExtractQuestionHint extends DesugaringStep {
constructor() {
- super(
- "ExtractQuestionHint",
- "Tries to extract a 'questionHint' from the question",
- )
+ super("ExtractQuestionHint", "Tries to extract a 'questionHint' from the question")
}
- convert(
- json: QuestionableTagRenderingConfigJson
- ): QuestionableTagRenderingConfigJson {
+ convert(json: QuestionableTagRenderingConfigJson): QuestionableTagRenderingConfigJson {
json = { ...json }
if (json.question === undefined || json.questionHint !== undefined) {
return json
@@ -82,7 +77,8 @@ class FixQuestionHint extends Script {
}
contents[key] = convertor.convertStrict(
tr,
- ConversionContext.construct([],
+ ConversionContext.construct(
+ [],
["While automatically extracting questiondHints of " + filepath]
)
)
@@ -100,9 +96,10 @@ class FixQuestionHint extends Script {
}
layer.tagRenderings[i] = convertor.convertStrict(
tagRendering,
- ConversionContext.construct([], [
- "While automatically extracting questionHints of " + filepath
- ])
+ ConversionContext.construct(
+ [],
+ ["While automatically extracting questionHints of " + filepath]
+ )
)
}
}
diff --git a/scripts/generateDocs.ts b/scripts/generateDocs.ts
index f85da064c..15e75755d 100644
--- a/scripts/generateDocs.ts
+++ b/scripts/generateDocs.ts
@@ -290,7 +290,9 @@ export class GenerateDocs extends Script {
}
if (denomination.factorToCanonical) {
- els.push(`1${denomination.canonical} = ${denomination.factorToCanonical}${defaultUnit.canonical}`)
+ els.push(
+ `1${denomination.canonical} = ${denomination.factorToCanonical}${defaultUnit.canonical}`
+ )
}
if (denomination.useIfNoUnitGiven === true) {
diff --git a/scripts/generateLayerOverview.ts b/scripts/generateLayerOverview.ts
index c1949be31..a98e2cd9c 100644
--- a/scripts/generateLayerOverview.ts
+++ b/scripts/generateLayerOverview.ts
@@ -9,12 +9,16 @@ import {
DoesImageExist,
PrevalidateTheme,
ValidateLayer,
- ValidateThemeEnsemble
+ ValidateThemeEnsemble,
} from "../src/Models/ThemeConfig/Conversion/Validation"
import { Translation } from "../src/UI/i18n/Translation"
import { PrepareLayer } from "../src/Models/ThemeConfig/Conversion/PrepareLayer"
import { PrepareTheme } from "../src/Models/ThemeConfig/Conversion/PrepareTheme"
-import { Conversion, DesugaringContext, DesugaringStep } from "../src/Models/ThemeConfig/Conversion/Conversion"
+import {
+ Conversion,
+ DesugaringContext,
+ DesugaringStep,
+} from "../src/Models/ThemeConfig/Conversion/Conversion"
import { Utils } from "../src/Utils"
import Script from "./Script"
import { AllSharedLayers } from "../src/Customizations/AllSharedLayers"
@@ -31,7 +35,10 @@ import { Translatable } from "../src/Models/ThemeConfig/Json/Translatable"
import { ValidateThemeAndLayers } from "../src/Models/ThemeConfig/Conversion/ValidateThemeAndLayers"
import { ExtractImages } from "../src/Models/ThemeConfig/Conversion/FixImages"
import { TagRenderingConfigJson } from "../src/Models/ThemeConfig/Json/TagRenderingConfigJson"
-import { LayerConfigDependencyGraph, LevelInfo } from "../src/Models/ThemeConfig/LayerConfigDependencyGraph"
+import {
+ LayerConfigDependencyGraph,
+ LevelInfo,
+} from "../src/Models/ThemeConfig/LayerConfigDependencyGraph"
// This scripts scans 'src/assets/layers/*.json' for layer definition files and 'src/assets/themes/*.json' for theme definition files.
// It spits out an overview of those to be used to load them
@@ -768,7 +775,14 @@ class LayerOverviewUtils extends Script {
const data = JSON.parse(readFileSync(path, "utf8"))
results.push(data)
if (data.id !== expectedId) {
- throw "Wrong ID or location for file " + path + "; expected " + expectedId + " but got " + data.id
+ throw (
+ "Wrong ID or location for file " +
+ path +
+ "; expected " +
+ expectedId +
+ " but got " +
+ data.id
+ )
}
} catch (e) {
throw "Could not parse layer file " + path + " due to " + e
diff --git a/scripts/nsiLogos.ts b/scripts/nsiLogos.ts
index 57a6683e8..22dba7bc7 100644
--- a/scripts/nsiLogos.ts
+++ b/scripts/nsiLogos.ts
@@ -1,5 +1,8 @@
import Script from "./Script"
-import NameSuggestionIndex, { NamgeSuggestionWikidata, NSIItem } from "../src/Logic/Web/NameSuggestionIndex"
+import NameSuggestionIndex, {
+ NamgeSuggestionWikidata,
+ NSIItem,
+} from "../src/Logic/Web/NameSuggestionIndex"
import * as nsiWD from "../node_modules/name-suggestion-index/dist/wikidata.min.json"
import { existsSync, mkdirSync, readFileSync, renameSync, unlinkSync, writeFileSync } from "fs"
import ScriptUtils from "./ScriptUtils"
@@ -215,7 +218,7 @@ class NsiLogos extends Script {
const config: LayerConfigJson = {
id: "nsi_" + type,
description: {
- en: "Exposes part of the NSI to reuse in other themes, e.g. for rendering. Automatically generated and never directly loaded in a theme. Generated with scripts/nsiLogos.ts"
+ en: "Exposes part of the NSI to reuse in other themes, e.g. for rendering. Automatically generated and never directly loaded in a theme. Generated with scripts/nsiLogos.ts",
},
source: "special:library",
pointRendering: null,
@@ -393,7 +396,7 @@ class NsiLogos extends Script {
download: { f: () => this.download(), doc: "Download all icons" },
generateRenderings: {
f: () => this.generateRenderings(),
- doc: "Generates the layer files 'nsi_brand.json' and 'nsi_operator.json' which allows to reuse the icons in renderings"
+ doc: "Generates the layer files 'nsi_brand.json' and 'nsi_operator.json' which allows to reuse the icons in renderings",
},
prune: { f: () => NsiLogos.prune(), doc: "Remove no longer needed files" },
addExtensions: {
diff --git a/src/Logic/FeatureSource/Sources/OverpassFeatureSource.ts b/src/Logic/FeatureSource/Sources/OverpassFeatureSource.ts
index 85ab9d5f8..e78d09fa5 100644
--- a/src/Logic/FeatureSource/Sources/OverpassFeatureSource.ts
+++ b/src/Logic/FeatureSource/Sources/OverpassFeatureSource.ts
@@ -8,7 +8,6 @@ import { Utils } from "../../../Utils"
import { TagsFilter } from "../../Tags/TagsFilter"
import { BBox } from "../../BBox"
import { OsmTags } from "../../../Models/OsmFeature"
-
;("use strict")
/**
diff --git a/src/Logic/GeoOperations.ts b/src/Logic/GeoOperations.ts
index 8981ff429..0c7e893cb 100644
--- a/src/Logic/GeoOperations.ts
+++ b/src/Logic/GeoOperations.ts
@@ -10,12 +10,12 @@ import {
MultiPolygon,
Point,
Polygon,
- Position
+ Position,
} from "geojson"
import { Tiles } from "../Models/TileRange"
import { Utils } from "../Utils"
-("use strict")
+;("use strict")
export class GeoOperations {
private static readonly _earthRadius: number = 6378137
@@ -107,7 +107,10 @@ export class GeoOperations {
* @param lonlat0
* @param lonlat1
*/
- static distanceBetween(lonlat0: [number, number] | Coord | Position, lonlat1: [number, number] | Position | Coord) {
+ static distanceBetween(
+ lonlat0: [number, number] | Coord | Position,
+ lonlat1: [number, number] | Position | Coord
+ ) {
return turf.distance(lonlat0, lonlat1, { units: "meters" })
}
diff --git a/src/Logic/ImageProviders/ImageProvider.ts b/src/Logic/ImageProviders/ImageProvider.ts
index 85c131104..99b23f01b 100644
--- a/src/Logic/ImageProviders/ImageProvider.ts
+++ b/src/Logic/ImageProviders/ImageProvider.ts
@@ -13,7 +13,7 @@ export interface ProvidedImage {
/**
* An alternative ID, used to deduplicate some images
*/
- alt_id?: string,
+ alt_id?: string
date?: Date
status?: string | "ready"
/**
diff --git a/src/Logic/ImageProviders/ImageUploadManager.ts b/src/Logic/ImageProviders/ImageUploadManager.ts
index 437015b82..7cb7a64cd 100644
--- a/src/Logic/ImageProviders/ImageUploadManager.ts
+++ b/src/Logic/ImageProviders/ImageUploadManager.ts
@@ -98,7 +98,11 @@ export class ImageUploadManager {
const tags = await ExifReader.load(file)
if (tags.ProjectionType.value === "cylindrical") {
- return { error: new Translation({ en: "Cylindrical images (typically created by a Panorama-app) are not supported" }) }
+ return {
+ error: new Translation({
+ en: "Cylindrical images (typically created by a Panorama-app) are not supported",
+ }),
+ }
}
return true
@@ -125,7 +129,6 @@ export class ImageUploadManager {
ignoreGPS: boolean | false
}
): void {
-
const tags: OsmTags = tagsStore.data
const featureId = tags.id
@@ -290,7 +293,7 @@ export class ImageUploadManager {
let absoluteUrl: string
try {
- ({ key, value, absoluteUrl } = await this._uploader.uploadImage(
+ ;({ key, value, absoluteUrl } = await this._uploader.uploadImage(
blob,
location,
author,
diff --git a/src/Logic/ImageProviders/Mapillary.ts b/src/Logic/ImageProviders/Mapillary.ts
index 43cdb7ae7..64b477bd6 100644
--- a/src/Logic/ImageProviders/Mapillary.ts
+++ b/src/Logic/ImageProviders/Mapillary.ts
@@ -196,7 +196,10 @@ export class Mapillary extends ImageProvider {
try {
license.date = new Date(date)
} catch (e) {
- console.warn("Could not parse captured_at date from mapillary image. The date is:", date)
+ console.warn(
+ "Could not parse captured_at date from mapillary image. The date is:",
+ date
+ )
}
return license
}
diff --git a/src/Logic/ImageProviders/Panoramax.ts b/src/Logic/ImageProviders/Panoramax.ts
index 15fc7c181..4bcf26742 100644
--- a/src/Logic/ImageProviders/Panoramax.ts
+++ b/src/Logic/ImageProviders/Panoramax.ts
@@ -28,7 +28,8 @@ export default class PanoramaxImageProvider extends ImageProvider {
* const match = url.match(PanoramaxImageProvider.isDirectLink)
* match[1] // => "e931ce57-4591-4dd5-aa4c-595e89c37e84"
*/
- public static readonly isDirectLink = /https:\/\/panoramax.mapcomplete.org\/api\/pictures\/([0-9a-f-]+)\/(hd)|(sd)|(thumb).jpg/
+ public static readonly isDirectLink =
+ /https:\/\/panoramax.mapcomplete.org\/api\/pictures\/([0-9a-f-]+)\/(hd)|(sd)|(thumb).jpg/
public defaultKeyPrefixes: string[] = ["panoramax", "image"]
public readonly name: string = "panoramax"
@@ -51,7 +52,7 @@ export default class PanoramaxImageProvider extends ImageProvider {
new SvelteUIElement(Panoramax_bw),
p.createViewLink({
imageId: img?.id,
- location
+ location,
}),
true
)
@@ -65,14 +66,14 @@ export default class PanoramaxImageProvider extends ImageProvider {
const p = new Panoramax(host)
return p.createViewLink({
imageId: img?.id,
- location
+ location,
})
}
public addKnownMeta(meta: ImageData, url?: string) {
PanoramaxImageProvider.knownMeta[meta.id] = {
data: Promise.resolve({ data: meta, url }),
- time: new Date()
+ time: new Date(),
}
}
@@ -125,7 +126,7 @@ export default class PanoramaxImageProvider extends ImageProvider {
status: meta.properties["geovisio:status"],
rotation: Number(meta.properties["view:azimuth"]),
isSpherical: meta.properties.exif["Xmp.GPano.ProjectionType"] === "equirectangular",
- date: new Date(meta.properties.datetime)
+ date: new Date(meta.properties.datetime),
}
}
@@ -156,7 +157,7 @@ export default class PanoramaxImageProvider extends ImageProvider {
const promise: Promise<{ data: ImageData; url: string }> = this.getInfoForUncached(id)
PanoramaxImageProvider.knownMeta[id] = {
time: new Date(),
- data: promise
+ data: promise,
}
return await promise
}
@@ -215,7 +216,7 @@ export default class PanoramaxImageProvider extends ImageProvider {
return {
artist: meta.data.providers.at(-1).name, // We take the last provider, as that one probably contain the username of the uploader
date: new Date(meta.data.properties["datetime"]),
- licenseShortName: meta.data.properties["geovisio:license"]
+ licenseShortName: meta.data.properties["geovisio:license"],
}
}
@@ -247,8 +248,8 @@ export default class PanoramaxImageProvider extends ImageProvider {
properties: {
url,
northOffset,
- pitchOffset
- }
+ pitchOffset,
+ },
}
}
}
@@ -263,7 +264,6 @@ export class PanoramaxUploader implements ImageUploader {
this.panoramax = new AuthorizedPanoramax(url, token)
}
-
async uploadImage(
blob: File,
currentGps: [number, number],
@@ -287,13 +287,12 @@ export class PanoramaxUploader implements ImageUploader {
throw "Unsupported image format: cylindrical images (panorama images) are currently not supported"
}
if (tags?.GPSLatitude?.value && tags?.GPSLongitude?.value) {
-
const [[latD], [latM], [latS, latSDenom]] = <
[[number, number], [number, number], [number, number]]
- >tags?.GPSLatitude?.value
+ >tags?.GPSLatitude?.value
const [[lonD], [lonM], [lonS, lonSDenom]] = <
[[number, number], [number, number], [number, number]]
- >tags?.GPSLongitude?.value
+ >tags?.GPSLongitude?.value
const exifLat = latD + latM / 60 + latS / (3600 * latSDenom)
const exifLon = lonD + lonM / 60 + lonS / (3600 * lonSDenom)
@@ -335,9 +334,7 @@ export class PanoramaxUploader implements ImageUploader {
} else {
datetime = exifDatetime.toISOString()
}
-
}
-
} catch (e) {
console.warn("Could not read EXIF-tags due to", e)
}
@@ -356,7 +353,7 @@ export class PanoramaxUploader implements ImageUploader {
indexInSequence: sequence["stats:items"].count + 1, // stats:items is '1'-indexed, so .count is also the last index
exifOverride: {
Artist: author,
- }
+ },
}
if (progress) {
options.onProgress = (e: ProgressEvent) => {
@@ -373,7 +370,7 @@ export class PanoramaxUploader implements ImageUploader {
return {
key: "panoramax",
value: img.id,
- absoluteUrl: img.assets.hd.href
+ absoluteUrl: img.assets.hd.href,
}
}
}
diff --git a/src/Logic/Osm/Changes.ts b/src/Logic/Osm/Changes.ts
index a547b0f52..541192c9c 100644
--- a/src/Logic/Osm/Changes.ts
+++ b/src/Logic/Osm/Changes.ts
@@ -54,7 +54,7 @@ export class Changes {
featureSwitchIsTesting?: Store
}
osmConnection: OsmConnection
- reportError?: ((message: string | Error | XMLHttpRequest, extramessage?: string) => void),
+ reportError?: (message: string | Error | XMLHttpRequest, extramessage?: string) => void
featureProperties?: FeaturePropertiesStore
historicalUserLocations?: FeatureSource>
allElements?: IndexedFeatureSource
@@ -694,7 +694,7 @@ export class Changes {
"Refusing change about " +
c.type +
"/" +
- id +
+ id +
" as not in the objects. No internet?"
)
refused.push(c)
diff --git a/src/Logic/Osm/OsmConnection.ts b/src/Logic/Osm/OsmConnection.ts
index d3297978f..c0c5b47f8 100644
--- a/src/Logic/Osm/OsmConnection.ts
+++ b/src/Logic/Osm/OsmConnection.ts
@@ -154,8 +154,8 @@ export class OsmConnection {
constructor(options?: {
dryRun?: Store
fakeUser?: false | boolean
- oauth_token?: UIEventSource,
- shared_cookie?: string,
+ oauth_token?: UIEventSource
+ shared_cookie?: string
// Used to keep multiple changesets open and to write to the correct changeset
singlePage?: boolean
attemptLogin?: boolean
diff --git a/src/Logic/Osm/Overpass.ts b/src/Logic/Osm/Overpass.ts
index b218ea107..7ec59a323 100644
--- a/src/Logic/Osm/Overpass.ts
+++ b/src/Logic/Osm/Overpass.ts
@@ -5,7 +5,6 @@ import { BBox } from "../BBox"
import osmtogeojson from "osmtogeojson"
import { FeatureCollection, Geometry } from "geojson"
import { OsmTags } from "../../Models/OsmFeature"
-
;("use strict")
/**
* Interfaces overpass to get all the latest data
diff --git a/src/Logic/State/UserSettingsMetaTagging.ts b/src/Logic/State/UserSettingsMetaTagging.ts
index 33a5ae85b..6e568c5c3 100644
--- a/src/Logic/State/UserSettingsMetaTagging.ts
+++ b/src/Logic/State/UserSettingsMetaTagging.ts
@@ -1,14 +1,42 @@
import { Utils } from "../../Utils"
/** This code is autogenerated - do not edit. Edit ./assets/layers/usersettings/usersettings.json instead */
export class ThemeMetaTagging {
- public static readonly themeName = "usersettings"
+ public static readonly themeName = "usersettings"
- public metaTaggging_for_usersettings(feat: {properties: Record}) {
- Utils.AddLazyProperty(feat.properties, '_mastodon_candidate_md', () => feat.properties._description.match(/\[[^\]]*\]\((.*(mastodon|en.osm.town).*)\).*/)?.at(1) )
- Utils.AddLazyProperty(feat.properties, '_d', () => feat.properties._description?.replace(/</g,'<')?.replace(/>/g,'>') ?? '' )
- Utils.AddLazyProperty(feat.properties, '_mastodon_candidate_a', () => (feat => {const e = document.createElement('div');e.innerHTML = feat.properties._d;return Array.from(e.getElementsByTagName("a")).filter(a => a.href.match(/mastodon|en.osm.town/) !== null)[0]?.href }) (feat) )
- Utils.AddLazyProperty(feat.properties, '_mastodon_link', () => (feat => {const e = document.createElement('div');e.innerHTML = feat.properties._d;return Array.from(e.getElementsByTagName("a")).filter(a => a.getAttribute("rel")?.indexOf('me') >= 0)[0]?.href})(feat) )
- Utils.AddLazyProperty(feat.properties, '_mastodon_candidate', () => feat.properties._mastodon_candidate_md ?? feat.properties._mastodon_candidate_a )
- feat.properties['__current_backgroun'] = 'initial_value'
- }
-}
\ No newline at end of file
+ public metaTaggging_for_usersettings(feat: { properties: Record }) {
+ Utils.AddLazyProperty(feat.properties, "_mastodon_candidate_md", () =>
+ feat.properties._description
+ .match(/\[[^\]]*\]\((.*(mastodon|en.osm.town).*)\).*/)
+ ?.at(1)
+ )
+ Utils.AddLazyProperty(
+ feat.properties,
+ "_d",
+ () => feat.properties._description?.replace(/</g, "<")?.replace(/>/g, ">") ?? ""
+ )
+ Utils.AddLazyProperty(feat.properties, "_mastodon_candidate_a", () =>
+ ((feat) => {
+ const e = document.createElement("div")
+ e.innerHTML = feat.properties._d
+ return Array.from(e.getElementsByTagName("a")).filter(
+ (a) => a.href.match(/mastodon|en.osm.town/) !== null
+ )[0]?.href
+ })(feat)
+ )
+ Utils.AddLazyProperty(feat.properties, "_mastodon_link", () =>
+ ((feat) => {
+ const e = document.createElement("div")
+ e.innerHTML = feat.properties._d
+ return Array.from(e.getElementsByTagName("a")).filter(
+ (a) => a.getAttribute("rel")?.indexOf("me") >= 0
+ )[0]?.href
+ })(feat)
+ )
+ Utils.AddLazyProperty(
+ feat.properties,
+ "_mastodon_candidate",
+ () => feat.properties._mastodon_candidate_md ?? feat.properties._mastodon_candidate_a
+ )
+ feat.properties["__current_backgroun"] = "initial_value"
+ }
+}
diff --git a/src/Logic/Web/NameSuggestionIndex.ts b/src/Logic/Web/NameSuggestionIndex.ts
index 0bd828301..18ffe33d6 100644
--- a/src/Logic/Web/NameSuggestionIndex.ts
+++ b/src/Logic/Web/NameSuggestionIndex.ts
@@ -361,7 +361,13 @@ export default class NameSuggestionIndex {
return nsi.generateMappings(key, tags, country, center, options)
}
- private static readonly brandPrefix = ["name", "alt_name", "operator", "brand", "official_name"] as const
+ private static readonly brandPrefix = [
+ "name",
+ "alt_name",
+ "operator",
+ "brand",
+ "official_name",
+ ] as const
/**
* An NSI-item might have tags such as `name=X`, `alt_name=brand X`, `brand=X`, `brand:wikidata`, `shop=Y`, `service:abc=yes`
diff --git a/src/Logic/Web/NearbyImagesSearch.ts b/src/Logic/Web/NearbyImagesSearch.ts
index 544d21b74..7e3240409 100644
--- a/src/Logic/Web/NearbyImagesSearch.ts
+++ b/src/Logic/Web/NearbyImagesSearch.ts
@@ -101,7 +101,7 @@ class P4CImageFetcher implements ImageFetcher {
searchRadius,
{
mindate: new Date().getTime() - maxAgeSeconds,
- towardscenter: false
+ towardscenter: false,
}
)
} catch (e) {
@@ -152,9 +152,9 @@ class ImagesInLoadedDataFetcher implements ImageFetcher {
coordinates: { lng: centerpoint[0], lat: centerpoint[1] },
provider: "OpenStreetMap",
details: {
- isSpherical: false
+ isSpherical: false,
},
- osmTags: { image }
+ osmTags: { image },
})
}
})
@@ -170,7 +170,7 @@ class ImagesFromPanoramaxFetcher implements ImageFetcher {
public static readonly apiUrls: ReadonlyArray = [
"https://panoramax.openstreetmap.fr",
"https://api.panoramax.xyz",
- "https://panoramax.mapcomplete.org"
+ "https://panoramax.mapcomplete.org",
]
constructor(url?: string, radius: number = 50) {
@@ -191,7 +191,7 @@ class ImagesFromPanoramaxFetcher implements ImageFetcher {
provider: "panoramax",
direction: imageData.properties["view:azimuth"],
osmTags: {
- panoramax: imageData.id
+ panoramax: imageData.id,
},
thumbUrl: imageData.assets.thumb.href,
date: new Date(imageData.properties.datetime).getTime(),
@@ -200,8 +200,8 @@ class ImagesFromPanoramaxFetcher implements ImageFetcher {
detailsUrl: imageData.id,
details: {
isSpherical:
- imageData.properties["exif"]["Xmp.GPano.ProjectionType"] === "equirectangular"
- }
+ imageData.properties["exif"]["Xmp.GPano.ProjectionType"] === "equirectangular",
+ },
}
}
@@ -209,23 +209,26 @@ class ImagesFromPanoramaxFetcher implements ImageFetcher {
const radiusSettings = [
{
place_fov_tolerance: 180,
- radius: 15
+ radius: 15,
},
{
place_fov_tolerance: 180,
- radius: 25
+ radius: 25,
},
{
place_fov_tolerance: 90,
- radius: 50
- }
+ radius: 50,
+ },
]
const promises: Promise[] = []
const maxRadius = this._radius
let prevRadius = 0
const nearby = this._panoramax.search({
- bbox: new BBox([[lon - 0.0001, lat - 0.0001], [lon + 0.0001, lat + 0.0001]]).toLngLatFlat()
+ bbox: new BBox([
+ [lon - 0.0001, lat - 0.0001],
+ [lon + 0.0001, lat + 0.0001],
+ ]).toLngLatFlat(),
})
promises.push(nearby) // We do a nearby search with bbox, see https://source.mapcomplete.org/MapComplete/MapComplete/issues/2384
for (const radiusSetting of radiusSettings) {
@@ -233,7 +236,7 @@ class ImagesFromPanoramaxFetcher implements ImageFetcher {
place: [lon, lat],
place_distance: [prevRadius, Math.min(maxRadius, radiusSetting.radius)],
place_fov_tolerance: radiusSetting.place_fov_tolerance,
- limit: 50
+ limit: 50,
})
promises.push(promise)
prevRadius = radiusSetting.radius
@@ -277,7 +280,7 @@ class MapillaryFetcher implements ImageFetcher {
boundingBox.getWest(),
boundingBox.getSouth(),
boundingBox.getEast(),
- boundingBox.getNorth()
+ boundingBox.getNorth(),
].join(",") +
"&access_token=" +
encodeURIComponent(Constants.mapillary_client_token_v4) +
@@ -323,17 +326,17 @@ class MapillaryFetcher implements ImageFetcher {
coordinates: { lng: c[0], lat: c[1] },
thumbUrl: img.thumb_256_url,
osmTags: {
- mapillary: img.id
+ mapillary: img.id,
},
details: {
- isSpherical: this._panoramas === "only"
+ isSpherical: this._panoramas === "only",
},
detailsUrl: Mapillary.singleton.visitUrl(img, { lon, lat }),
date: img.captured_at,
license: "CC-BY-SA",
author: img.creator.username,
- direction: img.compass_angle
+ direction: img.compass_angle,
})
}
return pics
@@ -349,7 +352,7 @@ export class CombinedFetcher {
Imgur.apiUrl,
...Imgur.supportingUrls,
...MapillaryFetcher.apiUrls,
- ...ImagesFromPanoramaxFetcher.apiUrls
+ ...ImagesFromPanoramaxFetcher.apiUrls,
]
constructor(radius: number, maxage: Date, indexedFeatures: IndexedFeatureSource) {
@@ -361,15 +364,15 @@ export class CombinedFetcher {
new MapillaryFetcher({
max_images: 25,
start_captured_at: maxage,
- panoramas: "only"
+ panoramas: "only",
}),
new MapillaryFetcher({
max_images: 25,
start_captured_at: maxage,
- panoramas: "no"
+ panoramas: "no",
}),
new P4CImageFetcher("mapillary"),
- new P4CImageFetcher("wikicommons")
+ new P4CImageFetcher("wikicommons"),
].map((f) => new CachedFetcher(f))
}
@@ -387,7 +390,7 @@ export class CombinedFetcher {
const newList = []
const seenIds = new Set()
- for (const p4CPicture of [...sink.data ?? [], ...pics]) {
+ for (const p4CPicture of [...(sink.data ?? []), ...pics]) {
const id = p4CPicture.pictureUrl
if (seenIds.has(id)) {
continue
diff --git a/src/Models/ThemeConfig/Conversion/AddContextToTranslations.ts b/src/Models/ThemeConfig/Conversion/AddContextToTranslations.ts
index 0a9334d05..8c5b1de51 100644
--- a/src/Models/ThemeConfig/Conversion/AddContextToTranslations.ts
+++ b/src/Models/ThemeConfig/Conversion/AddContextToTranslations.ts
@@ -9,7 +9,7 @@ export class AddContextToTranslations extends DesugaringStep {
constructor(prefix = "") {
super(
"AddContextToTranslation",
- "Adds a '_context' to every object that is probably a translation",
+ "Adds a '_context' to every object that is probably a translation"
)
this._prefix = prefix
}
diff --git a/src/Models/ThemeConfig/Conversion/AddPrefixToTagRenderingConfig.ts b/src/Models/ThemeConfig/Conversion/AddPrefixToTagRenderingConfig.ts
index b769ce531..5feb391f7 100644
--- a/src/Models/ThemeConfig/Conversion/AddPrefixToTagRenderingConfig.ts
+++ b/src/Models/ThemeConfig/Conversion/AddPrefixToTagRenderingConfig.ts
@@ -2,7 +2,10 @@ import { DesugaringStep } from "./Conversion"
import SpecialVisualizations from "../../../UI/SpecialVisualizations"
import { Translatable } from "../Json/Translatable"
import { TagConfigJson } from "../Json/TagConfigJson"
-import { MappingConfigJson, QuestionableTagRenderingConfigJson } from "../Json/QuestionableTagRenderingConfigJson"
+import {
+ MappingConfigJson,
+ QuestionableTagRenderingConfigJson,
+} from "../Json/QuestionableTagRenderingConfigJson"
export default class AddPrefixToTagRenderingConfig extends DesugaringStep {
private readonly _prefix: string
@@ -10,7 +13,7 @@ export default class AddPrefixToTagRenderingConfig extends DesugaringStep {
throw new Error(
[
"Detected one or more errors, stopping now:",
- context.getAll("error").map((e) => `${e.context.path.join(".")} (in operation: ${e.context.operation.join(".")}): ${e.message}`)
+ context
+ .getAll("error")
+ .map(
+ (e) =>
+ `${e.context.path.join(
+ "."
+ )} (in operation: ${e.context.operation.join(".")}): ${e.message}`
+ ),
].join("\n\t")
)
}
@@ -107,7 +114,10 @@ export class Bypass extends DesugaringStep {
private readonly _step: DesugaringStep
constructor(applyIf: (t: T) => boolean, step: DesugaringStep) {
- super("Bypass(" + step.name + ")", "Applies the step on the object, if the object satisfies the predicate")
+ super(
+ "Bypass(" + step.name + ")",
+ "Applies the step on the object, if the object satisfies the predicate"
+ )
this._applyIf = applyIf
this._step = step
}
@@ -161,10 +171,7 @@ export class On