Chore: housekeeping

This commit is contained in:
Pieter Vander Vennet 2023-07-28 01:12:42 +02:00
parent 9f2a720341
commit adcd130259
19 changed files with 227 additions and 112 deletions

View file

@ -52,6 +52,7 @@ Special library layer which does not need a '.questions'-prefix before being imp
+ [internet-fee](#internet-fee)
+ [internet-ssid](#internet-ssid)
+ [luminous_or_lit](#luminous_or_lit)
+ [survey_date](#survey_date)
@ -114,6 +115,7 @@ attribute | type | values which are supported by this layer
[<img src='https://mapcomplete.osm.be/assets/svg/statistics.svg' height='18px'>](https://taginfo.openstreetmap.org/keys/internet_access#values) [internet_access](https://wiki.openstreetmap.org/wiki/Key:internet_access) | Multiple choice | [wlan](https://wiki.openstreetmap.org/wiki/Tag:internet_access%3Dwlan) [no](https://wiki.openstreetmap.org/wiki/Tag:internet_access%3Dno) [terminal](https://wiki.openstreetmap.org/wiki/Tag:internet_access%3Dterminal) [wired](https://wiki.openstreetmap.org/wiki/Tag:internet_access%3Dwired)
[<img src='https://mapcomplete.osm.be/assets/svg/statistics.svg' height='18px'>](https://taginfo.openstreetmap.org/keys/internet_access:fee#values) [internet_access:fee](https://wiki.openstreetmap.org/wiki/Key:internet_access:fee) | Multiple choice | [yes](https://wiki.openstreetmap.org/wiki/Tag:internet_access:fee%3Dyes) [no](https://wiki.openstreetmap.org/wiki/Tag:internet_access:fee%3Dno) [customers](https://wiki.openstreetmap.org/wiki/Tag:internet_access:fee%3Dcustomers)
[<img src='https://mapcomplete.osm.be/assets/svg/statistics.svg' height='18px'>](https://taginfo.openstreetmap.org/keys/internet_access:ssid#values) [internet_access:ssid](https://wiki.openstreetmap.org/wiki/Key:internet_access:ssid) | [string](../SpecialInputElements.md#string) | [Telekom](https://wiki.openstreetmap.org/wiki/Tag:internet_access:ssid%3DTelekom)
[<img src='https://mapcomplete.osm.be/assets/svg/statistics.svg' height='18px'>](https://taginfo.openstreetmap.org/keys/survey:date#values) [survey:date](https://wiki.openstreetmap.org/wiki/Key:survey:date) | [date](../SpecialInputElements.md#date) | [](https://wiki.openstreetmap.org/wiki/Tag:survey:date%3D)
@ -754,6 +756,25 @@ The question is *Is this object lit or does it emit light?*
- *This object emits light* corresponds with `luminous=yes`
- *This object is lit externally, e.g. by a spotlight or other lights* corresponds with `lit=yes`
- *This object does not emit light and is not lighted by externally* corresponds with `lit=no&luminous=no`
### survey_date
The question is *When was this object last surveyed?*
This rendering asks information about the property [survey:date](https://wiki.openstreetmap.org/wiki/Key:survey:date)
This is rendered with `This object was last surveyed on <b>{survey:date}</b>`
- *This object was last surveyed today* corresponds with `survey:date=`
This document is autogenerated from [assets/layers/questions/questions.json](https://github.com/pietervdvn/MapComplete/blob/develop/assets/layers/questions/questions.json)

View file

@ -14,7 +14,7 @@ A layer with recycling containers and centres
- This layer is shown at zoomlevel **11** and higher
- This layer is shown at zoomlevel **10** and higher
@ -55,6 +55,7 @@ attribute | type | values which are supported by this layer
[<img src='https://mapcomplete.osm.be/assets/svg/statistics.svg' height='18px'>](https://taginfo.openstreetmap.org/keys/phone#values) [phone](https://wiki.openstreetmap.org/wiki/Key:phone) | [phone](../SpecialInputElements.md#phone) |
[<img src='https://mapcomplete.osm.be/assets/svg/statistics.svg' height='18px'>](https://taginfo.openstreetmap.org/keys/opening_hours#values) [opening_hours](https://wiki.openstreetmap.org/wiki/Key:opening_hours) | [opening_hours](../SpecialInputElements.md#opening_hours) | [24/7](https://wiki.openstreetmap.org/wiki/Tag:opening_hours%3D24/7)
[<img src='https://mapcomplete.osm.be/assets/svg/statistics.svg' height='18px'>](https://taginfo.openstreetmap.org/keys/access#values) [access](https://wiki.openstreetmap.org/wiki/Key:access) | [string](../SpecialInputElements.md#string) | [yes](https://wiki.openstreetmap.org/wiki/Tag:access%3Dyes) [residents](https://wiki.openstreetmap.org/wiki/Tag:access%3Dresidents) [private](https://wiki.openstreetmap.org/wiki/Tag:access%3Dprivate)
[<img src='https://mapcomplete.osm.be/assets/svg/statistics.svg' height='18px'>](https://taginfo.openstreetmap.org/keys/survey:date#values) [survey:date](https://wiki.openstreetmap.org/wiki/Key:survey:date) | [date](../SpecialInputElements.md#date) | [](https://wiki.openstreetmap.org/wiki/Tag:survey:date%3D)
@ -341,6 +342,25 @@ This is rendered with `This recycling facility can be used by {access}`
### survey_date
The question is *When was this object last surveyed?*
This rendering asks information about the property [survey:date](https://wiki.openstreetmap.org/wiki/Key:survey:date)
This is rendered with `This object was last surveyed on <b>{survey:date}</b>`
- *This object was last surveyed today* corresponds with `survey:date=`
### leftover-questions

View file

@ -14,7 +14,7 @@ Waste Disposal Bin, medium to large bin for disposal of (household) waste
- This layer is shown at zoomlevel **18** and higher
- This layer is shown at zoomlevel **12** and higher

View file

@ -10311,6 +10311,15 @@
"description": "Layer 'Recycling' shows access=private with a fixed text, namely 'This recycling facility is only for private use' and allows to pick this as a default answer (in the MapComplete.osm.be theme 'Personal theme')",
"value": "private"
},
{
"key": "survey:date",
"description": "Layer 'Recycling' shows and asks freeform values for key 'survey:date' (in the MapComplete.osm.be theme 'Personal theme')"
},
{
"key": "survey:date",
"description": "Layer 'Recycling' shows survey:date= with a fixed text, namely 'This object was last surveyed today' and allows to pick this as a default answer (in the MapComplete.osm.be theme 'Personal theme') Picking this answer will delete the key survey:date.",
"value": ""
},
{
"key": "amenity",
"description": "The MapComplete theme Personal theme has a layer Primary and secondary schools showing features with this tag",

View file

@ -350,6 +350,15 @@
"description": "Layer 'Recycling' shows access=private with a fixed text, namely 'This recycling facility is only for private use' and allows to pick this as a default answer (in the MapComplete.osm.be theme 'Waste')",
"value": "private"
},
{
"key": "survey:date",
"description": "Layer 'Recycling' shows and asks freeform values for key 'survey:date' (in the MapComplete.osm.be theme 'Waste')"
},
{
"key": "survey:date",
"description": "Layer 'Recycling' shows survey:date= with a fixed text, namely 'This object was last surveyed today' and allows to pick this as a default answer (in the MapComplete.osm.be theme 'Waste') Picking this answer will delete the key survey:date.",
"value": ""
},
{
"key": "amenity",
"description": "The MapComplete theme Waste has a layer Waste Disposal Bins showing features with this tag",

View file

@ -1,19 +1,13 @@
{
"id": "mapcomplete-changes",
"title": {
"en": "Changes made with MapComplete",
"de": "Mit MapComplete erstellte Änderungen",
"nl": "Wijzigingen gemaakt met MapComplete"
"en": "Changes made with MapComplete"
},
"shortDescription": {
"en": "Show changes made with MapComplete",
"de": "Mit MapComplete erstellte Änderungen anzeigen",
"nl": "Toon wijzigingen gemaakt met MapComplete"
"en": "Shows changes made by MapComplete"
},
"description": {
"en": "This maps shows all the changes made with MapComplete",
"de": "Diese Karte zeigt alle mit MapComplete vorgenommenen Änderungen",
"nl": "Deze kaart toont alle wijzigingen die met MapComplete gemaakt werden"
"en": "This maps shows all the changes made with MapComplete"
},
"icon": "./assets/svg/logo.svg",
"hideFromOverview": true,
@ -26,9 +20,7 @@
{
"id": "mapcomplete-changes",
"name": {
"en": "Changeset centers",
"de": "Zentrum der Änderungssätze",
"nl": "Centerpunt van changeset"
"en": "Changeset centers"
},
"minzoom": 0,
"source": {
@ -39,51 +31,41 @@
},
"title": {
"render": {
"en": "Changeset for {theme}",
"de": "Änderungssatz für {theme}"
"en": "Changeset for {theme}"
}
},
"description": {
"en": "Show all MapComplete changes",
"de": "Alle MapComplete-Änderungen anzeigen",
"nl": "Toon alle MapComplete wijzigingen"
"en": "Shows all MapComplete changes"
},
"tagRenderings": [
{
"id": "show_changeset_id",
"render": {
"en": "Changeset <a href='https://openstreetmap.org/changeset/{id}' target='_blank'>{id}</a>",
"de": "Änderungssatz <a href='https://openstreetmap.org/changeset/{id}' target='_blank'>{id}</a>"
"en": "Changeset <a href='https://openstreetmap.org/changeset/{id}' target='_blank'>{id}</a>"
}
},
{
"id": "contributor",
"question": {
"en": "Which contributor made this change?",
"de": "Welcher Mitwirkende hat diese Änderung vorgenommen?",
"nl": "Welke bijdrager maakte deze wijziging?"
"en": "What contributor did make this change?"
},
"freeform": {
"key": "user"
},
"render": {
"en": "Change made by <a href='https://openstreetmap.org/user/{user}' target='_blank'>{user}</a>",
"de": "Änderung gemacht von <a href='https://openstreetmap.org/user/{user}' target='_blank'>{user}</a>",
"nl": "Wijziging gemaakt door <a href='https://openstreetmap.org/user/{user}' target='_blank'>{user}</a>"
"en": "Change made by <a href='https://openstreetmap.org/user/{user}' target='_blank'>{user}</a>"
}
},
{
"id": "theme-id",
"question": {
"en": "What theme was used to make this change?",
"de": "Welches Thema wurde für diese Änderung verwendet?"
"en": "What theme was used to make this change?"
},
"freeform": {
"key": "theme"
},
"render": {
"en": "Change with theme <a href='https://mapcomplete.osm.be/{theme}'>{theme}</a>",
"de": "Geändert mit Thema <a href='https://mapcomplete.osm.be/{theme}'>{theme}</a>"
"en": "Change with theme <a href='https://mapcomplete.osm.be/{theme}'>{theme}</a>"
}
},
{
@ -92,27 +74,19 @@
"key": "locale"
},
"question": {
"en": "What locale (language) was this change made in?",
"de": "In welcher Sprache wurde diese Änderung vorgenommen?",
"nl": "In welke locale (taal) werd deze wijziging gemaakt?"
"en": "What locale (language) was this change made in?"
},
"render": {
"en": "User locale is {locale}",
"de": "Usersprache ist {locale}",
"nl": "De gebruikerstaal is {locale}"
"en": "User locale is {locale}"
}
},
{
"id": "host",
"render": {
"en": "Change made with <a href='{host}'>{host}</a>",
"de": "Änderung vorgenommen mit <a href='{host}'>{host}</a>",
"nl": "Wijziging gemaakt met <a href='{host}'>{host}</a>"
"en": "Change with with <a href='{host}'>{host}</a>"
},
"question": {
"en": "What host (website) was this change made with?",
"de": "Mit welchem Host / welcher Website wurde diese Änderung gemacht?",
"nl": "Met welke host (website) werd deze wijziging gemaakt?"
"en": "What host (website) was this change made with?"
},
"freeform": {
"key": "host"
@ -133,12 +107,10 @@
{
"id": "version",
"question": {
"en": "What version of MapComplete was used to make this change?",
"de": "Mit welcher Version von MapComplete wurde diese Änderung gemacht?"
"en": "What version of MapComplete was used to make this change?"
},
"render": {
"en": "Made with {editor}",
"de": "Erstellt mit {editor}"
"en": "Made with {editor}"
},
"freeform": {
"key": "editor"
@ -480,9 +452,7 @@
}
],
"question": {
"en": "Theme name contains {search}",
"de": "Themenname enthält {search}",
"nl": "Themenaam bevat {search}"
"en": "Themename contains {search}"
}
}
]
@ -498,9 +468,7 @@
}
],
"question": {
"en": "Made by contributor {search}",
"de": "Erstellt von {search}",
"nl": "Gemaakt door bijdrager {search}"
"en": "Made by contributor {search}"
}
}
]
@ -516,9 +484,7 @@
}
],
"question": {
"en": "<b>Not</b> made by contributor {search}",
"de": "<b>Nicht</b> erstellt von {search}",
"nl": "<b>Niet</b> gemaakt door bijdrager {search}"
"en": "<b>Not</b> made by contributor {search}"
}
}
]
@ -535,9 +501,7 @@
}
],
"question": {
"en": "Made before {search}",
"de": "Erstellt vor {search}",
"nl": "Gemaakt voor {search}"
"en": "Made before {search}"
}
}
]
@ -554,9 +518,7 @@
}
],
"question": {
"en": "Made after {search}",
"de": "Erstellt nach {search}",
"nl": "Gemaakt na {search}"
"en": "Made after {search}"
}
}
]
@ -572,9 +534,7 @@
}
],
"question": {
"en": "User language (iso-code) {search}",
"de": "Benutzersprache (ISO-Code) {search}",
"nl": "De taal van de bijdrager is {search}"
"en": "User language (iso-code) {search}"
}
}
]
@ -590,9 +550,7 @@
}
],
"question": {
"en": "Made with host {search}",
"de": "Erstellt mit Host {search}",
"nl": "Gemaakt met host {search}"
"en": "Made with host {search}"
}
}
]
@ -603,9 +561,7 @@
{
"osmTags": "add-image>0",
"question": {
"en": "Changeset added at least one image",
"de": "Changeset fügte mindestens ein Bild hinzu",
"nl": "Changeset bevat minstens één afbeelding"
"en": "Changeset added at least one image"
}
}
]
@ -620,8 +576,7 @@
{
"id": "link_to_more",
"render": {
"en": "More statistics can be found <a href='https://github.com/pietervdvn/MapComplete/tree/develop/Docs/Tools/graphs' target='_blank'>here</a>",
"de": "Mehr Statistiken gibt es <a href='https://github.com/pietervdvn/MapComplete/tree/develop/Docs/Tools/graphs' target='_blank'>hier</a>"
"en": "More statistics can be found <a href='https://github.com/pietervdvn/MapComplete/tree/develop/Docs/Tools/graphs' target='_blank'>here</a>"
}
},
{

View file

@ -7318,6 +7318,15 @@
},
"question": "Is smoking allowed at {title()}?"
},
"survey_date": {
"mappings": {
"0": {
"then": "This object was last surveyed today"
}
},
"question": "When was this object last surveyed?",
"render": "This object was last surveyed on <b>{survey:date}</b>"
},
"website": {
"question": "What is the website of {title()}?"
},

View file

@ -769,6 +769,17 @@
},
"kerbs_and_crossings": {
"description": "Un mapa amb voreres i encreuaments.",
"layers": {
"1": {
"override": {
"=presets": {
"0": {
"title": "un pas de vianants"
}
}
}
}
},
"title": "Vorals i encreuaments"
},
"maproulette": {

View file

@ -610,6 +610,18 @@
},
"kerbs_and_crossings": {
"description": "Et kort, der viser kantsten og overgange.",
"layers": {
"1": {
"override": {
"=presets": {
"0": {
"description": "Overgang for fodgængere og/eller cyklister",
"title": "en overgang"
}
}
}
}
},
"title": "Kantsten og overgange"
},
"maproulette": {

View file

@ -927,6 +927,18 @@
},
"kerbs_and_crossings": {
"description": "Eine Karte mit Bordsteinen und Überwegen.",
"layers": {
"1": {
"override": {
"=presets": {
"0": {
"description": "Kreuzung für Fußgänger und/oder Radfahrer",
"title": "eine Kreuzung"
}
}
}
}
},
"title": "Bordsteine und Überwege"
},
"mapcomplete-changes": {

View file

@ -927,6 +927,18 @@
},
"kerbs_and_crossings": {
"description": "A map showing kerbs and crossings.",
"layers": {
"1": {
"override": {
"=presets": {
"0": {
"description": "Crossing for pedestrians and/or cyclists",
"title": "a crossing"
}
}
}
}
},
"title": "Kerbs and crossings"
},
"mapcomplete-changes": {

View file

@ -769,6 +769,18 @@
},
"kerbs_and_crossings": {
"description": "Un mapa que muestra bordillos y cruces.",
"layers": {
"1": {
"override": {
"=presets": {
"0": {
"description": "Cruce para peatones y/o ciclistas",
"title": "un cruce"
}
}
}
}
},
"title": "Bordillos y cruces"
},
"maproulette": {

View file

@ -763,6 +763,18 @@
},
"kerbs_and_crossings": {
"description": "Une carte affichant les ressauts et traversées.",
"layers": {
"1": {
"override": {
"=presets": {
"0": {
"description": "Traversée pour piétons et/ou cyclistes",
"title": "une traversée"
}
}
}
}
},
"title": "Ressauts et traversées"
},
"maproulette": {

View file

@ -922,6 +922,18 @@
},
"kerbs_and_crossings": {
"description": "Een kaart met stoepranden en oversteekplaatsen.",
"layers": {
"1": {
"override": {
"=presets": {
"0": {
"description": "Oversteekplaats voor voetgangers en/of fietsers",
"title": "een oversteekplaats"
}
}
}
}
},
"title": "Stoepranden en oversteekplaatsen"
},
"mapcomplete-changes": {

View file

@ -1,26 +1,30 @@
import LayoutConfig from "../Models/ThemeConfig/LayoutConfig"
import {QueryParameters} from "./Web/QueryParameters"
import {AllKnownLayouts} from "../Customizations/AllKnownLayouts"
import {FixedUiElement} from "../UI/Base/FixedUiElement"
import {Utils} from "../Utils"
import { QueryParameters } from "./Web/QueryParameters"
import { AllKnownLayouts } from "../Customizations/AllKnownLayouts"
import { FixedUiElement } from "../UI/Base/FixedUiElement"
import { Utils } from "../Utils"
import Combine from "../UI/Base/Combine"
import {SubtleButton} from "../UI/Base/SubtleButton"
import { SubtleButton } from "../UI/Base/SubtleButton"
import BaseUIElement from "../UI/BaseUIElement"
import {UIEventSource} from "./UIEventSource"
import {LocalStorageSource} from "./Web/LocalStorageSource"
import { UIEventSource } from "./UIEventSource"
import { LocalStorageSource } from "./Web/LocalStorageSource"
import LZString from "lz-string"
import {FixLegacyTheme} from "../Models/ThemeConfig/Conversion/LegacyJsonConvert"
import {LayerConfigJson} from "../Models/ThemeConfig/Json/LayerConfigJson"
import { FixLegacyTheme } from "../Models/ThemeConfig/Conversion/LegacyJsonConvert"
import { LayerConfigJson } from "../Models/ThemeConfig/Json/LayerConfigJson"
import known_layers from "../assets/generated/known_layers.json"
import {PrepareTheme} from "../Models/ThemeConfig/Conversion/PrepareTheme"
import { PrepareTheme } from "../Models/ThemeConfig/Conversion/PrepareTheme"
import licenses from "../assets/generated/license_info.json"
import TagRenderingConfig from "../Models/ThemeConfig/TagRenderingConfig"
import {FixImages} from "../Models/ThemeConfig/Conversion/FixImages"
import { FixImages } from "../Models/ThemeConfig/Conversion/FixImages"
import Svg from "../Svg"
import questions from "../assets/generated/layers/questions.json"
import {DoesImageExist, PrevalidateTheme, ValidateThemeAndLayers,} from "../Models/ThemeConfig/Conversion/Validation"
import {DesugaringContext} from "../Models/ThemeConfig/Conversion/Conversion"
import {TagRenderingConfigJson} from "../Models/ThemeConfig/Json/TagRenderingConfigJson"
import {
DoesImageExist,
PrevalidateTheme,
ValidateThemeAndLayers,
} from "../Models/ThemeConfig/Conversion/Validation"
import { DesugaringContext } from "../Models/ThemeConfig/Conversion/Conversion"
import { TagRenderingConfigJson } from "../Models/ThemeConfig/Json/TagRenderingConfigJson"
import Hash from "./Web/Hash"
export default class DetermineLayout {

View file

@ -10,7 +10,12 @@ import { Utils } from "../../Utils"
class FeatureSwitchUtils {
static initSwitch(key: string, deflt: boolean, documentation: string): UIEventSource<boolean> {
const defaultValue = deflt
const queryParam = QueryParameters.GetQueryParameter(key, "" + defaultValue, documentation, {stackOffset: -1})
const queryParam = QueryParameters.GetQueryParameter(
key,
"" + defaultValue,
documentation,
{ stackOffset: -1 }
)
// It takes the current layout, extracts the default value for this query parameter. A query parameter event source is then retrieved and flattened
return queryParam.sync(

View file

@ -66,7 +66,7 @@ export class QueryParameters {
documentation?: string
): UIEventSource<boolean> {
return UIEventSource.asBoolean(
QueryParameters.GetQueryParameter(key, "" + deflt, documentation, {stackOffset: -1})
QueryParameters.GetQueryParameter(key, "" + deflt, documentation, { stackOffset: -1 })
)
}

View file

@ -1,11 +1,11 @@
{
"contributors": [
{
"commits": 5819,
"commits": 5849,
"contributor": "Pieter Vander Vennet"
},
{
"commits": 384,
"commits": 388,
"contributor": "Robin van der Linde"
},
{
@ -61,7 +61,7 @@
"contributor": "AlexanderRebai"
},
{
"commits": 19,
"commits": 20,
"contributor": "dependabot[bot]"
},
{
@ -110,11 +110,11 @@
},
{
"commits": 10,
"contributor": "LiamSimons"
"contributor": "Thibault Molleman"
},
{
"commits": 9,
"contributor": "Thibault Molleman"
"commits": 10,
"contributor": "LiamSimons"
},
{
"commits": 9,
@ -128,6 +128,10 @@
"commits": 8,
"contributor": "Mateusz Konieczny"
},
{
"commits": 7,
"contributor": "pelderson"
},
{
"commits": 7,
"contributor": "OliNau"
@ -148,10 +152,6 @@
"commits": 6,
"contributor": "danieldegroot2"
},
{
"commits": 6,
"contributor": "pelderson"
},
{
"commits": 4,
"contributor": "Nadhem"

View file

@ -1,11 +1,11 @@
{
"contributors": [
{
"commits": 286,
"commits": 289,
"contributor": "kjon"
},
{
"commits": 276,
"commits": 277,
"contributor": "Pieter Vander Vennet"
},
{
@ -50,11 +50,11 @@
},
{
"commits": 25,
"contributor": "Reza Almanda"
"contributor": "Lucas"
},
{
"commits": 24,
"contributor": "Lucas"
"commits": 25,
"contributor": "Reza Almanda"
},
{
"commits": 22,
@ -124,6 +124,10 @@
"commits": 10,
"contributor": "Irina"
},
{
"commits": 9,
"contributor": "deep map"
},
{
"commits": 9,
"contributor": "Jaime Marquínez Ferrándiz"
@ -204,10 +208,6 @@
"commits": 6,
"contributor": "lvgx"
},
{
"commits": 5,
"contributor": "deep map"
},
{
"commits": 5,
"contributor": "Piotr Strebski"
@ -248,6 +248,10 @@
"commits": 5,
"contributor": "Alexey Shabanov"
},
{
"commits": 4,
"contributor": "Emory Shaw"
},
{
"commits": 4,
"contributor": "André Marcelo Alvarenga"
@ -276,10 +280,6 @@
"commits": 4,
"contributor": "Jan Zabel"
},
{
"commits": 3,
"contributor": "Emory Shaw"
},
{
"commits": 3,
"contributor": "Alexey Lutskyi"