forked from MapComplete/MapComplete
Chore: housekeeping
This commit is contained in:
parent
8178c5607b
commit
cd0d275965
73 changed files with 2105 additions and 2219 deletions
|
@ -283,7 +283,7 @@ attribute | type | values which are supported by this layer
|
|||
[<img src='https://mapcomplete.org/assets/svg/statistics.svg' height='18px'>](https://taginfo.openstreetmap.org/keys/fee#values) [fee](https://wiki.openstreetmap.org/wiki/Key:fee) | Multiple choice | [no](https://wiki.openstreetmap.org/wiki/Tag:fee%3Dno) [no](https://wiki.openstreetmap.org/wiki/Tag:fee%3Dno) [yes](https://wiki.openstreetmap.org/wiki/Tag:fee%3Dyes) [yes](https://wiki.openstreetmap.org/wiki/Tag:fee%3Dyes)
|
||||
[<img src='https://mapcomplete.org/assets/svg/statistics.svg' height='18px'>](https://taginfo.openstreetmap.org/keys/charge#values) [charge](https://wiki.openstreetmap.org/wiki/Key:charge) | [string](../SpecialInputElements.md#string) |
|
||||
[<img src='https://mapcomplete.org/assets/svg/statistics.svg' height='18px'>](https://taginfo.openstreetmap.org/keys/authentication:phone_call:number#values) [authentication:phone_call:number](https://wiki.openstreetmap.org/wiki/Key:authentication:phone_call:number) | [phone](../SpecialInputElements.md#phone) |
|
||||
[<img src='https://mapcomplete.org/assets/svg/statistics.svg' height='18px'>](https://taginfo.openstreetmap.org/keys/maxstay#values) [maxstay](https://wiki.openstreetmap.org/wiki/Key:maxstay) | [string](../SpecialInputElements.md#string) | [unlimited](https://wiki.openstreetmap.org/wiki/Tag:maxstay%3Dunlimited)
|
||||
[<img src='https://mapcomplete.org/assets/svg/statistics.svg' height='18px'>](https://taginfo.openstreetmap.org/keys/maxstay#values) [maxstay](https://wiki.openstreetmap.org/wiki/Key:maxstay) | [pfloat](../SpecialInputElements.md#pfloat) | [unlimited](https://wiki.openstreetmap.org/wiki/Tag:maxstay%3Dunlimited)
|
||||
[<img src='https://mapcomplete.org/assets/svg/statistics.svg' height='18px'>](https://taginfo.openstreetmap.org/keys/network#values) [network](https://wiki.openstreetmap.org/wiki/Key:network) | [string](../SpecialInputElements.md#string) | [AeroVironment](https://wiki.openstreetmap.org/wiki/Tag:network%3DAeroVironment) [Blink](https://wiki.openstreetmap.org/wiki/Tag:network%3DBlink) [EVgo](https://wiki.openstreetmap.org/wiki/Tag:network%3DEVgo) [Allego](https://wiki.openstreetmap.org/wiki/Tag:network%3DAllego) [Blue Corner](https://wiki.openstreetmap.org/wiki/Tag:network%3DBlue Corner) [Tesla](https://wiki.openstreetmap.org/wiki/Tag:network%3DTesla)
|
||||
[<img src='https://mapcomplete.org/assets/svg/statistics.svg' height='18px'>](https://taginfo.openstreetmap.org/keys/operator#values) [operator](https://wiki.openstreetmap.org/wiki/Key:operator) | [string](../SpecialInputElements.md#string) |
|
||||
[<img src='https://mapcomplete.org/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) |
|
||||
|
|
|
@ -277,7 +277,7 @@ attribute | type | values which are supported by this layer
|
|||
[<img src='https://mapcomplete.org/assets/svg/statistics.svg' height='18px'>](https://taginfo.openstreetmap.org/keys/fee#values) [fee](https://wiki.openstreetmap.org/wiki/Key:fee) | Multiple choice | [no](https://wiki.openstreetmap.org/wiki/Tag:fee%3Dno) [no](https://wiki.openstreetmap.org/wiki/Tag:fee%3Dno) [yes](https://wiki.openstreetmap.org/wiki/Tag:fee%3Dyes) [yes](https://wiki.openstreetmap.org/wiki/Tag:fee%3Dyes)
|
||||
[<img src='https://mapcomplete.org/assets/svg/statistics.svg' height='18px'>](https://taginfo.openstreetmap.org/keys/charge#values) [charge](https://wiki.openstreetmap.org/wiki/Key:charge) | [string](../SpecialInputElements.md#string) |
|
||||
[<img src='https://mapcomplete.org/assets/svg/statistics.svg' height='18px'>](https://taginfo.openstreetmap.org/keys/authentication:phone_call:number#values) [authentication:phone_call:number](https://wiki.openstreetmap.org/wiki/Key:authentication:phone_call:number) | [phone](../SpecialInputElements.md#phone) |
|
||||
[<img src='https://mapcomplete.org/assets/svg/statistics.svg' height='18px'>](https://taginfo.openstreetmap.org/keys/maxstay#values) [maxstay](https://wiki.openstreetmap.org/wiki/Key:maxstay) | [string](../SpecialInputElements.md#string) | [unlimited](https://wiki.openstreetmap.org/wiki/Tag:maxstay%3Dunlimited)
|
||||
[<img src='https://mapcomplete.org/assets/svg/statistics.svg' height='18px'>](https://taginfo.openstreetmap.org/keys/maxstay#values) [maxstay](https://wiki.openstreetmap.org/wiki/Key:maxstay) | [pfloat](../SpecialInputElements.md#pfloat) | [unlimited](https://wiki.openstreetmap.org/wiki/Tag:maxstay%3Dunlimited)
|
||||
[<img src='https://mapcomplete.org/assets/svg/statistics.svg' height='18px'>](https://taginfo.openstreetmap.org/keys/network#values) [network](https://wiki.openstreetmap.org/wiki/Key:network) | [string](../SpecialInputElements.md#string) | [AeroVironment](https://wiki.openstreetmap.org/wiki/Tag:network%3DAeroVironment) [Blink](https://wiki.openstreetmap.org/wiki/Tag:network%3DBlink) [EVgo](https://wiki.openstreetmap.org/wiki/Tag:network%3DEVgo) [Allego](https://wiki.openstreetmap.org/wiki/Tag:network%3DAllego) [Blue Corner](https://wiki.openstreetmap.org/wiki/Tag:network%3DBlue Corner) [Tesla](https://wiki.openstreetmap.org/wiki/Tag:network%3DTesla)
|
||||
[<img src='https://mapcomplete.org/assets/svg/statistics.svg' height='18px'>](https://taginfo.openstreetmap.org/keys/operator#values) [operator](https://wiki.openstreetmap.org/wiki/Key:operator) | [string](../SpecialInputElements.md#string) |
|
||||
[<img src='https://mapcomplete.org/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) |
|
||||
|
|
|
@ -98,7 +98,7 @@ attribute | type | values which are supported by this layer
|
|||
[<img src='https://mapcomplete.org/assets/svg/statistics.svg' height='18px'>](https://taginfo.openstreetmap.org/keys/entrance#values) [entrance](https://wiki.openstreetmap.org/wiki/Key:entrance) | Multiple choice | [](https://wiki.openstreetmap.org/wiki/Tag:entrance%3D) [main](https://wiki.openstreetmap.org/wiki/Tag:entrance%3Dmain) [secondary](https://wiki.openstreetmap.org/wiki/Tag:entrance%3Dsecondary) [service](https://wiki.openstreetmap.org/wiki/Tag:entrance%3Dservice) [exit](https://wiki.openstreetmap.org/wiki/Tag:entrance%3Dexit) [entrance](https://wiki.openstreetmap.org/wiki/Tag:entrance%3Dentrance) [emergency](https://wiki.openstreetmap.org/wiki/Tag:entrance%3Demergency) [home](https://wiki.openstreetmap.org/wiki/Tag:entrance%3Dhome)
|
||||
[<img src='https://mapcomplete.org/assets/svg/statistics.svg' height='18px'>](https://taginfo.openstreetmap.org/keys/door#values) [door](https://wiki.openstreetmap.org/wiki/Key:door) | Multiple choice | [hinged](https://wiki.openstreetmap.org/wiki/Tag:door%3Dhinged) [revolving](https://wiki.openstreetmap.org/wiki/Tag:door%3Drevolving) [sliding](https://wiki.openstreetmap.org/wiki/Tag:door%3Dsliding) [overhead](https://wiki.openstreetmap.org/wiki/Tag:door%3Doverhead) [no](https://wiki.openstreetmap.org/wiki/Tag:door%3Dno)
|
||||
[<img src='https://mapcomplete.org/assets/svg/statistics.svg' height='18px'>](https://taginfo.openstreetmap.org/keys/automatic_door#values) [automatic_door](https://wiki.openstreetmap.org/wiki/Key:automatic_door) | Multiple choice | [no](https://wiki.openstreetmap.org/wiki/Tag:automatic_door%3Dno) [motion](https://wiki.openstreetmap.org/wiki/Tag:automatic_door%3Dmotion) [floor](https://wiki.openstreetmap.org/wiki/Tag:automatic_door%3Dfloor) [button](https://wiki.openstreetmap.org/wiki/Tag:automatic_door%3Dbutton) [slowdown_button](https://wiki.openstreetmap.org/wiki/Tag:automatic_door%3Dslowdown_button) [continuous](https://wiki.openstreetmap.org/wiki/Tag:automatic_door%3Dcontinuous) [serviced_on_button_press](https://wiki.openstreetmap.org/wiki/Tag:automatic_door%3Dserviced_on_button_press) [serviced_on_request](https://wiki.openstreetmap.org/wiki/Tag:automatic_door%3Dserviced_on_request)
|
||||
[<img src='https://mapcomplete.org/assets/svg/statistics.svg' height='18px'>](https://taginfo.openstreetmap.org/keys/width#values) [width](https://wiki.openstreetmap.org/wiki/Key:width) | [string](../SpecialInputElements.md#string) |
|
||||
[<img src='https://mapcomplete.org/assets/svg/statistics.svg' height='18px'>](https://taginfo.openstreetmap.org/keys/width#values) [width](https://wiki.openstreetmap.org/wiki/Key:width) | [pfloat](../SpecialInputElements.md#pfloat) |
|
||||
[<img src='https://mapcomplete.org/assets/svg/statistics.svg' height='18px'>](https://taginfo.openstreetmap.org/keys/kerb:height#values) [kerb:height](https://wiki.openstreetmap.org/wiki/Key:kerb:height) | [pnat](../SpecialInputElements.md#pnat) | [0](https://wiki.openstreetmap.org/wiki/Tag:kerb:height%3D0)
|
||||
|
||||
|
||||
|
|
|
@ -31,6 +31,7 @@ Available languages:
|
|||
|
||||
|
||||
- en
|
||||
- de
|
||||
|
||||
|
||||
This document is autogenerated from [assets/themes/mapcomplete-changes/mapcomplete-changes.json](https://github.com/pietervdvn/MapComplete/blob/develop/assets/themes/mapcomplete-changes/mapcomplete-changes.json)
|
||||
|
|
|
@ -398,7 +398,7 @@ This documentation is defined in the source code at [InitialMapPositioning.ts](/
|
|||
|
||||
Used to complete the login
|
||||
|
||||
This documentation is defined in the source code at [ThemeViewState.ts](/src/Models/ThemeViewState.ts#L172)
|
||||
This documentation is defined in the source code at [ThemeViewState.ts](/src/Models/ThemeViewState.ts#L175)
|
||||
|
||||
No default value set
|
||||
|
||||
|
|
|
@ -3330,4 +3330,4 @@
|
|||
},
|
||||
"neededChangesets": 10
|
||||
}
|
||||
}
|
||||
}
|
|
@ -822,7 +822,8 @@
|
|||
"if": "incline=",
|
||||
"then": {
|
||||
"en": "There is (probably) no incline here",
|
||||
"de": "Hier gibt es (wahrscheinlich) keine Steigung"
|
||||
"de": "Hier gibt es (wahrscheinlich) keine Steigung",
|
||||
"nl": "De straat hier is (waarschijnlijk) zonder helling"
|
||||
},
|
||||
"hideInAnswer": true
|
||||
},
|
||||
|
|
|
@ -3,12 +3,7 @@
|
|||
"name": null,
|
||||
"description": "This 'layer' is not really a layer, but contains part of the code how the popup to 'add a new marker' is displayed",
|
||||
"source": "special",
|
||||
"isShown": {
|
||||
"or": [
|
||||
"has_presets=yes",
|
||||
"has_note_layer=yes"
|
||||
]
|
||||
},
|
||||
"isShown": "mouse_button=right",
|
||||
"title": {
|
||||
"mappings": [
|
||||
{
|
||||
|
@ -56,7 +51,6 @@
|
|||
},
|
||||
"popupInFloatover": true,
|
||||
"titleIcons": [],
|
||||
"isShown": "mouse_button=right",
|
||||
"pointRendering": [
|
||||
{
|
||||
"marker": [
|
||||
|
|
|
@ -27,13 +27,6 @@
|
|||
"advertising": {
|
||||
"name": "Reclame",
|
||||
"presets": {
|
||||
"10": {
|
||||
"description": "Een stuk groot, weerbestendig textiel met opgedrukte reclameboodschap die permanent aan de muur hangt",
|
||||
"title": "een spandoek"
|
||||
},
|
||||
"14": {
|
||||
"title": "een muurschildering"
|
||||
},
|
||||
"4": {
|
||||
"description": "Een klein uithangbord voor buurtadvertenties, meestal gericht op voetgangers",
|
||||
"title": "een uithangbord"
|
||||
|
@ -50,6 +43,13 @@
|
|||
},
|
||||
"8": {
|
||||
"title": "een scherm op een muur"
|
||||
},
|
||||
"10": {
|
||||
"description": "Een stuk groot, weerbestendig textiel met opgedrukte reclameboodschap die permanent aan de muur hangt",
|
||||
"title": "een spandoek"
|
||||
},
|
||||
"14": {
|
||||
"title": "een muurschildering"
|
||||
}
|
||||
},
|
||||
"tagRenderings": {
|
||||
|
@ -107,9 +107,6 @@
|
|||
},
|
||||
"title": {
|
||||
"mappings": {
|
||||
"10": {
|
||||
"then": "Muurschildering"
|
||||
},
|
||||
"3": {
|
||||
"then": "Aanplakzuil"
|
||||
},
|
||||
|
@ -127,6 +124,9 @@
|
|||
},
|
||||
"9": {
|
||||
"then": "Aanplakzuil"
|
||||
},
|
||||
"10": {
|
||||
"then": "Muurschildering"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -208,15 +208,6 @@
|
|||
"1": {
|
||||
"then": "Muurschildering"
|
||||
},
|
||||
"10": {
|
||||
"then": "Azulejo (Spaanse siertegels)"
|
||||
},
|
||||
"11": {
|
||||
"then": "Tegelwerk"
|
||||
},
|
||||
"12": {
|
||||
"then": "Houtsculptuur"
|
||||
},
|
||||
"2": {
|
||||
"then": "Schilderij"
|
||||
},
|
||||
|
@ -240,6 +231,15 @@
|
|||
},
|
||||
"9": {
|
||||
"then": "Reliëf"
|
||||
},
|
||||
"10": {
|
||||
"then": "Azulejo (Spaanse siertegels)"
|
||||
},
|
||||
"11": {
|
||||
"then": "Tegelwerk"
|
||||
},
|
||||
"12": {
|
||||
"then": "Houtsculptuur"
|
||||
}
|
||||
},
|
||||
"question": "Wat voor soort kunstwerk is dit?",
|
||||
|
@ -1754,6 +1754,30 @@
|
|||
"1": {
|
||||
"question": "Heeft een <div style='display: inline-block'><b><b>Schuko stekker</b> zonder aardingspin (CEE7/4 type F)</b> <img style='width:1rem; display: inline-block' src='./assets/layers/charging_station/CEE7_4F.svg'/></div>"
|
||||
},
|
||||
"2": {
|
||||
"question": "Heeft een <div style='display: inline-block'><b><b>Europese stekker</b> met aardingspin (CEE7/4 type E)</b> <img style='width:1rem; display: inline-block' src='./assets/layers/charging_station/TypeE.svg'/></div>"
|
||||
},
|
||||
"3": {
|
||||
"question": "Heeft een <div style='display: inline-block'><b><b>Chademo</b></b> <img style='width:1rem; display: inline-block' src='./assets/layers/charging_station/Chademo_type4.svg'/></div>"
|
||||
},
|
||||
"4": {
|
||||
"question": "Heeft een <div style='display: inline-block'><b><b>Type 1 met kabel</b> (J1772)</b> <img style='width:1rem; display: inline-block' src='./assets/layers/charging_station/Type1_J1772.svg'/></div>"
|
||||
},
|
||||
"5": {
|
||||
"question": "Heeft een <div style='display: inline-block'><b><b>Type 1 <i>zonder</i> kabel</b> (J1772)</b> <img style='width:1rem; display: inline-block' src='./assets/layers/charging_station/Type1_J1772.svg'/></div>"
|
||||
},
|
||||
"6": {
|
||||
"question": "Heeft een <div style='display: inline-block'><b><b>Type 1 CCS</b> (ook gekend als Type 1 Combo)</b> <img style='width:1rem; display: inline-block' src='./assets/layers/charging_station/Type1-ccs.svg'/></div>"
|
||||
},
|
||||
"7": {
|
||||
"question": "Heeft een <div style='display: inline-block'><b><b>Tesla Supercharger</b></b> <img style='width:1rem; display: inline-block' src='./assets/layers/charging_station/Tesla-hpwc-model-s.svg'/></div>"
|
||||
},
|
||||
"8": {
|
||||
"question": "Heeft een <div style='display: inline-block'><b><b>Type 2</b> (mennekes)</b> <img style='width:1rem; display: inline-block' src='./assets/layers/charging_station/Type2_socket.svg'/></div>"
|
||||
},
|
||||
"9": {
|
||||
"question": "Heeft een <div style='display: inline-block'><b><b>Type 2 CCS</b> (mennekes)</b> <img style='width:1rem; display: inline-block' src='./assets/layers/charging_station/Type2_CCS.svg'/></div>"
|
||||
},
|
||||
"10": {
|
||||
"question": "Heeft een <div style='display: inline-block'><b><b>Type 2 met kabel</b> (J1772)</b> <img style='width:1rem; display: inline-block' src='./assets/layers/charging_station/Type2_tethered.svg'/></div>"
|
||||
},
|
||||
|
@ -1784,35 +1808,11 @@
|
|||
"19": {
|
||||
"question": "Heeft een <div style='display: inline-block'><b><b>SEV 1011 T23</b> (Zwitserse 3-pin)</b> <img style='width:1rem; display: inline-block' src='./assets/layers/charging_station/typej.svg'/></div>"
|
||||
},
|
||||
"2": {
|
||||
"question": "Heeft een <div style='display: inline-block'><b><b>Europese stekker</b> met aardingspin (CEE7/4 type E)</b> <img style='width:1rem; display: inline-block' src='./assets/layers/charging_station/TypeE.svg'/></div>"
|
||||
},
|
||||
"20": {
|
||||
"question": "Heeft een <div style='display: inline-block'><b><b>AS3112</b> (Australische 3-pin)</b> <img style='width:1rem; display: inline-block' src='./assets/layers/charging_station/as3112.svg'/></div>"
|
||||
},
|
||||
"21": {
|
||||
"question": "Heeft een <div style='display: inline-block'><b><b>NEMA 5-20</b> (VS 3-pin)</b> <img style='width:1rem; display: inline-block' src='./assets/layers/charging_station/nema-5-20.svg'/></div>"
|
||||
},
|
||||
"3": {
|
||||
"question": "Heeft een <div style='display: inline-block'><b><b>Chademo</b></b> <img style='width:1rem; display: inline-block' src='./assets/layers/charging_station/Chademo_type4.svg'/></div>"
|
||||
},
|
||||
"4": {
|
||||
"question": "Heeft een <div style='display: inline-block'><b><b>Type 1 met kabel</b> (J1772)</b> <img style='width:1rem; display: inline-block' src='./assets/layers/charging_station/Type1_J1772.svg'/></div>"
|
||||
},
|
||||
"5": {
|
||||
"question": "Heeft een <div style='display: inline-block'><b><b>Type 1 <i>zonder</i> kabel</b> (J1772)</b> <img style='width:1rem; display: inline-block' src='./assets/layers/charging_station/Type1_J1772.svg'/></div>"
|
||||
},
|
||||
"6": {
|
||||
"question": "Heeft een <div style='display: inline-block'><b><b>Type 1 CCS</b> (ook gekend als Type 1 Combo)</b> <img style='width:1rem; display: inline-block' src='./assets/layers/charging_station/Type1-ccs.svg'/></div>"
|
||||
},
|
||||
"7": {
|
||||
"question": "Heeft een <div style='display: inline-block'><b><b>Tesla Supercharger</b></b> <img style='width:1rem; display: inline-block' src='./assets/layers/charging_station/Tesla-hpwc-model-s.svg'/></div>"
|
||||
},
|
||||
"8": {
|
||||
"question": "Heeft een <div style='display: inline-block'><b><b>Type 2</b> (mennekes)</b> <img style='width:1rem; display: inline-block' src='./assets/layers/charging_station/Type2_socket.svg'/></div>"
|
||||
},
|
||||
"9": {
|
||||
"question": "Heeft een <div style='display: inline-block'><b><b>Type 2 CCS</b> (mennekes)</b> <img style='width:1rem; display: inline-block' src='./assets/layers/charging_station/Type2_CCS.svg'/></div>"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -1868,6 +1868,30 @@
|
|||
"1": {
|
||||
"then": "<b>Schuko stekker</b> zonder aardingspin (CEE7/4 type F)"
|
||||
},
|
||||
"2": {
|
||||
"then": "<b>Europese stekker</b> met aardingspin (CEE7/4 type E)"
|
||||
},
|
||||
"3": {
|
||||
"then": "<b>Europese stekker</b> met aardingspin (CEE7/4 type E)"
|
||||
},
|
||||
"4": {
|
||||
"then": "<b>Chademo</b>"
|
||||
},
|
||||
"5": {
|
||||
"then": "<b>Chademo</b>"
|
||||
},
|
||||
"6": {
|
||||
"then": "<b>Type 1 met kabel</b> (J1772)"
|
||||
},
|
||||
"7": {
|
||||
"then": "<b>Type 1 met kabel</b> (J1772)"
|
||||
},
|
||||
"8": {
|
||||
"then": "<b>Type 1 <i>zonder</i> kabel</b> (J1772)"
|
||||
},
|
||||
"9": {
|
||||
"then": "<b>Type 1 <i>zonder</i> kabel</b> (J1772)"
|
||||
},
|
||||
"10": {
|
||||
"then": "<b>Type 1 CCS</b> (ook gekend als Type 1 Combo)"
|
||||
},
|
||||
|
@ -1898,9 +1922,6 @@
|
|||
"19": {
|
||||
"then": "<b>Type 2 met kabel</b> (J1772)"
|
||||
},
|
||||
"2": {
|
||||
"then": "<b>Europese stekker</b> met aardingspin (CEE7/4 type E)"
|
||||
},
|
||||
"20": {
|
||||
"then": "<b>Tesla Supercharger CCS</b> (een type2 CCS met Tesla-logo)"
|
||||
},
|
||||
|
@ -1931,9 +1952,6 @@
|
|||
"29": {
|
||||
"then": "<b>Bosch Active Connect met 3 pinnen</b> aan een kabel"
|
||||
},
|
||||
"3": {
|
||||
"then": "<b>Europese stekker</b> met aardingspin (CEE7/4 type E)"
|
||||
},
|
||||
"30": {
|
||||
"then": "<b>Bosch Active Connect met 5 pinnen</b> aan een kabel"
|
||||
},
|
||||
|
@ -1964,29 +1982,11 @@
|
|||
"39": {
|
||||
"then": "<b>AS3112</b> (Australische 3-pin)"
|
||||
},
|
||||
"4": {
|
||||
"then": "<b>Chademo</b>"
|
||||
},
|
||||
"40": {
|
||||
"then": "<b>NEMA 5-20</b> (VS 3-pin)"
|
||||
},
|
||||
"41": {
|
||||
"then": "<b>NEMA 5-20</b> (VS 3-pin)"
|
||||
},
|
||||
"5": {
|
||||
"then": "<b>Chademo</b>"
|
||||
},
|
||||
"6": {
|
||||
"then": "<b>Type 1 met kabel</b> (J1772)"
|
||||
},
|
||||
"7": {
|
||||
"then": "<b>Type 1 met kabel</b> (J1772)"
|
||||
},
|
||||
"8": {
|
||||
"then": "<b>Type 1 <i>zonder</i> kabel</b> (J1772)"
|
||||
},
|
||||
"9": {
|
||||
"then": "<b>Type 1 <i>zonder</i> kabel</b> (J1772)"
|
||||
}
|
||||
},
|
||||
"question": "Welke aansluitingen zijn hier beschikbaar?"
|
||||
|
@ -2180,6 +2180,30 @@
|
|||
"1": {
|
||||
"2": "<b>Europese stekker</b> met aardingspin (CEE7/4 type E)"
|
||||
},
|
||||
"2": {
|
||||
"2": "<b>Chademo</b>"
|
||||
},
|
||||
"3": {
|
||||
"2": "<b>Type 1 met kabel</b> (J1772)"
|
||||
},
|
||||
"4": {
|
||||
"2": "<b>Type 1 <i>zonder</i> kabel</b> (J1772)"
|
||||
},
|
||||
"5": {
|
||||
"2": "<b>Type 1 CCS</b> (ook gekend als Type 1 Combo)"
|
||||
},
|
||||
"6": {
|
||||
"2": "<b>Tesla Supercharger</b>"
|
||||
},
|
||||
"7": {
|
||||
"2": "<b>Type 2</b> (mennekes)"
|
||||
},
|
||||
"8": {
|
||||
"2": "<b>Type 2 CCS</b> (mennekes)"
|
||||
},
|
||||
"9": {
|
||||
"2": "<b>Type 2 met kabel</b> (J1772)"
|
||||
},
|
||||
"10": {
|
||||
"2": "<b>Tesla Supercharger CCS</b> (een type2 CCS met Tesla-logo)"
|
||||
},
|
||||
|
@ -2210,32 +2234,8 @@
|
|||
"19": {
|
||||
"2": "<b>AS3112</b> (Australische 3-pin)"
|
||||
},
|
||||
"2": {
|
||||
"2": "<b>Chademo</b>"
|
||||
},
|
||||
"20": {
|
||||
"2": "<b>NEMA 5-20</b> (VS 3-pin)"
|
||||
},
|
||||
"3": {
|
||||
"2": "<b>Type 1 met kabel</b> (J1772)"
|
||||
},
|
||||
"4": {
|
||||
"2": "<b>Type 1 <i>zonder</i> kabel</b> (J1772)"
|
||||
},
|
||||
"5": {
|
||||
"2": "<b>Type 1 CCS</b> (ook gekend als Type 1 Combo)"
|
||||
},
|
||||
"6": {
|
||||
"2": "<b>Tesla Supercharger</b>"
|
||||
},
|
||||
"7": {
|
||||
"2": "<b>Type 2</b> (mennekes)"
|
||||
},
|
||||
"8": {
|
||||
"2": "<b>Type 2 CCS</b> (mennekes)"
|
||||
},
|
||||
"9": {
|
||||
"2": "<b>Type 2 met kabel</b> (J1772)"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -3001,15 +3001,6 @@
|
|||
"1": {
|
||||
"then": "Dit fietspad is geplaveid"
|
||||
},
|
||||
"10": {
|
||||
"then": "Dit fietspad is gemaakt van fijn grind"
|
||||
},
|
||||
"11": {
|
||||
"then": "Dit fietspad is gemaakt van kiezelsteentjes"
|
||||
},
|
||||
"12": {
|
||||
"then": "Dit fietspad is gemaakt van aarde"
|
||||
},
|
||||
"2": {
|
||||
"then": "Dit fietspad is gemaakt van asfalt"
|
||||
},
|
||||
|
@ -3033,6 +3024,15 @@
|
|||
},
|
||||
"9": {
|
||||
"then": "Dit fietspad is gemaakt van grind"
|
||||
},
|
||||
"10": {
|
||||
"then": "Dit fietspad is gemaakt van fijn grind"
|
||||
},
|
||||
"11": {
|
||||
"then": "Dit fietspad is gemaakt van kiezelsteentjes"
|
||||
},
|
||||
"12": {
|
||||
"then": "Dit fietspad is gemaakt van aarde"
|
||||
}
|
||||
},
|
||||
"question": "Waaruit is het oppervlak van het fietspad van gemaakt?",
|
||||
|
@ -3081,15 +3081,6 @@
|
|||
"1": {
|
||||
"then": "Dit fietspad is geplaveid"
|
||||
},
|
||||
"10": {
|
||||
"then": "Dit fietspad is gemaakt van fijn grind"
|
||||
},
|
||||
"11": {
|
||||
"then": "Dit fietspad is gemaakt van kiezelsteentjes"
|
||||
},
|
||||
"12": {
|
||||
"then": "Dit fietspad is gemaakt van aarde"
|
||||
},
|
||||
"2": {
|
||||
"then": "Dit fietspad is gemaakt van asfalt"
|
||||
},
|
||||
|
@ -3113,6 +3104,15 @@
|
|||
},
|
||||
"9": {
|
||||
"then": "Dit fietspad is gemaakt van grind"
|
||||
},
|
||||
"10": {
|
||||
"then": "Dit fietspad is gemaakt van fijn grind"
|
||||
},
|
||||
"11": {
|
||||
"then": "Dit fietspad is gemaakt van kiezelsteentjes"
|
||||
},
|
||||
"12": {
|
||||
"then": "Dit fietspad is gemaakt van aarde"
|
||||
}
|
||||
},
|
||||
"question": "Waaruit is het oppervlak van de straat gemaakt?",
|
||||
|
@ -4168,21 +4168,6 @@
|
|||
"1": {
|
||||
"then": "Dit is een frituur"
|
||||
},
|
||||
"10": {
|
||||
"then": "Dit is een Chinees restaurant"
|
||||
},
|
||||
"11": {
|
||||
"then": "Dit is een Grieks restaurant"
|
||||
},
|
||||
"12": {
|
||||
"then": "Dit is een Indisch restaurant"
|
||||
},
|
||||
"13": {
|
||||
"then": "Dit is een Turks restaurant (dat meer dan enkel kebab verkoopt)"
|
||||
},
|
||||
"14": {
|
||||
"then": "Dit is een Thaïs restaurant"
|
||||
},
|
||||
"2": {
|
||||
"then": "Dit is een pastazaak"
|
||||
},
|
||||
|
@ -4206,6 +4191,21 @@
|
|||
},
|
||||
"9": {
|
||||
"then": "Dit is een Frans restaurant"
|
||||
},
|
||||
"10": {
|
||||
"then": "Dit is een Chinees restaurant"
|
||||
},
|
||||
"11": {
|
||||
"then": "Dit is een Grieks restaurant"
|
||||
},
|
||||
"12": {
|
||||
"then": "Dit is een Indisch restaurant"
|
||||
},
|
||||
"13": {
|
||||
"then": "Dit is een Turks restaurant (dat meer dan enkel kebab verkoopt)"
|
||||
},
|
||||
"14": {
|
||||
"then": "Dit is een Thaïs restaurant"
|
||||
}
|
||||
},
|
||||
"question": "Welk soort gerechten worden hier geserveerd?",
|
||||
|
@ -5257,12 +5257,6 @@
|
|||
"0": {
|
||||
"then": "Dit is een standbeeld"
|
||||
},
|
||||
"10": {
|
||||
"then": "Dit is een kruis"
|
||||
},
|
||||
"12": {
|
||||
"then": "Dit is een historische tank, permanent in de publieke ruimte geplaatst als gedenkteken"
|
||||
},
|
||||
"2": {
|
||||
"then": "Dit is een zitbank die ook als herdenking dienst doet"
|
||||
},
|
||||
|
@ -5274,6 +5268,12 @@
|
|||
},
|
||||
"8": {
|
||||
"then": "Dit is een sculptuur"
|
||||
},
|
||||
"10": {
|
||||
"then": "Dit is een kruis"
|
||||
},
|
||||
"12": {
|
||||
"then": "Dit is een historische tank, permanent in de publieke ruimte geplaatst als gedenkteken"
|
||||
}
|
||||
}
|
||||
},
|
||||
|
@ -5425,19 +5425,6 @@
|
|||
}
|
||||
}
|
||||
},
|
||||
"10": {
|
||||
"options": {
|
||||
"0": {
|
||||
"question": "Alle Notes"
|
||||
},
|
||||
"1": {
|
||||
"question": "Verberg import Notes"
|
||||
},
|
||||
"2": {
|
||||
"question": "Toon enkel import Notes"
|
||||
}
|
||||
}
|
||||
},
|
||||
"2": {
|
||||
"options": {
|
||||
"0": {
|
||||
|
@ -5493,6 +5480,19 @@
|
|||
"question": "Toon enkel open Notes"
|
||||
}
|
||||
}
|
||||
},
|
||||
"10": {
|
||||
"options": {
|
||||
"0": {
|
||||
"question": "Alle Notes"
|
||||
},
|
||||
"1": {
|
||||
"question": "Verberg import Notes"
|
||||
},
|
||||
"2": {
|
||||
"question": "Toon enkel import Notes"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"name": "OpenStreetMap Notes",
|
||||
|
@ -5770,18 +5770,6 @@
|
|||
"1": {
|
||||
"then": "Dit is een normale parkeerplek."
|
||||
},
|
||||
"10": {
|
||||
"then": "Deze parkeerplek is gereserveerd voor personeel."
|
||||
},
|
||||
"11": {
|
||||
"then": "Deze parkeerplek is gereserveerd voor taxis."
|
||||
},
|
||||
"12": {
|
||||
"then": "Deze parkeerplek is gereserveerd voor voertuigen met een aanhanger."
|
||||
},
|
||||
"13": {
|
||||
"then": "Deze parkeerplek is gereserveerd voor autodelen."
|
||||
},
|
||||
"2": {
|
||||
"then": "Dit is een gehandicaptenparkeerplaats."
|
||||
},
|
||||
|
@ -5805,6 +5793,18 @@
|
|||
},
|
||||
"9": {
|
||||
"then": "Deze parkeerplek is gereserveerd voor ouders met kinderen."
|
||||
},
|
||||
"10": {
|
||||
"then": "Deze parkeerplek is gereserveerd voor personeel."
|
||||
},
|
||||
"11": {
|
||||
"then": "Deze parkeerplek is gereserveerd voor taxis."
|
||||
},
|
||||
"12": {
|
||||
"then": "Deze parkeerplek is gereserveerd voor voertuigen met een aanhanger."
|
||||
},
|
||||
"13": {
|
||||
"then": "Deze parkeerplek is gereserveerd voor autodelen."
|
||||
}
|
||||
},
|
||||
"question": "Wat voor parkeerplek is dit?"
|
||||
|
@ -6119,9 +6119,6 @@
|
|||
"0": {
|
||||
"then": "Dit is een schommel"
|
||||
},
|
||||
"11": {
|
||||
"then": "Dit is een rekstok"
|
||||
},
|
||||
"3": {
|
||||
"then": "Dit is een zandbak"
|
||||
},
|
||||
|
@ -6133,6 +6130,9 @@
|
|||
},
|
||||
"6": {
|
||||
"then": "Dit is een wipwap"
|
||||
},
|
||||
"11": {
|
||||
"then": "Dit is een rekstok"
|
||||
}
|
||||
},
|
||||
"question": "Wat voor speeltoestel is dit?"
|
||||
|
@ -6398,21 +6398,6 @@
|
|||
"1": {
|
||||
"then": "Munten van 2 cent worden geaccepteerd"
|
||||
},
|
||||
"10": {
|
||||
"then": "Munten van 20 rappen worden geaccepteerd"
|
||||
},
|
||||
"11": {
|
||||
"then": "Munten van ½ frank worden geaccepteerd"
|
||||
},
|
||||
"12": {
|
||||
"then": "Munten van 1 frank worden geaccepteerd"
|
||||
},
|
||||
"13": {
|
||||
"then": "Munten van 2 frank worden geaccepteerd"
|
||||
},
|
||||
"14": {
|
||||
"then": "Munten van 5 frank worden geaccepteerd"
|
||||
},
|
||||
"2": {
|
||||
"then": "Munten van 5 cent worden geaccepteerd"
|
||||
},
|
||||
|
@ -6436,6 +6421,21 @@
|
|||
},
|
||||
"9": {
|
||||
"then": "Munten van 10 rappen worden geaccepteerd"
|
||||
},
|
||||
"10": {
|
||||
"then": "Munten van 20 rappen worden geaccepteerd"
|
||||
},
|
||||
"11": {
|
||||
"then": "Munten van ½ frank worden geaccepteerd"
|
||||
},
|
||||
"12": {
|
||||
"then": "Munten van 1 frank worden geaccepteerd"
|
||||
},
|
||||
"13": {
|
||||
"then": "Munten van 2 frank worden geaccepteerd"
|
||||
},
|
||||
"14": {
|
||||
"then": "Munten van 5 frank worden geaccepteerd"
|
||||
}
|
||||
},
|
||||
"question": "Met welke munten kan je hier betalen?"
|
||||
|
@ -6448,15 +6448,6 @@
|
|||
"1": {
|
||||
"then": "Biljetten van 10 euro worden geaccepteerd"
|
||||
},
|
||||
"10": {
|
||||
"then": "Biljetten van 100 frank worden geaccepteerd"
|
||||
},
|
||||
"11": {
|
||||
"then": "Biljetten van 200 frank worden geaccepteerd"
|
||||
},
|
||||
"12": {
|
||||
"then": "Biljetten van 1000 frank worden geaccepteerd"
|
||||
},
|
||||
"2": {
|
||||
"then": "Biljetten van 20 euro worden geaccepteerd"
|
||||
},
|
||||
|
@ -6480,6 +6471,15 @@
|
|||
},
|
||||
"9": {
|
||||
"then": "Biljetten van 50 frank worden geaccepteerd"
|
||||
},
|
||||
"10": {
|
||||
"then": "Biljetten van 100 frank worden geaccepteerd"
|
||||
},
|
||||
"11": {
|
||||
"then": "Biljetten van 200 frank worden geaccepteerd"
|
||||
},
|
||||
"12": {
|
||||
"then": "Biljetten van 1000 frank worden geaccepteerd"
|
||||
}
|
||||
},
|
||||
"question": "Met welke bankbiljetten kan je hier betalen?"
|
||||
|
@ -6810,6 +6810,30 @@
|
|||
"1": {
|
||||
"question": "Recycling van batterijen"
|
||||
},
|
||||
"2": {
|
||||
"question": "Recycling van drankpakken"
|
||||
},
|
||||
"3": {
|
||||
"question": "Recycling van blikken"
|
||||
},
|
||||
"4": {
|
||||
"question": "Recycling van kleding"
|
||||
},
|
||||
"5": {
|
||||
"question": "Recycling van frituurvet"
|
||||
},
|
||||
"6": {
|
||||
"question": "Recycling van motorolie"
|
||||
},
|
||||
"7": {
|
||||
"question": "Recycling van tl-buizen"
|
||||
},
|
||||
"8": {
|
||||
"question": "Recycling van groen afval"
|
||||
},
|
||||
"9": {
|
||||
"question": "Recycling van glazen flessen"
|
||||
},
|
||||
"10": {
|
||||
"question": "Recycling van glas"
|
||||
},
|
||||
|
@ -6840,9 +6864,6 @@
|
|||
"19": {
|
||||
"question": "Recycling van restafval"
|
||||
},
|
||||
"2": {
|
||||
"question": "Recycling van drankpakken"
|
||||
},
|
||||
"20": {
|
||||
"question": "Recycling van inktpatronen"
|
||||
},
|
||||
|
@ -6851,27 +6872,6 @@
|
|||
},
|
||||
"22": {
|
||||
"question": "Recycling van plastic verkpakkingen, metalen verkpakkingen en drankpakken (PMD)"
|
||||
},
|
||||
"3": {
|
||||
"question": "Recycling van blikken"
|
||||
},
|
||||
"4": {
|
||||
"question": "Recycling van kleding"
|
||||
},
|
||||
"5": {
|
||||
"question": "Recycling van frituurvet"
|
||||
},
|
||||
"6": {
|
||||
"question": "Recycling van motorolie"
|
||||
},
|
||||
"7": {
|
||||
"question": "Recycling van tl-buizen"
|
||||
},
|
||||
"8": {
|
||||
"question": "Recycling van groen afval"
|
||||
},
|
||||
"9": {
|
||||
"question": "Recycling van glazen flessen"
|
||||
}
|
||||
}
|
||||
},
|
||||
|
@ -6939,6 +6939,30 @@
|
|||
"1": {
|
||||
"then": "Drankpakken kunnen hier gerecycled worden"
|
||||
},
|
||||
"2": {
|
||||
"then": "Blikken kunnen hier gerecycled worden"
|
||||
},
|
||||
"3": {
|
||||
"then": "Kleren kunnen hier gerecycled worden"
|
||||
},
|
||||
"4": {
|
||||
"then": "Frituurvet kan hier gerecycled worden"
|
||||
},
|
||||
"5": {
|
||||
"then": "Motorolie kan hier gerecycled worden"
|
||||
},
|
||||
"6": {
|
||||
"then": "TL-buizen kunnen hier gerecycled worden"
|
||||
},
|
||||
"7": {
|
||||
"then": "Groen afval kan hier gerecycled worden"
|
||||
},
|
||||
"8": {
|
||||
"then": "Organisch afval kan hier gerecycled worden"
|
||||
},
|
||||
"9": {
|
||||
"then": "Glazen flessen kunnen hier gerecycled worden"
|
||||
},
|
||||
"10": {
|
||||
"then": "Glas kan hier gerecycled worden"
|
||||
},
|
||||
|
@ -6969,9 +6993,6 @@
|
|||
"19": {
|
||||
"then": "Oud metaal kan hier gerecycled worden"
|
||||
},
|
||||
"2": {
|
||||
"then": "Blikken kunnen hier gerecycled worden"
|
||||
},
|
||||
"20": {
|
||||
"then": "Schoenen kunnen hier gerecycled worden"
|
||||
},
|
||||
|
@ -6989,27 +7010,6 @@
|
|||
},
|
||||
"25": {
|
||||
"then": "Fietsen (en fietswrakken) kunnen hier gerecycled worden"
|
||||
},
|
||||
"3": {
|
||||
"then": "Kleren kunnen hier gerecycled worden"
|
||||
},
|
||||
"4": {
|
||||
"then": "Frituurvet kan hier gerecycled worden"
|
||||
},
|
||||
"5": {
|
||||
"then": "Motorolie kan hier gerecycled worden"
|
||||
},
|
||||
"6": {
|
||||
"then": "TL-buizen kunnen hier gerecycled worden"
|
||||
},
|
||||
"7": {
|
||||
"then": "Groen afval kan hier gerecycled worden"
|
||||
},
|
||||
"8": {
|
||||
"then": "Organisch afval kan hier gerecycled worden"
|
||||
},
|
||||
"9": {
|
||||
"then": "Glazen flessen kunnen hier gerecycled worden"
|
||||
}
|
||||
},
|
||||
"question": "Wat kan hier gerecycled worden?"
|
||||
|
@ -7735,12 +7735,6 @@
|
|||
"1": {
|
||||
"then": "Deze lantaarn gebruikt LEDs"
|
||||
},
|
||||
"10": {
|
||||
"then": "Deze lantaarn gebruikt hogedruknatriumlampen (oranje met wit)"
|
||||
},
|
||||
"11": {
|
||||
"then": "Deze lantaarn wordt verlicht met gas"
|
||||
},
|
||||
"2": {
|
||||
"then": "Deze lantaarn gebruikt gloeilampen"
|
||||
},
|
||||
|
@ -7764,6 +7758,12 @@
|
|||
},
|
||||
"9": {
|
||||
"then": "Deze lantaarn gebruikt lagedruknatriumlampen (monochroom oranje)"
|
||||
},
|
||||
"10": {
|
||||
"then": "Deze lantaarn gebruikt hogedruknatriumlampen (oranje met wit)"
|
||||
},
|
||||
"11": {
|
||||
"then": "Deze lantaarn wordt verlicht met gas"
|
||||
}
|
||||
},
|
||||
"question": "Wat voor verlichting gebruikt deze lantaarn?"
|
||||
|
@ -9010,6 +9010,30 @@
|
|||
"1": {
|
||||
"question": "Verkoop van dranken"
|
||||
},
|
||||
"2": {
|
||||
"question": "Verkoop van snoep"
|
||||
},
|
||||
"3": {
|
||||
"question": "Verkoop van eten"
|
||||
},
|
||||
"4": {
|
||||
"question": "Verkoop van sigaretten"
|
||||
},
|
||||
"5": {
|
||||
"question": "Verkoop van condooms"
|
||||
},
|
||||
"6": {
|
||||
"question": "Verkoop van koffie"
|
||||
},
|
||||
"7": {
|
||||
"question": "Verkoop van water"
|
||||
},
|
||||
"8": {
|
||||
"question": "Verkoop van kranten"
|
||||
},
|
||||
"9": {
|
||||
"question": "Verkoop van fietsbinnenbanden"
|
||||
},
|
||||
"10": {
|
||||
"question": "Verkoop van melk"
|
||||
},
|
||||
|
@ -9040,9 +9064,6 @@
|
|||
"19": {
|
||||
"question": "Verkoop van bloemen"
|
||||
},
|
||||
"2": {
|
||||
"question": "Verkoop van snoep"
|
||||
},
|
||||
"23": {
|
||||
"question": "Verkoop van fietslampjes"
|
||||
},
|
||||
|
@ -9057,27 +9078,6 @@
|
|||
},
|
||||
"27": {
|
||||
"question": "Verkoop van fietssloten"
|
||||
},
|
||||
"3": {
|
||||
"question": "Verkoop van eten"
|
||||
},
|
||||
"4": {
|
||||
"question": "Verkoop van sigaretten"
|
||||
},
|
||||
"5": {
|
||||
"question": "Verkoop van condooms"
|
||||
},
|
||||
"6": {
|
||||
"question": "Verkoop van koffie"
|
||||
},
|
||||
"7": {
|
||||
"question": "Verkoop van water"
|
||||
},
|
||||
"8": {
|
||||
"question": "Verkoop van kranten"
|
||||
},
|
||||
"9": {
|
||||
"question": "Verkoop van fietsbinnenbanden"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -9168,6 +9168,30 @@
|
|||
"1": {
|
||||
"then": "Snoep wordt verkocht"
|
||||
},
|
||||
"2": {
|
||||
"then": "Eten wordt verkocht"
|
||||
},
|
||||
"3": {
|
||||
"then": "Sigaretten worden verkocht"
|
||||
},
|
||||
"4": {
|
||||
"then": "Condooms worden verkocht"
|
||||
},
|
||||
"5": {
|
||||
"then": "Koffie wordt verkocht"
|
||||
},
|
||||
"6": {
|
||||
"then": "Drinkwater wordt verkocht"
|
||||
},
|
||||
"7": {
|
||||
"then": "Kranten worden verkocht"
|
||||
},
|
||||
"8": {
|
||||
"then": "Binnenbanden voor fietsen worden verkocht"
|
||||
},
|
||||
"9": {
|
||||
"then": "Melk wordt verkocht"
|
||||
},
|
||||
"10": {
|
||||
"then": "Brood wordt verkocht"
|
||||
},
|
||||
|
@ -9198,9 +9222,6 @@
|
|||
"19": {
|
||||
"then": "Parkeerkaarten worden verkocht"
|
||||
},
|
||||
"2": {
|
||||
"then": "Eten wordt verkocht"
|
||||
},
|
||||
"21": {
|
||||
"then": "Openbaar vervoerkaartjes worden verkocht"
|
||||
},
|
||||
|
@ -9218,27 +9239,6 @@
|
|||
},
|
||||
"26": {
|
||||
"then": "Fietssloten worden verkocht"
|
||||
},
|
||||
"3": {
|
||||
"then": "Sigaretten worden verkocht"
|
||||
},
|
||||
"4": {
|
||||
"then": "Condooms worden verkocht"
|
||||
},
|
||||
"5": {
|
||||
"then": "Koffie wordt verkocht"
|
||||
},
|
||||
"6": {
|
||||
"then": "Drinkwater wordt verkocht"
|
||||
},
|
||||
"7": {
|
||||
"then": "Kranten worden verkocht"
|
||||
},
|
||||
"8": {
|
||||
"then": "Binnenbanden voor fietsen worden verkocht"
|
||||
},
|
||||
"9": {
|
||||
"then": "Melk wordt verkocht"
|
||||
}
|
||||
},
|
||||
"question": "Wat verkoopt deze verkoopautomaat?",
|
||||
|
@ -9540,4 +9540,4 @@
|
|||
"render": "windturbine"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
16
package-lock.json
generated
16
package-lock.json
generated
|
@ -1,12 +1,12 @@
|
|||
{
|
||||
"name": "mapcomplete",
|
||||
"version": "0.43.2",
|
||||
"version": "0.44.0",
|
||||
"lockfileVersion": 2,
|
||||
"requires": true,
|
||||
"packages": {
|
||||
"": {
|
||||
"name": "mapcomplete",
|
||||
"version": "0.43.2",
|
||||
"version": "0.44.0",
|
||||
"license": "GPL-3.0-or-later",
|
||||
"dependencies": {
|
||||
"@comunica/core": "^3.0.1",
|
||||
|
@ -7893,9 +7893,9 @@
|
|||
}
|
||||
},
|
||||
"node_modules/caniuse-lite": {
|
||||
"version": "1.0.30001634",
|
||||
"resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001634.tgz",
|
||||
"integrity": "sha512-fbBYXQ9q3+yp1q1gBk86tOFs4pyn/yxFm5ZNP18OXJDfA3txImOY9PhfxVggZ4vRHDqoU8NrKU81eN0OtzOgRA==",
|
||||
"version": "1.0.30001636",
|
||||
"resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001636.tgz",
|
||||
"integrity": "sha512-bMg2vmr8XBsbL6Lr0UHXy/21m84FTxDLWn2FSqMd5PrlbMxwJlQnC2YWYxVgp66PZE+BBNF2jYQUBKCo1FDeZg==",
|
||||
"dev": true,
|
||||
"funding": [
|
||||
{
|
||||
|
@ -25250,9 +25250,9 @@
|
|||
"version": "2.0.1"
|
||||
},
|
||||
"caniuse-lite": {
|
||||
"version": "1.0.30001634",
|
||||
"resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001634.tgz",
|
||||
"integrity": "sha512-fbBYXQ9q3+yp1q1gBk86tOFs4pyn/yxFm5ZNP18OXJDfA3txImOY9PhfxVggZ4vRHDqoU8NrKU81eN0OtzOgRA==",
|
||||
"version": "1.0.30001636",
|
||||
"resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001636.tgz",
|
||||
"integrity": "sha512-bMg2vmr8XBsbL6Lr0UHXy/21m84FTxDLWn2FSqMd5PrlbMxwJlQnC2YWYxVgp66PZE+BBNF2jYQUBKCo1FDeZg==",
|
||||
"dev": true
|
||||
},
|
||||
"canonicalize": {
|
||||
|
|
|
@ -107,7 +107,7 @@ function genImages(dryrun = false) {
|
|||
"wikimedia-commons-white",
|
||||
"wikimedia_commons_white",
|
||||
"wikipedia",
|
||||
"github"
|
||||
"github",
|
||||
].map((s) => s.toLowerCase())
|
||||
const dir = fs.readdirSync("./assets/svg")
|
||||
|
||||
|
|
|
@ -10,12 +10,16 @@ import {
|
|||
PrevalidateTheme,
|
||||
ValidateLayer,
|
||||
ValidateThemeAndLayers,
|
||||
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"
|
||||
|
@ -158,11 +162,11 @@ class LayerOverviewUtils extends Script {
|
|||
continue
|
||||
}
|
||||
if (publicLayer["builtin"] !== undefined) {
|
||||
const bi : string | string[] = publicLayer["builtin"]
|
||||
const bi: string | string[] = publicLayer["builtin"]
|
||||
if (typeof bi === "string") {
|
||||
publicLayerIds.push(bi)
|
||||
} else {
|
||||
bi.forEach(id => publicLayerIds.push(id))
|
||||
bi.forEach((id) => publicLayerIds.push(id))
|
||||
}
|
||||
continue
|
||||
}
|
||||
|
@ -204,9 +208,9 @@ class LayerOverviewUtils extends Script {
|
|||
| LayerConfigJson
|
||||
| string
|
||||
| {
|
||||
builtin
|
||||
}
|
||||
)[]
|
||||
builtin
|
||||
}
|
||||
)[]
|
||||
}[]
|
||||
) {
|
||||
const perId = new Map<string, any>()
|
||||
|
@ -226,7 +230,7 @@ class LayerOverviewUtils extends Script {
|
|||
icon: theme.icon,
|
||||
hideFromOverview: theme.hideFromOverview,
|
||||
mustHaveLanguage: theme.mustHaveLanguage,
|
||||
keywords: Utils.NoNull(keywords)
|
||||
keywords: Utils.NoNull(keywords),
|
||||
}
|
||||
perId.set(theme.id, data)
|
||||
}
|
||||
|
@ -275,7 +279,9 @@ class LayerOverviewUtils extends Script {
|
|||
)
|
||||
}
|
||||
|
||||
static asDict(trs: QuestionableTagRenderingConfigJson[]): Map<string, QuestionableTagRenderingConfigJson> {
|
||||
static asDict(
|
||||
trs: QuestionableTagRenderingConfigJson[]
|
||||
): Map<string, QuestionableTagRenderingConfigJson> {
|
||||
const d = new Map<string, QuestionableTagRenderingConfigJson>()
|
||||
for (const tr of trs) {
|
||||
d.set(tr.id, tr)
|
||||
|
@ -283,14 +289,12 @@ class LayerOverviewUtils extends Script {
|
|||
return d
|
||||
}
|
||||
|
||||
getSharedTagRenderings(
|
||||
doesImageExist: DoesImageExist
|
||||
): QuestionableTagRenderingConfigJson[] ;
|
||||
getSharedTagRenderings(doesImageExist: DoesImageExist): QuestionableTagRenderingConfigJson[]
|
||||
getSharedTagRenderings(
|
||||
doesImageExist: DoesImageExist,
|
||||
bootstrapTagRenderings: Map<string, QuestionableTagRenderingConfigJson>,
|
||||
bootstrapTagRenderingsOrder: string[]
|
||||
): QuestionableTagRenderingConfigJson[] ;
|
||||
): QuestionableTagRenderingConfigJson[]
|
||||
getSharedTagRenderings(
|
||||
doesImageExist: DoesImageExist,
|
||||
bootstrapTagRenderings: Map<string, QuestionableTagRenderingConfigJson> = null,
|
||||
|
@ -301,10 +305,10 @@ class LayerOverviewUtils extends Script {
|
|||
tagRenderings: bootstrapTagRenderings,
|
||||
tagRenderingOrder: bootstrapTagRenderingsOrder,
|
||||
sharedLayers: null,
|
||||
publicLayers: null
|
||||
publicLayers: null,
|
||||
},
|
||||
{
|
||||
addTagRenderingsToContext: true
|
||||
addTagRenderingsToContext: true,
|
||||
}
|
||||
)
|
||||
|
||||
|
@ -322,7 +326,11 @@ class LayerOverviewUtils extends Script {
|
|||
return <QuestionableTagRenderingConfigJson[]>sharedQuestions.tagRenderings
|
||||
}
|
||||
|
||||
return this.getSharedTagRenderings(doesImageExist, dict, sharedQuestions.tagRenderings.map(tr => tr["id"]))
|
||||
return this.getSharedTagRenderings(
|
||||
doesImageExist,
|
||||
dict,
|
||||
sharedQuestions.tagRenderings.map((tr) => tr["id"])
|
||||
)
|
||||
}
|
||||
|
||||
checkAllSvgs() {
|
||||
|
@ -336,7 +344,7 @@ class LayerOverviewUtils extends Script {
|
|||
"src/assets/SocialImageBanner.svg",
|
||||
"src/assets/SocialImageRepo.svg",
|
||||
"src/assets/svg/osm-logo.svg",
|
||||
"src/assets/templates/*"
|
||||
"src/assets/templates/*",
|
||||
]
|
||||
for (const path of allSvgs) {
|
||||
if (
|
||||
|
@ -361,8 +369,8 @@ class LayerOverviewUtils extends Script {
|
|||
if (contents.indexOf("<text") > 0) {
|
||||
console.warn(
|
||||
"The SVG at " +
|
||||
path +
|
||||
" contains a `text`-tag. This is highly discouraged. Every machine viewing your theme has their own font libary, and the font you choose might not be present, resulting in a different font being rendered. Solution: open your .svg in inkscape (or another program), select the text and convert it to a path"
|
||||
path +
|
||||
" contains a `text`-tag. This is highly discouraged. Every machine viewing your theme has their own font libary, and the font you choose might not be present, resulting in a different font being rendered. Solution: open your .svg in inkscape (or another program), select the text and convert it to a path"
|
||||
)
|
||||
errCount++
|
||||
}
|
||||
|
@ -425,7 +433,7 @@ class LayerOverviewUtils extends Script {
|
|||
writeFileSync(
|
||||
"./src/assets/generated/known_layers.json",
|
||||
JSON.stringify({
|
||||
layers: Array.from(sharedLayers.values()).filter((l) => l.id !== "favourite")
|
||||
layers: Array.from(sharedLayers.values()).filter((l) => l.id !== "favourite"),
|
||||
})
|
||||
)
|
||||
}
|
||||
|
@ -442,11 +450,11 @@ class LayerOverviewUtils extends Script {
|
|||
// mapcomplete-changes shows an icon for each corresponding mapcomplete-theme
|
||||
const iconsPerTheme = Array.from(sharedThemes.values()).map((th) => ({
|
||||
if: "theme=" + th.id,
|
||||
then: th.icon
|
||||
then: th.icon,
|
||||
}))
|
||||
const proto: LayoutConfigJson = JSON.parse(
|
||||
readFileSync("./assets/themes/mapcomplete-changes/mapcomplete-changes.proto.json", {
|
||||
encoding: "utf8"
|
||||
encoding: "utf8",
|
||||
})
|
||||
)
|
||||
const protolayer = <LayerConfigJson>(
|
||||
|
@ -462,7 +470,7 @@ class LayerOverviewUtils extends Script {
|
|||
new DetectDuplicateFilters().convertStrict(
|
||||
{
|
||||
layers: ScriptUtils.getLayerFiles().map((f) => f.parsed),
|
||||
themes: ScriptUtils.getThemeFiles().map((f) => f.parsed)
|
||||
themes: ScriptUtils.getThemeFiles().map((f) => f.parsed),
|
||||
},
|
||||
ConversionContext.construct([], [])
|
||||
)
|
||||
|
@ -477,7 +485,7 @@ class LayerOverviewUtils extends Script {
|
|||
writeFileSync(
|
||||
"./src/assets/generated/known_themes.json",
|
||||
JSON.stringify({
|
||||
themes: Array.from(sharedThemes.values())
|
||||
themes: Array.from(sharedThemes.values()),
|
||||
})
|
||||
)
|
||||
}
|
||||
|
@ -518,8 +526,8 @@ class LayerOverviewUtils extends Script {
|
|||
console.log(" ---------- VALIDATING BUILTIN LAYERS ---------")
|
||||
const state: DesugaringContext = {
|
||||
tagRenderings: LayerOverviewUtils.asDict(sharedTagRenderings),
|
||||
tagRenderingOrder: sharedTagRenderings.map(tr => tr.id),
|
||||
sharedLayers: AllSharedLayers.getSharedLayersConfigs()
|
||||
tagRenderingOrder: sharedTagRenderings.map((tr) => tr.id),
|
||||
sharedLayers: AllSharedLayers.getSharedLayersConfigs(),
|
||||
}
|
||||
const sharedLayers = new Map<string, LayerConfigJson>()
|
||||
const prepLayer = new PrepareLayer(state)
|
||||
|
@ -564,12 +572,12 @@ class LayerOverviewUtils extends Script {
|
|||
|
||||
console.log(
|
||||
"Recompiled layers " +
|
||||
recompiledLayers.join(", ") +
|
||||
" and skipped " +
|
||||
skippedLayers.length +
|
||||
" layers. Detected " +
|
||||
warningCount +
|
||||
" warnings"
|
||||
recompiledLayers.join(", ") +
|
||||
" and skipped " +
|
||||
skippedLayers.length +
|
||||
" layers. Detected " +
|
||||
warningCount +
|
||||
" warnings"
|
||||
)
|
||||
// We always need the calculated tags of 'usersettings', so we export them separately
|
||||
this.extractJavascriptCodeForLayer(
|
||||
|
@ -591,11 +599,11 @@ class LayerOverviewUtils extends Script {
|
|||
private extractJavascriptCode(themeFile: LayoutConfigJson) {
|
||||
const allCode = [
|
||||
"import {Feature} from 'geojson'",
|
||||
"import { ExtraFuncType } from \"../../../Logic/ExtraFunctions\";",
|
||||
"import { Utils } from \"../../../Utils\"",
|
||||
'import { ExtraFuncType } from "../../../Logic/ExtraFunctions";',
|
||||
'import { Utils } from "../../../Utils"',
|
||||
"export class ThemeMetaTagging {",
|
||||
" public static readonly themeName = " + JSON.stringify(themeFile.id),
|
||||
""
|
||||
"",
|
||||
]
|
||||
for (const layer of themeFile.layers) {
|
||||
const l = <LayerConfigJson>layer
|
||||
|
@ -604,8 +612,8 @@ class LayerOverviewUtils extends Script {
|
|||
|
||||
allCode.push(
|
||||
" public metaTaggging_for_" +
|
||||
id +
|
||||
"(feat: Feature, helperFunctions: Record<ExtraFuncType, (feature: Feature) => Function>) {"
|
||||
id +
|
||||
"(feat: Feature, helperFunctions: Record<ExtraFuncType, (feature: Feature) => Function>) {"
|
||||
)
|
||||
allCode.push(" const {" + ExtraFunctions.types.join(", ") + "} = helperFunctions")
|
||||
for (const line of code) {
|
||||
|
@ -616,10 +624,10 @@ class LayerOverviewUtils extends Script {
|
|||
if (!isStrict) {
|
||||
allCode.push(
|
||||
" Utils.AddLazyProperty(feat.properties, '" +
|
||||
attributeName +
|
||||
"', () => " +
|
||||
expression +
|
||||
" ) "
|
||||
attributeName +
|
||||
"', () => " +
|
||||
expression +
|
||||
" ) "
|
||||
)
|
||||
} else {
|
||||
attributeName = attributeName.substring(0, attributeName.length - 1).trim()
|
||||
|
@ -659,7 +667,7 @@ class LayerOverviewUtils extends Script {
|
|||
`/** This code is autogenerated - do not edit. Edit ./assets/layers/${l?.id}/${l?.id}.json instead */`,
|
||||
"export class ThemeMetaTagging {",
|
||||
" public static readonly themeName = " + JSON.stringify(l.id),
|
||||
""
|
||||
"",
|
||||
]
|
||||
const code = l.calculatedTags ?? []
|
||||
|
||||
|
@ -674,10 +682,10 @@ class LayerOverviewUtils extends Script {
|
|||
if (!isStrict) {
|
||||
allCode.push(
|
||||
" Utils.AddLazyProperty(feat.properties, '" +
|
||||
attributeName +
|
||||
"', () => " +
|
||||
expression +
|
||||
" ) "
|
||||
attributeName +
|
||||
"', () => " +
|
||||
expression +
|
||||
" ) "
|
||||
)
|
||||
} else {
|
||||
attributeName = attributeName.substring(0, attributeName.length - 2).trim()
|
||||
|
@ -712,15 +720,13 @@ class LayerOverviewUtils extends Script {
|
|||
themeFiles.map((th) => th.parsed)
|
||||
)
|
||||
|
||||
const trs = this.getSharedTagRenderings(
|
||||
new DoesImageExist(licensePaths, existsSync)
|
||||
)
|
||||
const trs = this.getSharedTagRenderings(new DoesImageExist(licensePaths, existsSync))
|
||||
|
||||
const convertState: DesugaringContext = {
|
||||
sharedLayers,
|
||||
tagRenderings: LayerOverviewUtils.asDict(trs),
|
||||
tagRenderingOrder: trs.map(tr => tr.id),
|
||||
publicLayers
|
||||
tagRenderingOrder: trs.map((tr) => tr.id),
|
||||
publicLayers,
|
||||
}
|
||||
const knownTagRenderings = new Set<string>()
|
||||
convertState.tagRenderings.forEach((_, key) => knownTagRenderings.add(key))
|
||||
|
@ -774,7 +780,7 @@ class LayerOverviewUtils extends Script {
|
|||
)
|
||||
try {
|
||||
themeFile = new PrepareTheme(convertState, {
|
||||
skipDefaultLayers: true
|
||||
skipDefaultLayers: true,
|
||||
}).convertStrict(
|
||||
themeFile,
|
||||
ConversionContext.construct([themePath], ["PrepareLayer"])
|
||||
|
@ -808,7 +814,7 @@ class LayerOverviewUtils extends Script {
|
|||
const e: string = [
|
||||
`the icon for theme ${themeFile.id} is too small. Please rescale the icon at ${themeFile.icon}`,
|
||||
`Even though an SVG is 'infinitely scaleable', the icon should be dimensioned bigger. One of the build steps of the theme does convert the image to a PNG (to serve as PWA-icon) and having a small dimension will cause blurry images.`,
|
||||
` Width = ${width} height = ${height}; we recommend a size of at least 500px * 500px and to use a square aspect ratio.`
|
||||
` Width = ${width} height = ${height}; we recommend a size of at least 500px * 500px and to use a square aspect ratio.`,
|
||||
].join("\n")
|
||||
err(e)
|
||||
}
|
||||
|
@ -839,7 +845,7 @@ class LayerOverviewUtils extends Script {
|
|||
new Translation(t.description)
|
||||
.FirstSentence()
|
||||
.OnEveryLanguage((s) => parse_html(s).textContent).translations,
|
||||
mustHaveLanguage: t.mustHaveLanguage?.length > 0
|
||||
mustHaveLanguage: t.mustHaveLanguage?.length > 0,
|
||||
}
|
||||
})
|
||||
)
|
||||
|
@ -847,10 +853,10 @@ class LayerOverviewUtils extends Script {
|
|||
|
||||
console.log(
|
||||
"Recompiled themes " +
|
||||
recompiledThemes.join(", ") +
|
||||
" and skipped " +
|
||||
skippedThemes.length +
|
||||
" themes"
|
||||
recompiledThemes.join(", ") +
|
||||
" and skipped " +
|
||||
skippedThemes.length +
|
||||
" themes"
|
||||
)
|
||||
|
||||
return fixed
|
||||
|
|
|
@ -249,7 +249,7 @@ class GenerateLayouts extends Script {
|
|||
continue
|
||||
}
|
||||
let display = ' style="display: none"'
|
||||
if(!defaultSet){
|
||||
if (!defaultSet) {
|
||||
display = ""
|
||||
defaultSet = true
|
||||
}
|
||||
|
|
|
@ -55,16 +55,12 @@ export default class InitialMapPositioning {
|
|||
layoutToUse?.startZoom ?? 1,
|
||||
"The initial/current zoom level"
|
||||
)
|
||||
const defaultLat =layoutToUse?.startLat ?? 0
|
||||
const lat = localStorageSynced(
|
||||
"lat",
|
||||
defaultLat ,
|
||||
"The initial/current latitude"
|
||||
)
|
||||
const defaultLat = layoutToUse?.startLat ?? 0
|
||||
const lat = localStorageSynced("lat", defaultLat, "The initial/current latitude")
|
||||
const defaultLon = layoutToUse?.startLon ?? 0
|
||||
const lon = localStorageSynced(
|
||||
"lon",
|
||||
defaultLon ,
|
||||
defaultLon,
|
||||
"The initial/current longitude of the app"
|
||||
)
|
||||
|
||||
|
@ -92,16 +88,21 @@ export default class InitialMapPositioning {
|
|||
const [lat, lon] = osmObject.centerpoint()
|
||||
this.location.setData({ lon, lat })
|
||||
})
|
||||
} else if (Constants.GeoIpServer && lat.data === defaultLat && lon.data === defaultLon && !Utils.runningFromConsole) {
|
||||
} else if (
|
||||
Constants.GeoIpServer &&
|
||||
lat.data === defaultLat &&
|
||||
lon.data === defaultLon &&
|
||||
!Utils.runningFromConsole
|
||||
) {
|
||||
console.log("Using geoip to determine start location...")
|
||||
// We use geo-IP to zoom to some location
|
||||
Utils.downloadJson<{ latitude: number, longitude: number }>(
|
||||
Utils.downloadJson<{ latitude: number; longitude: number }>(
|
||||
Constants.GeoIpServer + "ip"
|
||||
).then(({ longitude, latitude }) => {
|
||||
if(geolocationState.currentGPSLocation.data !== undefined){
|
||||
if (geolocationState.currentGPSLocation.data !== undefined) {
|
||||
return // We got a geolocation by now, abort
|
||||
}
|
||||
console.log("Setting location based on geoip", longitude, latitude)
|
||||
console.log("Setting location based on geoip", longitude, latitude)
|
||||
this.zoom.setData(8)
|
||||
this.location.setData({ lon: longitude, lat: latitude })
|
||||
})
|
||||
|
|
|
@ -163,24 +163,31 @@ export default class DetermineLayout {
|
|||
return dict
|
||||
}
|
||||
private static getSharedTagRenderingOrder(): string[] {
|
||||
return questions.tagRenderings.map(tr => tr.id)
|
||||
return questions.tagRenderings.map((tr) => tr.id)
|
||||
}
|
||||
|
||||
private static prepCustomTheme(json: any, sourceUrl?: string, forceId?: string): LayoutConfig {
|
||||
if (json.layers === undefined && json.tagRenderings !== undefined) {
|
||||
// We got fed a layer instead of a theme
|
||||
const layerConfig = <LayerConfigJson>json
|
||||
const icon = Utils.NoNull(layerConfig.pointRendering.flatMap(
|
||||
pr => pr.marker
|
||||
).map(iconSpec => {
|
||||
const icon = new TagRenderingConfig(<TagRenderingConfigJson>iconSpec.icon).render.txt
|
||||
if(iconSpec.color === undefined || icon.startsWith("http:") || icon.startsWith("https:")){
|
||||
return icon
|
||||
}
|
||||
const color = new TagRenderingConfig(<TagRenderingConfigJson>iconSpec.color).render.txt
|
||||
return icon+":"+color
|
||||
|
||||
})).join(";")
|
||||
const icon = Utils.NoNull(
|
||||
layerConfig.pointRendering
|
||||
.flatMap((pr) => pr.marker)
|
||||
.map((iconSpec) => {
|
||||
const icon = new TagRenderingConfig(<TagRenderingConfigJson>iconSpec.icon)
|
||||
.render.txt
|
||||
if (
|
||||
iconSpec.color === undefined ||
|
||||
icon.startsWith("http:") ||
|
||||
icon.startsWith("https:")
|
||||
) {
|
||||
return icon
|
||||
}
|
||||
const color = new TagRenderingConfig(<TagRenderingConfigJson>iconSpec.color)
|
||||
.render.txt
|
||||
return icon + ":" + color
|
||||
})
|
||||
).join(";")
|
||||
|
||||
json = {
|
||||
id: json.id,
|
||||
|
|
|
@ -11,14 +11,17 @@ import { FeatureSource } from "../FeatureSource"
|
|||
* Highly specialized feature source.
|
||||
* Based on a lon/lat UIEVentSource, will generate the corresponding feature with the correct properties
|
||||
*/
|
||||
export class LastClickFeatureSource implements FeatureSource{
|
||||
export class LastClickFeatureSource implements FeatureSource {
|
||||
public readonly renderings: string[]
|
||||
private i: number = 0
|
||||
private readonly hasPresets: boolean
|
||||
private readonly hasNoteLayer: boolean
|
||||
public static readonly newPointElementId = "new_point_dialog"
|
||||
public readonly features: Store<Feature[]>
|
||||
constructor(layout: LayoutConfig, clickSource: Store<{lon:number,lat:number,mode:"left"|"right"|"middle"}> ) {
|
||||
constructor(
|
||||
layout: LayoutConfig,
|
||||
clickSource: Store<{ lon: number; lat: number; mode: "left" | "right" | "middle" }>
|
||||
) {
|
||||
this.hasNoteLayer = layout.hasNoteLayer()
|
||||
this.hasPresets = layout.hasPresets()
|
||||
const allPresets: BaseUIElement[] = []
|
||||
|
@ -33,7 +36,7 @@ export class LastClickFeatureSource implements FeatureSource{
|
|||
}
|
||||
const { html } = rendering.RenderIcon(tags, {
|
||||
noSize: true,
|
||||
includeBadges: false
|
||||
includeBadges: false,
|
||||
})
|
||||
allPresets.push(html)
|
||||
}
|
||||
|
@ -44,12 +47,16 @@ export class LastClickFeatureSource implements FeatureSource{
|
|||
)
|
||||
)
|
||||
|
||||
this.features = clickSource.mapD(({lon, lat,mode}) =>
|
||||
[this.createFeature(lon, lat, mode)])
|
||||
|
||||
this.features = clickSource.mapD(({ lon, lat, mode }) => [
|
||||
this.createFeature(lon, lat, mode),
|
||||
])
|
||||
}
|
||||
|
||||
public createFeature(lon: number, lat: number, mode?: "left" | "right" | "middle"): Feature<Point, OsmTags> {
|
||||
public createFeature(
|
||||
lon: number,
|
||||
lat: number,
|
||||
mode?: "left" | "right" | "middle"
|
||||
): Feature<Point, OsmTags> {
|
||||
const properties: OsmTags = {
|
||||
id: LastClickFeatureSource.newPointElementId + "_" + this.i,
|
||||
has_note_layer: this.hasNoteLayer ? "yes" : "no",
|
||||
|
@ -57,7 +64,7 @@ export class LastClickFeatureSource implements FeatureSource{
|
|||
renderings: this.renderings.join(""),
|
||||
number_of_presets: "" + this.renderings.length,
|
||||
first_preset: this.renderings[0],
|
||||
mouse_button: mode ?? "none"
|
||||
mouse_button: mode ?? "none",
|
||||
}
|
||||
this.i++
|
||||
|
||||
|
@ -66,8 +73,8 @@ export class LastClickFeatureSource implements FeatureSource{
|
|||
properties,
|
||||
geometry: {
|
||||
type: "Point",
|
||||
coordinates: [lon, lat]
|
||||
}
|
||||
coordinates: [lon, lat],
|
||||
},
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -85,16 +85,19 @@ export default class MetaTagging {
|
|||
console.log("Binding an updater to", feature)
|
||||
let updateCount = 0
|
||||
tags?.addCallbackD(() => {
|
||||
console.log("Received an update! Re-calculating the metatags, timediff:", new Date().getTime() - lastUpdateMoment.getTime())
|
||||
console.log(
|
||||
"Received an update! Re-calculating the metatags, timediff:",
|
||||
new Date().getTime() - lastUpdateMoment.getTime()
|
||||
)
|
||||
|
||||
if (feature !== state.selectedElement.data) {
|
||||
return true // Unregister, we are not the selected element anymore
|
||||
}
|
||||
if (new Date().getTime() - lastUpdateMoment.getTime() < (250 + updateCount * 50)) {
|
||||
if (new Date().getTime() - lastUpdateMoment.getTime() < 250 + updateCount * 50) {
|
||||
return
|
||||
}
|
||||
|
||||
updateCount ++
|
||||
updateCount++
|
||||
lastUpdateMoment = new Date()
|
||||
window.requestIdleCallback(() => {
|
||||
this.updateCurrentSelectedElement()
|
||||
|
|
|
@ -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<string, string>}) {
|
||||
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'
|
||||
}
|
||||
}
|
||||
public metaTaggging_for_usersettings(feat: { properties: Record<string, string> }) {
|
||||
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"
|
||||
}
|
||||
}
|
||||
|
|
|
@ -27,23 +27,23 @@ export default class LinkedDataLoader {
|
|||
opening_hours: { "@id": "http://schema.org/openingHoursSpecification" },
|
||||
openingHours: { "@id": "http://schema.org/openingHours", "@container": "@set" },
|
||||
geo: { "@id": "http://schema.org/geo" },
|
||||
alt_name: { "@id": "http://schema.org/alternateName" }
|
||||
alt_name: { "@id": "http://schema.org/alternateName" },
|
||||
}
|
||||
private static COMPACTING_CONTEXT_OH = {
|
||||
dayOfWeek: { "@id": "http://schema.org/dayOfWeek", "@container": "@set" },
|
||||
closes: {
|
||||
"@id": "http://schema.org/closes",
|
||||
"@type": "http://www.w3.org/2001/XMLSchema#time"
|
||||
"@type": "http://www.w3.org/2001/XMLSchema#time",
|
||||
},
|
||||
opens: {
|
||||
"@id": "http://schema.org/opens",
|
||||
"@type": "http://www.w3.org/2001/XMLSchema#time"
|
||||
}
|
||||
"@type": "http://www.w3.org/2001/XMLSchema#time",
|
||||
},
|
||||
}
|
||||
private static formatters: Record<"phone" | "email" | "website", Validator> = {
|
||||
phone: new PhoneValidator(),
|
||||
email: new EmailValidator(),
|
||||
website: new UrlValidator(undefined, undefined, true)
|
||||
website: new UrlValidator(undefined, undefined, true),
|
||||
}
|
||||
private static ignoreKeys = [
|
||||
"http://schema.org/logo",
|
||||
|
@ -56,7 +56,7 @@ export default class LinkedDataLoader {
|
|||
"http://schema.org/description",
|
||||
"http://schema.org/hasMap",
|
||||
"http://schema.org/priceRange",
|
||||
"http://schema.org/contactPoint"
|
||||
"http://schema.org/contactPoint",
|
||||
]
|
||||
|
||||
private static shapeToPolygon(str: string): Polygon {
|
||||
|
@ -69,8 +69,8 @@ export default class LinkedDataLoader {
|
|||
.trim()
|
||||
.split(" ")
|
||||
.map((n) => Number(n))
|
||||
)
|
||||
]
|
||||
),
|
||||
],
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -92,18 +92,18 @@ export default class LinkedDataLoader {
|
|||
const context = {
|
||||
lat: {
|
||||
"@id": "http://schema.org/latitude",
|
||||
"@type": "http://www.w3.org/2001/XMLSchema#double"
|
||||
"@type": "http://www.w3.org/2001/XMLSchema#double",
|
||||
},
|
||||
lon: {
|
||||
"@id": "http://schema.org/longitude",
|
||||
"@type": "http://www.w3.org/2001/XMLSchema#double"
|
||||
}
|
||||
"@type": "http://www.w3.org/2001/XMLSchema#double",
|
||||
},
|
||||
}
|
||||
const flattened = await jsonld.compact(geo, context)
|
||||
|
||||
return {
|
||||
type: "Point",
|
||||
coordinates: [Number(flattened.lon), Number(flattened.lat)]
|
||||
coordinates: [Number(flattened.lon), Number(flattened.lat)],
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -145,7 +145,7 @@ export default class LinkedDataLoader {
|
|||
Looking at you, C&A!
|
||||
view-source:https://www.c-and-a.com/stores/be-en/oost-vlaanderen/sint-niklaas/stationsstraat-100.html
|
||||
* */
|
||||
parts = parts.filter(p => !p.match(/.. 00:00-00:00/))
|
||||
parts = parts.filter((p) => !p.match(/.. 00:00-00:00/))
|
||||
// actually the same as OSM-oh
|
||||
return OH.simplify(parts.join(";"))
|
||||
}
|
||||
|
@ -247,18 +247,16 @@ export default class LinkedDataLoader {
|
|||
return await LinkedDataLoader.compact(data, options)
|
||||
}
|
||||
|
||||
|
||||
let htmlContent = await Utils.download(url)
|
||||
const div = document.createElement("div")
|
||||
div.innerHTML = htmlContent
|
||||
const script = Array.from(div.getElementsByTagName("script"))
|
||||
.find(script => script.type === "application/ld+json")
|
||||
|
||||
const script = Array.from(div.getElementsByTagName("script")).find(
|
||||
(script) => script.type === "application/ld+json"
|
||||
)
|
||||
|
||||
const snippet = JSON.parse(script.textContent)
|
||||
snippet["@base"] = url
|
||||
return await LinkedDataLoader.compact(snippet, options)
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -309,7 +307,7 @@ export default class LinkedDataLoader {
|
|||
if (properties["latitude"] && properties["longitude"]) {
|
||||
geometry = {
|
||||
type: "Point",
|
||||
coordinates: [Number(properties["longitude"]), Number(properties["latitude"])]
|
||||
coordinates: [Number(properties["longitude"]), Number(properties["latitude"])],
|
||||
}
|
||||
delete properties["latitude"]
|
||||
delete properties["longitude"]
|
||||
|
@ -321,7 +319,7 @@ export default class LinkedDataLoader {
|
|||
const geo: GeoJSON = {
|
||||
type: "Feature",
|
||||
properties,
|
||||
geometry
|
||||
geometry,
|
||||
}
|
||||
delete linkedData.geo
|
||||
delete properties.shape
|
||||
|
@ -439,7 +437,7 @@ export default class LinkedDataLoader {
|
|||
"brede publiek",
|
||||
"iedereen",
|
||||
"bezoekers",
|
||||
"iedereen - vooral bezoekers gemeentehuis of bibliotheek."
|
||||
"iedereen - vooral bezoekers gemeentehuis of bibliotheek.",
|
||||
].indexOf(audience.toLowerCase()) >= 0
|
||||
) {
|
||||
return "yes"
|
||||
|
@ -522,7 +520,7 @@ export default class LinkedDataLoader {
|
|||
mv: "http://schema.mobivoc.org/",
|
||||
gr: "http://purl.org/goodrelations/v1#",
|
||||
vp: "https://data.velopark.be/openvelopark/vocabulary#",
|
||||
vpt: "https://data.velopark.be/openvelopark/terms#"
|
||||
vpt: "https://data.velopark.be/openvelopark/terms#",
|
||||
},
|
||||
[url],
|
||||
undefined,
|
||||
|
@ -543,7 +541,7 @@ export default class LinkedDataLoader {
|
|||
mv: "http://schema.mobivoc.org/",
|
||||
gr: "http://purl.org/goodrelations/v1#",
|
||||
vp: "https://data.velopark.be/openvelopark/vocabulary#",
|
||||
vpt: "https://data.velopark.be/openvelopark/terms#"
|
||||
vpt: "https://data.velopark.be/openvelopark/terms#",
|
||||
},
|
||||
[url],
|
||||
"g",
|
||||
|
@ -686,20 +684,20 @@ export default class LinkedDataLoader {
|
|||
const withProxyUrl = Constants.linkedDataProxy.replace("{url}", encodeURIComponent(url))
|
||||
const optionalPaths: Record<string, string | Record<string, string>> = {
|
||||
"schema:interactionService": {
|
||||
"schema:url": "website"
|
||||
"schema:url": "website",
|
||||
},
|
||||
"mv:operatedBy": {
|
||||
"gr:legalName": "operator"
|
||||
"gr:legalName": "operator",
|
||||
},
|
||||
"schema:contactPoint": {
|
||||
"schema:email": "email",
|
||||
"schema:telephone": "phone"
|
||||
"schema:telephone": "phone",
|
||||
},
|
||||
"schema:dateModified": "_last_edit_timestamp"
|
||||
"schema:dateModified": "_last_edit_timestamp",
|
||||
}
|
||||
if (includeExtras) {
|
||||
optionalPaths["schema:address"] = {
|
||||
"schema:streetAddress": "addr"
|
||||
"schema:streetAddress": "addr",
|
||||
}
|
||||
optionalPaths["schema:name"] = "name"
|
||||
optionalPaths["schema:description"] = "description"
|
||||
|
@ -717,19 +715,19 @@ export default class LinkedDataLoader {
|
|||
"schema:geo": {
|
||||
"schema:latitude": "latitude",
|
||||
"schema:longitude": "longitude",
|
||||
"schema:polygon": "shape"
|
||||
"schema:polygon": "shape",
|
||||
},
|
||||
"schema:priceSpecification": {
|
||||
"mv:freeOfCharge": "fee",
|
||||
"schema:price": "charge"
|
||||
}
|
||||
"schema:price": "charge",
|
||||
},
|
||||
}
|
||||
|
||||
const extra = [
|
||||
"schema:priceSpecification [ mv:dueForTime [ mv:timeStartValue ?chargeStart; mv:timeEndValue ?chargeEnd; mv:timeUnit ?timeUnit ] ]",
|
||||
"vp:allows [vp:bicycleType <https://data.velopark.be/openvelopark/terms#CargoBicycle>; vp:bicyclesAmount ?capacityCargobike; vp:bicycleType ?cargoBikeType]",
|
||||
"vp:allows [vp:bicycleType <https://data.velopark.be/openvelopark/terms#ElectricBicycle>; vp:bicyclesAmount ?capacityElectric; vp:bicycleType ?electricBikeType]",
|
||||
"vp:allows [vp:bicycleType <https://data.velopark.be/openvelopark/terms#TandemBicycle>; vp:bicyclesAmount ?capacityTandem; vp:bicycleType ?tandemBikeType]"
|
||||
"vp:allows [vp:bicycleType <https://data.velopark.be/openvelopark/terms#TandemBicycle>; vp:bicyclesAmount ?capacityTandem; vp:bicycleType ?tandemBikeType]",
|
||||
]
|
||||
|
||||
const unpatched = await this.fetchEntry(
|
||||
|
|
|
@ -206,23 +206,29 @@ export default class FeatureReviews {
|
|||
|
||||
this.subjectUri = this.ConstructSubjectUri()
|
||||
|
||||
this.subjectUri.addCallbackAndRunD(async (sub) => {
|
||||
const reviews = await MangroveReviews.getReviews({ sub })
|
||||
console.log("Got reviews for", feature, reviews, sub)
|
||||
this.addReviews(reviews.reviews, this._name.data)
|
||||
}, [this._name])
|
||||
this.subjectUri.addCallbackAndRunD(
|
||||
async (sub) => {
|
||||
const reviews = await MangroveReviews.getReviews({ sub })
|
||||
console.log("Got reviews for", feature, reviews, sub)
|
||||
this.addReviews(reviews.reviews, this._name.data)
|
||||
},
|
||||
[this._name]
|
||||
)
|
||||
/* We also construct all subject queries _without_ encoding the name to work around a previous bug
|
||||
* See https://github.com/giggls/opencampsitemap/issues/30
|
||||
*/
|
||||
this.ConstructSubjectUri(true).mapD(async (sub) => {
|
||||
try {
|
||||
const reviews = await MangroveReviews.getReviews({ sub })
|
||||
console.log("Got reviews (no-encode) for", feature, reviews, sub)
|
||||
this.addReviews(reviews.reviews, this._name.data)
|
||||
} catch (e) {
|
||||
console.log("Could not fetch reviews for partially incorrect query ", sub)
|
||||
}
|
||||
}, [this._name])
|
||||
this.ConstructSubjectUri(true).mapD(
|
||||
async (sub) => {
|
||||
try {
|
||||
const reviews = await MangroveReviews.getReviews({ sub })
|
||||
console.log("Got reviews (no-encode) for", feature, reviews, sub)
|
||||
this.addReviews(reviews.reviews, this._name.data)
|
||||
} catch (e) {
|
||||
console.log("Could not fetch reviews for partially incorrect query ", sub)
|
||||
}
|
||||
},
|
||||
[this._name]
|
||||
)
|
||||
this.average = this._reviews.map((reviews) => {
|
||||
if (!reviews) {
|
||||
return null
|
||||
|
@ -321,7 +327,10 @@ export default class FeatureReviews {
|
|||
* @param reviews
|
||||
* @private
|
||||
*/
|
||||
private addReviews(reviews: { payload: Review; kid: string; signature: string }[], expectedName: string) {
|
||||
private addReviews(
|
||||
reviews: { payload: Review; kid: string; signature: string }[],
|
||||
expectedName: string
|
||||
) {
|
||||
const alreadyKnown = new Set(this._reviews.data.map((r) => r.rating + " " + r.opinion))
|
||||
|
||||
let hasNew = false
|
||||
|
@ -333,20 +342,17 @@ export default class FeatureReviews {
|
|||
if (url.protocol !== "geo:") {
|
||||
continue
|
||||
}
|
||||
const coordinate = <[number, number]>(
|
||||
url.pathname.split(",").map((n) => Number(n))
|
||||
)
|
||||
const distance = GeoOperations.distanceBetween(
|
||||
[this._lat, this._lon],
|
||||
coordinate
|
||||
)
|
||||
const coordinate = <[number, number]>url.pathname.split(",").map((n) => Number(n))
|
||||
const distance = GeoOperations.distanceBetween([this._lat, this._lon], coordinate)
|
||||
if (distance > this._uncertainty) {
|
||||
continue
|
||||
}
|
||||
const nameUrl = url.searchParams.get("q")
|
||||
const distanceName = Utils.levenshteinDistance(nameUrl.toLowerCase(), expectedName.toLowerCase()) / expectedName.length
|
||||
const nameUrl = url.searchParams.get("q")
|
||||
const distanceName =
|
||||
Utils.levenshteinDistance(nameUrl.toLowerCase(), expectedName.toLowerCase()) /
|
||||
expectedName.length
|
||||
|
||||
if(distanceName > 0.25){
|
||||
if (distanceName > 0.25) {
|
||||
// Then name is wildly different
|
||||
continue
|
||||
}
|
||||
|
@ -356,7 +362,6 @@ export default class FeatureReviews {
|
|||
continue
|
||||
}
|
||||
|
||||
|
||||
const key = review.rating + " " + review.opinion
|
||||
if (alreadyKnown.has(key)) {
|
||||
continue
|
||||
|
|
|
@ -7,12 +7,12 @@ import {
|
|||
FirstOf,
|
||||
Fuse,
|
||||
On,
|
||||
SetDefault
|
||||
SetDefault,
|
||||
} from "./Conversion"
|
||||
import { LayerConfigJson } from "../Json/LayerConfigJson"
|
||||
import {
|
||||
MinimalTagRenderingConfigJson,
|
||||
TagRenderingConfigJson
|
||||
TagRenderingConfigJson,
|
||||
} from "../Json/TagRenderingConfigJson"
|
||||
import { Utils } from "../../../Utils"
|
||||
import RewritableConfigJson from "../Json/RewritableConfigJson"
|
||||
|
@ -85,17 +85,17 @@ class ExpandFilter extends DesugaringStep<LayerConfigJson> {
|
|||
}
|
||||
const options = matchingTr.mappings.map((mapping) => ({
|
||||
question: mapping.then,
|
||||
osmTags: mapping.if
|
||||
osmTags: mapping.if,
|
||||
}))
|
||||
options.unshift({
|
||||
question: {
|
||||
en: "All types"
|
||||
en: "All types",
|
||||
},
|
||||
osmTags: undefined
|
||||
osmTags: undefined,
|
||||
})
|
||||
newFilters.push({
|
||||
id: filter,
|
||||
options
|
||||
options,
|
||||
})
|
||||
continue
|
||||
}
|
||||
|
@ -134,9 +134,9 @@ class ExpandFilter extends DesugaringStep<LayerConfigJson> {
|
|||
.enter(filter)
|
||||
.err(
|
||||
"While searching for predefined filter " +
|
||||
filter +
|
||||
": this filter is not found. Perhaps you meant one of: " +
|
||||
suggestions
|
||||
filter +
|
||||
": this filter is not found. Perhaps you meant one of: " +
|
||||
suggestions
|
||||
)
|
||||
}
|
||||
newFilters.push(found)
|
||||
|
@ -149,9 +149,9 @@ class ExpandTagRendering extends Conversion<
|
|||
| string
|
||||
| TagRenderingConfigJson
|
||||
| {
|
||||
builtin: string | string[]
|
||||
override: any
|
||||
},
|
||||
builtin: string | string[]
|
||||
override: any
|
||||
},
|
||||
TagRenderingConfigJson[]
|
||||
> {
|
||||
private readonly _state: DesugaringContext
|
||||
|
@ -340,25 +340,25 @@ class ExpandTagRendering extends Conversion<
|
|||
ctx.warn(
|
||||
`A literal rendering was detected: ${tr}
|
||||
Did you perhaps forgot to add a layer name as 'layername.${tr}'? ` +
|
||||
Array.from(state.sharedLayers.keys()).join(", ")
|
||||
Array.from(state.sharedLayers.keys()).join(", ")
|
||||
)
|
||||
}
|
||||
|
||||
if (this._options?.noHardcodedStrings && this._state?.sharedLayers?.size > 0) {
|
||||
ctx.err(
|
||||
"Detected an invocation to a builtin tagRendering, but this tagrendering was not found: " +
|
||||
tr +
|
||||
" \n Did you perhaps forget to add the layer as prefix, such as `icons." +
|
||||
tr +
|
||||
"`? "
|
||||
tr +
|
||||
" \n Did you perhaps forget to add the layer as prefix, such as `icons." +
|
||||
tr +
|
||||
"`? "
|
||||
)
|
||||
}
|
||||
|
||||
return [
|
||||
<any>{
|
||||
render: tr,
|
||||
id: tr.replace(/[^a-zA-Z0-9]/g, "")
|
||||
}
|
||||
id: tr.replace(/[^a-zA-Z0-9]/g, ""),
|
||||
},
|
||||
]
|
||||
}
|
||||
return lookup
|
||||
|
@ -385,9 +385,9 @@ class ExpandTagRendering extends Conversion<
|
|||
}
|
||||
ctx.err(
|
||||
"An object calling a builtin can only have keys `builtin` or `override`, but a key with name `" +
|
||||
key +
|
||||
"` was found. This won't be picked up! The full object is: " +
|
||||
JSON.stringify(tr)
|
||||
key +
|
||||
"` was found. This won't be picked up! The full object is: " +
|
||||
JSON.stringify(tr)
|
||||
)
|
||||
}
|
||||
|
||||
|
@ -411,19 +411,19 @@ class ExpandTagRendering extends Conversion<
|
|||
if (state.sharedLayers.size === 0) {
|
||||
ctx.warn(
|
||||
"BOOTSTRAPPING. Rerun generate layeroverview. While reusing tagrendering: " +
|
||||
name +
|
||||
": layer " +
|
||||
layerName +
|
||||
" not found for now, but ignoring as this is a bootstrapping run. "
|
||||
name +
|
||||
": layer " +
|
||||
layerName +
|
||||
" not found for now, but ignoring as this is a bootstrapping run. "
|
||||
)
|
||||
} else {
|
||||
ctx.err(
|
||||
": While reusing tagrendering: " +
|
||||
name +
|
||||
": layer " +
|
||||
layerName +
|
||||
" not found. Maybe you meant one of " +
|
||||
candidates.slice(0, 3).join(", ")
|
||||
name +
|
||||
": layer " +
|
||||
layerName +
|
||||
" not found. Maybe you meant one of " +
|
||||
candidates.slice(0, 3).join(", ")
|
||||
)
|
||||
}
|
||||
continue
|
||||
|
@ -435,10 +435,10 @@ class ExpandTagRendering extends Conversion<
|
|||
candidates = Utils.sortedByLevenshteinDistance(name, candidates, (i) => i)
|
||||
ctx.err(
|
||||
"The tagRendering with identifier " +
|
||||
name +
|
||||
" was not found.\n\tDid you mean one of " +
|
||||
candidates.join(", ") +
|
||||
"?\n(Hint: did you add a new label and are you trying to use this label at the same time? Run 'reset:layeroverview' first"
|
||||
name +
|
||||
" was not found.\n\tDid you mean one of " +
|
||||
candidates.join(", ") +
|
||||
"?\n(Hint: did you add a new label and are you trying to use this label at the same time? Run 'reset:layeroverview' first"
|
||||
)
|
||||
continue
|
||||
}
|
||||
|
@ -492,7 +492,7 @@ class DetectInline extends DesugaringStep<QuestionableTagRenderingConfigJson> {
|
|||
if (json.freeform.inline === true) {
|
||||
context.err(
|
||||
"'inline' is set, but the rendering contains a special visualisation...\n " +
|
||||
spec[key]
|
||||
spec[key]
|
||||
)
|
||||
}
|
||||
json = JSON.parse(JSON.stringify(json))
|
||||
|
@ -578,20 +578,20 @@ export class AddQuestionBox extends DesugaringStep<LayerConfigJson> {
|
|||
if (blacklisted?.length > 0 && used?.length > 0) {
|
||||
context.err(
|
||||
"The {questions()}-special rendering only supports either a blacklist OR a whitelist, but not both." +
|
||||
"\n Whitelisted: " +
|
||||
used.join(", ") +
|
||||
"\n Blacklisted: " +
|
||||
blacklisted.join(", ")
|
||||
"\n Whitelisted: " +
|
||||
used.join(", ") +
|
||||
"\n Blacklisted: " +
|
||||
blacklisted.join(", ")
|
||||
)
|
||||
}
|
||||
for (const usedLabel of used) {
|
||||
if (!allLabels.has(usedLabel)) {
|
||||
context.err(
|
||||
"This layers specifies a special question element for label `" +
|
||||
usedLabel +
|
||||
"`, but this label doesn't exist.\n" +
|
||||
" Available labels are " +
|
||||
Array.from(allLabels).join(", ")
|
||||
usedLabel +
|
||||
"`, but this label doesn't exist.\n" +
|
||||
" Available labels are " +
|
||||
Array.from(allLabels).join(", ")
|
||||
)
|
||||
}
|
||||
seen.add(usedLabel)
|
||||
|
@ -605,8 +605,8 @@ export class AddQuestionBox extends DesugaringStep<LayerConfigJson> {
|
|||
const question: QuestionableTagRenderingConfigJson = {
|
||||
id: "leftover-questions",
|
||||
render: {
|
||||
"*": `{questions( ,${Array.from(seen).join(";")})}`
|
||||
}
|
||||
"*": `{questions( ,${Array.from(seen).join(";")})}`,
|
||||
},
|
||||
}
|
||||
json.tagRenderings.push(question)
|
||||
}
|
||||
|
@ -626,11 +626,11 @@ export class AddEditingElements extends DesugaringStep<LayerConfigJson> {
|
|||
"all_tags",
|
||||
"qr_code",
|
||||
"nearby_images",
|
||||
"linked_open_data"
|
||||
"linked_open_data",
|
||||
]
|
||||
|
||||
private readonly _desugaring: DesugaringContext
|
||||
private readonly _addedByDefaultAtTop : QuestionableTagRenderingConfigJson[]
|
||||
private readonly _addedByDefaultAtTop: QuestionableTagRenderingConfigJson[]
|
||||
private readonly _addedByDefault: QuestionableTagRenderingConfigJson[]
|
||||
constructor(desugaring: DesugaringContext) {
|
||||
super(
|
||||
|
@ -643,17 +643,14 @@ export class AddEditingElements extends DesugaringStep<LayerConfigJson> {
|
|||
const builtinQuestions = Array.from(this._desugaring.tagRenderings?.values() ?? [])
|
||||
|
||||
function getAddedByDefaultIds(key: string): QuestionableTagRenderingConfigJson[] {
|
||||
const addByDefault = builtinQuestions.filter(tr => tr.labels?.indexOf(key) >= 0)
|
||||
const ids = new Set(addByDefault.map(tr => tr.id))
|
||||
const idsInOrder = desugaring.tagRenderingOrder?.filter(id => ids.has(id)) ?? []
|
||||
return Utils.NoNull(idsInOrder.map(id => desugaring.tagRenderings.get(id)))
|
||||
const addByDefault = builtinQuestions.filter((tr) => tr.labels?.indexOf(key) >= 0)
|
||||
const ids = new Set(addByDefault.map((tr) => tr.id))
|
||||
const idsInOrder = desugaring.tagRenderingOrder?.filter((id) => ids.has(id)) ?? []
|
||||
return Utils.NoNull(idsInOrder.map((id) => desugaring.tagRenderings.get(id)))
|
||||
}
|
||||
|
||||
this._addedByDefaultAtTop = getAddedByDefaultIds("added_by_default_top")
|
||||
this._addedByDefault = getAddedByDefaultIds("added_by_default")
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
convert(json: LayerConfigJson, _: ConversionContext): LayerConfigJson {
|
||||
|
@ -681,7 +678,7 @@ export class AddEditingElements extends DesugaringStep<LayerConfigJson> {
|
|||
|
||||
/***** ADD TO TOP ****/
|
||||
|
||||
json.tagRenderings.unshift(...this._addedByDefaultAtTop.filter(tr => !allIds.has(tr.id)))
|
||||
json.tagRenderings.unshift(...this._addedByDefaultAtTop.filter((tr) => !allIds.has(tr.id)))
|
||||
|
||||
/***** ADD TO BOTTOM ****/
|
||||
|
||||
|
@ -689,10 +686,11 @@ export class AddEditingElements extends DesugaringStep<LayerConfigJson> {
|
|||
json.tagRenderings.push(this._desugaring.tagRenderings.get("minimap"))
|
||||
}
|
||||
|
||||
if(usedSpecialFunctions.has("image_upload") &&
|
||||
!usedSpecialFunctions.has("nearby_images")){
|
||||
if (
|
||||
usedSpecialFunctions.has("image_upload") &&
|
||||
!usedSpecialFunctions.has("nearby_images")
|
||||
) {
|
||||
json.tagRenderings.push(this._desugaring.tagRenderings.get("nearby_images"))
|
||||
|
||||
}
|
||||
|
||||
if (json.allowSplit && !usedSpecialFunctions.has("split_button")) {
|
||||
|
@ -703,18 +701,17 @@ export class AddEditingElements extends DesugaringStep<LayerConfigJson> {
|
|||
if (json.allowMove && !usedSpecialFunctions.has("move_button")) {
|
||||
json.tagRenderings.push({
|
||||
id: "move-button",
|
||||
render: { "*": "{move_button()}" }
|
||||
render: { "*": "{move_button()}" },
|
||||
})
|
||||
}
|
||||
if (json.deletion && !usedSpecialFunctions.has("delete_button")) {
|
||||
json.tagRenderings.push({
|
||||
id: "delete-button",
|
||||
render: { "*": "{delete_button()}" }
|
||||
render: { "*": "{delete_button()}" },
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
json.tagRenderings.push(...this._addedByDefault.filter(tr => !allIds.has(tr.id)))
|
||||
json.tagRenderings.push(...this._addedByDefault.filter((tr) => !allIds.has(tr.id)))
|
||||
|
||||
if (!usedSpecialFunctions.has("all_tags")) {
|
||||
const trc: QuestionableTagRenderingConfigJson = {
|
||||
|
@ -725,9 +722,9 @@ export class AddEditingElements extends DesugaringStep<LayerConfigJson> {
|
|||
or: [
|
||||
"__featureSwitchIsDebugging=true",
|
||||
"mapcomplete-show_tags=full",
|
||||
"mapcomplete-show_debug=yes"
|
||||
]
|
||||
}
|
||||
"mapcomplete-show_debug=yes",
|
||||
],
|
||||
},
|
||||
}
|
||||
json.tagRenderings?.push(trc)
|
||||
}
|
||||
|
@ -749,9 +746,9 @@ export class RewriteSpecial extends DesugaringStep<TagRenderingConfigJson> {
|
|||
}
|
||||
|
||||
private static escapeStr(v: string, context: ConversionContext): string {
|
||||
if(typeof v !== "string"){
|
||||
context.err("Detected a non-string value where one expected a string: "+v)
|
||||
return RewriteSpecial.escapeStr(""+v, context)
|
||||
if (typeof v !== "string") {
|
||||
context.err("Detected a non-string value where one expected a string: " + v)
|
||||
return RewriteSpecial.escapeStr("" + v, context)
|
||||
}
|
||||
return v
|
||||
.replace(/,/g, "&COMMA")
|
||||
|
@ -835,10 +832,10 @@ export class RewriteSpecial extends DesugaringStep<TagRenderingConfigJson> {
|
|||
private static convertIfNeeded(
|
||||
input:
|
||||
| (object & {
|
||||
special: {
|
||||
type: string
|
||||
}
|
||||
})
|
||||
special: {
|
||||
type: string
|
||||
}
|
||||
})
|
||||
| any,
|
||||
context: ConversionContext
|
||||
): any {
|
||||
|
@ -924,7 +921,6 @@ export class RewriteSpecial extends DesugaringStep<TagRenderingConfigJson> {
|
|||
const after = Translations.T(input.after)
|
||||
const clss: string = input.class !== undefined ? ":" + input.class : ""
|
||||
|
||||
|
||||
for (const ln of Object.keys(before?.translations ?? {})) {
|
||||
foundLanguages.add(ln)
|
||||
}
|
||||
|
@ -937,7 +933,7 @@ export class RewriteSpecial extends DesugaringStep<TagRenderingConfigJson> {
|
|||
.map((nm) => RewriteSpecial.escapeStr(special[nm] ?? "", context))
|
||||
.join(",")
|
||||
return {
|
||||
"*": `{${type}(${args})${clss}}`
|
||||
"*": `{${type}(${args})${clss}}`,
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -962,7 +958,9 @@ export class RewriteSpecial extends DesugaringStep<TagRenderingConfigJson> {
|
|||
}
|
||||
const beforeText = before?.textFor(ln) ?? ""
|
||||
const afterText = after?.textFor(ln) ?? ""
|
||||
result[ln] = `${beforeText}{${type}(${args.map((a) => a).join(",")})${clss}}${afterText}`
|
||||
result[ln] = `${beforeText}{${type}(${args
|
||||
.map((a) => a)
|
||||
.join(",")})${clss}}${afterText}`
|
||||
}
|
||||
return result
|
||||
}
|
||||
|
@ -1049,7 +1047,7 @@ class ExpandIconBadges extends DesugaringStep<PointRenderingConfigJson> {
|
|||
iconBadges.push(
|
||||
...expanded.map((resolved) => ({
|
||||
if: iconBadge.if,
|
||||
then: <MinimalTagRenderingConfigJson>resolved
|
||||
then: <MinimalTagRenderingConfigJson>resolved,
|
||||
}))
|
||||
)
|
||||
}
|
||||
|
@ -1186,7 +1184,7 @@ export class AddRatingBadge extends DesugaringStep<LayerConfigJson> {
|
|||
|
||||
const specialVis: Exclude<RenderingSpecification, string>[] = <
|
||||
Exclude<RenderingSpecification, string>[]
|
||||
>ValidationUtils.getAllSpecialVisualisations(<any>json.tagRenderings).filter(
|
||||
>ValidationUtils.getAllSpecialVisualisations(<any>json.tagRenderings).filter(
|
||||
(rs) => typeof rs !== "string"
|
||||
)
|
||||
const funcs = new Set<string>(specialVis.map((rs) => rs.func.funcName))
|
||||
|
@ -1222,7 +1220,7 @@ export class AutoTitleIcon extends DesugaringStep<LayerConfigJson> {
|
|||
}
|
||||
return <TagRenderingConfigJson>{
|
||||
id: "title_icon_auto_" + tr.id,
|
||||
mappings
|
||||
mappings,
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1267,8 +1265,8 @@ export class AutoTitleIcon extends DesugaringStep<LayerConfigJson> {
|
|||
.enters("titleIcons", i)
|
||||
.warn(
|
||||
"TagRendering with id " +
|
||||
trId +
|
||||
" does not have any icons, not generating an icon for this"
|
||||
trId +
|
||||
" does not have any icons, not generating an icon for this"
|
||||
)
|
||||
continue
|
||||
}
|
||||
|
@ -1292,7 +1290,7 @@ export class PrepareLayer extends Fuse<LayerConfigJson> {
|
|||
(layer) =>
|
||||
new Concat(
|
||||
new ExpandTagRendering(state, layer, {
|
||||
addToContext: options?.addTagRenderingsToContext ?? false
|
||||
addToContext: options?.addTagRenderingsToContext ?? false,
|
||||
})
|
||||
)
|
||||
),
|
||||
|
|
|
@ -278,8 +278,7 @@ export default class LayerConfig extends WithContextLoader {
|
|||
)
|
||||
}
|
||||
this.units = (json.units ?? []).flatMap((unitJson, i) =>
|
||||
Unit.fromJson(unitJson, this.tagRenderings, `${context}.unit[${i}]`)
|
||||
|
||||
Unit.fromJson(unitJson, this.tagRenderings, `${context}.unit[${i}]`)
|
||||
)
|
||||
|
||||
if (
|
||||
|
|
|
@ -205,7 +205,7 @@ export default class PointRenderingConfig extends WithContextLoader {
|
|||
marker: this.marker,
|
||||
rotation: this.rotation,
|
||||
tags,
|
||||
emojiHeight: iconH
|
||||
emojiHeight: iconH,
|
||||
}).SetClass("w-full h-full")
|
||||
: undefined
|
||||
let badges = undefined
|
||||
|
|
|
@ -8,7 +8,7 @@ import { Tag } from "../../Logic/Tags/Tag"
|
|||
import Link from "../../UI/Base/Link"
|
||||
import {
|
||||
MappingConfigJson,
|
||||
QuestionableTagRenderingConfigJson
|
||||
QuestionableTagRenderingConfigJson,
|
||||
} from "./Json/QuestionableTagRenderingConfigJson"
|
||||
import Validators, { ValidatorType } from "../../UI/InputElement/Validators"
|
||||
import { TagRenderingConfigJson } from "./Json/TagRenderingConfigJson"
|
||||
|
@ -202,7 +202,7 @@ export default class TagRenderingConfig {
|
|||
) ?? [],
|
||||
inline: json.freeform.inline ?? false,
|
||||
default: json.freeform.default,
|
||||
postfixDistinguished: json.freeform.postfixDistinguished?.trim()
|
||||
postfixDistinguished: json.freeform.postfixDistinguished?.trim(),
|
||||
}
|
||||
if (json.freeform["extraTags"] !== undefined) {
|
||||
throw `Freeform.extraTags is defined. This should probably be 'freeform.addExtraTag' (at ${context})`
|
||||
|
@ -414,7 +414,7 @@ export default class TagRenderingConfig {
|
|||
iconClass,
|
||||
addExtraTags,
|
||||
searchTerms: mapping.searchTerms,
|
||||
priorityIf: prioritySearch
|
||||
priorityIf: prioritySearch,
|
||||
}
|
||||
if (isQuestionable) {
|
||||
if (hideInAnswer !== true && mp.if !== undefined && !mp.if.isUsableAsAnswer()) {
|
||||
|
@ -515,7 +515,7 @@ export default class TagRenderingConfig {
|
|||
then: new TypedTranslation<object>(
|
||||
this.render.replace("{" + this.freeform.key + "}", leftover).translations,
|
||||
this.render.context
|
||||
)
|
||||
),
|
||||
})
|
||||
}
|
||||
}
|
||||
|
@ -565,7 +565,7 @@ export default class TagRenderingConfig {
|
|||
return {
|
||||
then: this.render.PartialSubs({ [this.freeform.key]: v.trim() }),
|
||||
icon: this.renderIcon,
|
||||
iconClass: this.renderIconClass
|
||||
iconClass: this.renderIconClass,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -620,7 +620,7 @@ export default class TagRenderingConfig {
|
|||
key: commonKey,
|
||||
values: Utils.NoNull(
|
||||
values.map((arr) => arr.filter((item) => item.k === commonKey)[0]?.v)
|
||||
)
|
||||
),
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -635,7 +635,7 @@ export default class TagRenderingConfig {
|
|||
return {
|
||||
key,
|
||||
type: this.freeform.type,
|
||||
values
|
||||
values,
|
||||
}
|
||||
} catch (e) {
|
||||
console.error("Could not create FreeformValues for tagrendering", this.id)
|
||||
|
@ -741,7 +741,7 @@ export default class TagRenderingConfig {
|
|||
// Either no mappings, or this is a radio-button selected freeform value
|
||||
const tag = new And([
|
||||
new Tag(this.freeform.key, freeformValue),
|
||||
...(this.freeform.addExtraTags ?? [])
|
||||
...(this.freeform.addExtraTags ?? []),
|
||||
])
|
||||
const newProperties = tag.applyOn(currentProperties)
|
||||
if (this.invalidValues?.matchesProperties(newProperties)) {
|
||||
|
@ -765,7 +765,7 @@ export default class TagRenderingConfig {
|
|||
selectedMappings.push(
|
||||
new And([
|
||||
new Tag(this.freeform.key, freeformValue),
|
||||
...(this.freeform.addExtraTags ?? [])
|
||||
...(this.freeform.addExtraTags ?? []),
|
||||
])
|
||||
)
|
||||
}
|
||||
|
@ -793,12 +793,12 @@ export default class TagRenderingConfig {
|
|||
if (useFreeform) {
|
||||
return new And([
|
||||
new Tag(this.freeform.key, freeformValue),
|
||||
...(this.freeform.addExtraTags ?? [])
|
||||
...(this.freeform.addExtraTags ?? []),
|
||||
])
|
||||
} else if (singleSelectedMapping !== undefined) {
|
||||
return new And([
|
||||
this.mappings[singleSelectedMapping].if,
|
||||
...(this.mappings[singleSelectedMapping].addExtraTags ?? [])
|
||||
...(this.mappings[singleSelectedMapping].addExtraTags ?? []),
|
||||
])
|
||||
} else {
|
||||
console.error("TagRenderingConfig.ConstructSpecification has a weird fallback for", {
|
||||
|
@ -806,7 +806,7 @@ export default class TagRenderingConfig {
|
|||
singleSelectedMapping,
|
||||
multiSelectedMapping,
|
||||
currentProperties,
|
||||
useFreeform
|
||||
useFreeform,
|
||||
})
|
||||
|
||||
return undefined
|
||||
|
@ -819,7 +819,7 @@ export default class TagRenderingConfig {
|
|||
withRender = [
|
||||
`This rendering asks information about the property `,
|
||||
Link.OsmWiki(this.freeform.key).AsMarkdown(),
|
||||
"This is rendered with `" + this.render.txt + "`"
|
||||
"This is rendered with `" + this.render.txt + "`",
|
||||
]
|
||||
}
|
||||
|
||||
|
@ -829,14 +829,18 @@ export default class TagRenderingConfig {
|
|||
this.mappings.flatMap((m) => {
|
||||
let icon = ""
|
||||
if (m.icon?.indexOf(";") < 0) {
|
||||
icon = "<img src='https://raw.githubusercontent.com/pietervdvn/MapComplete/develop/" + m.icon + "' style='width: 3rem; height: 3rem'>"
|
||||
icon =
|
||||
"<img src='https://raw.githubusercontent.com/pietervdvn/MapComplete/develop/" +
|
||||
m.icon +
|
||||
"' style='width: 3rem; height: 3rem'>"
|
||||
}
|
||||
const msgs: string[] = [
|
||||
icon + " " +
|
||||
"*" +
|
||||
m.then.txt +
|
||||
"* corresponds with " +
|
||||
m.if.asHumanString(true, false, {})
|
||||
icon +
|
||||
" " +
|
||||
"*" +
|
||||
m.then.txt +
|
||||
"* corresponds with " +
|
||||
m.if.asHumanString(true, false, {}),
|
||||
]
|
||||
|
||||
if (m.hideInAnswer === true) {
|
||||
|
@ -845,7 +849,7 @@ export default class TagRenderingConfig {
|
|||
if (m.ifnot !== undefined) {
|
||||
msgs.push(
|
||||
"Unselecting this answer will add " +
|
||||
m.ifnot.asHumanString(true, false, {})
|
||||
m.ifnot.asHumanString(true, false, {})
|
||||
)
|
||||
}
|
||||
return msgs
|
||||
|
@ -869,7 +873,7 @@ export default class TagRenderingConfig {
|
|||
if (this.labels?.length > 0) {
|
||||
labels = [
|
||||
"This tagrendering has labels ",
|
||||
...this.labels.map((label) => "`" + label + "`")
|
||||
...this.labels.map((label) => "`" + label + "`"),
|
||||
].join("\n")
|
||||
}
|
||||
|
||||
|
@ -882,7 +886,7 @@ export default class TagRenderingConfig {
|
|||
withRender.join("\n"),
|
||||
mappings,
|
||||
condition,
|
||||
labels
|
||||
labels,
|
||||
].join("\n")
|
||||
}
|
||||
|
||||
|
@ -942,7 +946,7 @@ export class TagRenderingConfigUtils {
|
|||
const oldMappingsCloned =
|
||||
clone.mappings?.map((m) => ({
|
||||
...m,
|
||||
priorityIf: m.priorityIf ?? TagUtils.Tag("id~*")
|
||||
priorityIf: m.priorityIf ?? TagUtils.Tag("id~*"),
|
||||
})) ?? []
|
||||
clone.mappings = [...oldMappingsCloned, ...extraMappings]
|
||||
return clone
|
||||
|
|
|
@ -5,7 +5,7 @@ import { Store, UIEventSource } from "../Logic/UIEventSource"
|
|||
import {
|
||||
FeatureSource,
|
||||
IndexedFeatureSource,
|
||||
WritableFeatureSource
|
||||
WritableFeatureSource,
|
||||
} from "../Logic/FeatureSource/FeatureSource"
|
||||
import { OsmConnection } from "../Logic/Osm/OsmConnection"
|
||||
import { ExportableMap, MapProperties } from "./MapProperties"
|
||||
|
@ -51,7 +51,7 @@ import SaveFeatureSourceToLocalStorage from "../Logic/FeatureSource/Actors/SaveF
|
|||
import BBoxFeatureSource from "../Logic/FeatureSource/Sources/TouchesBboxFeatureSource"
|
||||
import ThemeViewStateHashActor from "../Logic/Web/ThemeViewStateHashActor"
|
||||
import NoElementsInViewDetector, {
|
||||
FeatureViewState
|
||||
FeatureViewState,
|
||||
} from "../Logic/Actors/NoElementsInViewDetector"
|
||||
import FilteredLayer from "./FilteredLayer"
|
||||
import { PreferredRasterLayerSelector } from "../Logic/Actors/PreferredRasterLayerSelector"
|
||||
|
@ -64,7 +64,7 @@ import { GeolocationControlState } from "../UI/BigComponents/GeolocationControl"
|
|||
import Zoomcontrol from "../UI/Zoomcontrol"
|
||||
import {
|
||||
SummaryTileSource,
|
||||
SummaryTileSourceRewriter
|
||||
SummaryTileSourceRewriter,
|
||||
} from "../Logic/FeatureSource/TiledFeatureSource/SummaryTileSource"
|
||||
import summaryLayer from "../assets/generated/layers/summary.json"
|
||||
import last_click_layerconfig from "../assets/generated/layers/last_click.json"
|
||||
|
@ -165,7 +165,6 @@ export default class ThemeViewState implements SpecialVisualizationState {
|
|||
const initial = new InitialMapPositioning(layout, geolocationState)
|
||||
this.mapProperties = new MapLibreAdaptor(this.map, initial)
|
||||
|
||||
|
||||
this.featureSwitchIsTesting = this.featureSwitches.featureSwitchIsTesting
|
||||
this.featureSwitchUserbadge = this.featureSwitches.featureSwitchEnableLogin
|
||||
|
||||
|
@ -176,7 +175,7 @@ export default class ThemeViewState implements SpecialVisualizationState {
|
|||
"oauth_token",
|
||||
undefined,
|
||||
"Used to complete the login"
|
||||
)
|
||||
),
|
||||
})
|
||||
this.userRelatedState = new UserRelatedState(
|
||||
this.osmConnection,
|
||||
|
@ -251,8 +250,8 @@ export default class ThemeViewState implements SpecialVisualizationState {
|
|||
bbox.asGeoJson({
|
||||
zoom: this.mapProperties.zoom.data,
|
||||
...this.mapProperties.location.data,
|
||||
id: "current_view_" + currentViewIndex
|
||||
})
|
||||
id: "current_view_" + currentViewIndex,
|
||||
}),
|
||||
]
|
||||
})
|
||||
)
|
||||
|
@ -269,7 +268,7 @@ export default class ThemeViewState implements SpecialVisualizationState {
|
|||
featurePropertiesStore: this.featureProperties,
|
||||
osmConnection: this.osmConnection,
|
||||
historicalUserLocations: this.geolocation.historicalUserLocations,
|
||||
featureSwitches: this.featureSwitches
|
||||
featureSwitches: this.featureSwitches,
|
||||
},
|
||||
layout?.isLeftRightSensitive() ?? false
|
||||
)
|
||||
|
@ -296,7 +295,7 @@ export default class ThemeViewState implements SpecialVisualizationState {
|
|||
"leftover features, such as",
|
||||
features[0].properties
|
||||
)
|
||||
}
|
||||
},
|
||||
}
|
||||
)
|
||||
this.perLayer = perLayer.perLayer
|
||||
|
@ -334,7 +333,10 @@ export default class ThemeViewState implements SpecialVisualizationState {
|
|||
return sorted
|
||||
})
|
||||
|
||||
this.lastClickObject = new LastClickFeatureSource(this.layout, this.mapProperties.lastClickLocation)
|
||||
this.lastClickObject = new LastClickFeatureSource(
|
||||
this.layout,
|
||||
this.mapProperties.lastClickLocation
|
||||
)
|
||||
|
||||
this.osmObjectDownloader = new OsmObjectDownloader(
|
||||
this.osmConnection.Backend(),
|
||||
|
@ -348,7 +350,7 @@ export default class ThemeViewState implements SpecialVisualizationState {
|
|||
{
|
||||
currentZoom: this.mapProperties.zoom,
|
||||
layerState: this.layerState,
|
||||
bounds: this.visualFeedbackViewportBounds
|
||||
bounds: this.visualFeedbackViewportBounds,
|
||||
}
|
||||
)
|
||||
this.hasDataInView = new NoElementsInViewDetector(this).hasFeatureInView
|
||||
|
@ -440,7 +442,7 @@ export default class ThemeViewState implements SpecialVisualizationState {
|
|||
doShowLayer,
|
||||
metaTags: this.userRelatedState.preferencesAsTags,
|
||||
selectedElement: this.selectedElement,
|
||||
fetchStore: (id) => this.featureProperties.getStore(id)
|
||||
fetchStore: (id) => this.featureProperties.getStore(id),
|
||||
})
|
||||
})
|
||||
return filteringFeatureSource
|
||||
|
@ -464,7 +466,7 @@ export default class ThemeViewState implements SpecialVisualizationState {
|
|||
doShowLayer: flayerGps.isDisplayed,
|
||||
layer: flayerGps.layerDef,
|
||||
metaTags: this.userRelatedState.preferencesAsTags,
|
||||
selectedElement: this.selectedElement
|
||||
selectedElement: this.selectedElement,
|
||||
})
|
||||
}
|
||||
|
||||
|
@ -556,7 +558,7 @@ export default class ThemeViewState implements SpecialVisualizationState {
|
|||
Hotkeys.RegisterHotkey(
|
||||
{
|
||||
nomod: " ",
|
||||
onUp: true
|
||||
onUp: true,
|
||||
},
|
||||
docs.selectItem,
|
||||
() => {
|
||||
|
@ -586,7 +588,7 @@ export default class ThemeViewState implements SpecialVisualizationState {
|
|||
Hotkeys.RegisterHotkey(
|
||||
{
|
||||
nomod: "" + i,
|
||||
onUp: true
|
||||
onUp: true,
|
||||
},
|
||||
doc,
|
||||
() => this.selectClosestAtCenter(i - 1)
|
||||
|
@ -599,7 +601,7 @@ export default class ThemeViewState implements SpecialVisualizationState {
|
|||
}
|
||||
Hotkeys.RegisterHotkey(
|
||||
{
|
||||
nomod: "b"
|
||||
nomod: "b",
|
||||
},
|
||||
docs.openLayersPanel,
|
||||
() => {
|
||||
|
@ -610,7 +612,7 @@ export default class ThemeViewState implements SpecialVisualizationState {
|
|||
)
|
||||
Hotkeys.RegisterHotkey(
|
||||
{
|
||||
nomod: "s"
|
||||
nomod: "s",
|
||||
},
|
||||
Translations.t.hotkeyDocumentation.openFilterPanel,
|
||||
() => {
|
||||
|
@ -668,7 +670,7 @@ export default class ThemeViewState implements SpecialVisualizationState {
|
|||
|
||||
Hotkeys.RegisterHotkey(
|
||||
{
|
||||
shift: "T"
|
||||
shift: "T",
|
||||
},
|
||||
Translations.t.hotkeyDocumentation.translationMode,
|
||||
() => {
|
||||
|
@ -700,7 +702,7 @@ export default class ThemeViewState implements SpecialVisualizationState {
|
|||
this.mapProperties.zoom.map((z) => Math.max(Math.floor(z), 0)),
|
||||
this.mapProperties,
|
||||
{
|
||||
isActive: this.mapProperties.zoom.map((z) => z <= maxzoom)
|
||||
isActive: this.mapProperties.zoom.map((z) => z <= maxzoom),
|
||||
}
|
||||
)
|
||||
return new SummaryTileSourceRewriter(summaryTileSource, this.layerState.filteredLayers)
|
||||
|
@ -715,10 +717,7 @@ export default class ThemeViewState implements SpecialVisualizationState {
|
|||
/**
|
||||
* A listing which maps the layerId onto the featureSource
|
||||
*/
|
||||
const specialLayers: Record<
|
||||
AddedByDefaultTypes | "current_view",
|
||||
FeatureSource
|
||||
> = {
|
||||
const specialLayers: Record<AddedByDefaultTypes | "current_view", FeatureSource> = {
|
||||
home_location: this.userRelatedState.homeLocation,
|
||||
gps_location: this.geolocation.currentUserLocation,
|
||||
gps_location_history: this.geolocation.historicalUserLocations,
|
||||
|
@ -734,7 +733,7 @@ export default class ThemeViewState implements SpecialVisualizationState {
|
|||
current_view: this.currentView,
|
||||
favourite: this.favourites,
|
||||
summary: this.featureSummary,
|
||||
last_click: this.lastClickObject
|
||||
last_click: this.lastClickObject,
|
||||
}
|
||||
|
||||
this.closestFeatures.registerSource(specialLayers.favourite, "favourite")
|
||||
|
@ -789,7 +788,7 @@ export default class ThemeViewState implements SpecialVisualizationState {
|
|||
doShowLayer: flayer.isDisplayed,
|
||||
layer: flayer.layerDef,
|
||||
metaTags: this.userRelatedState.preferencesAsTags,
|
||||
selectedElement: this.selectedElement
|
||||
selectedElement: this.selectedElement,
|
||||
})
|
||||
})
|
||||
|
||||
|
@ -797,23 +796,29 @@ export default class ThemeViewState implements SpecialVisualizationState {
|
|||
features: specialLayers.summary,
|
||||
layer: new LayerConfig(<LayerConfigJson>summaryLayer, "summaryLayer"),
|
||||
// doShowLayer: this.mapProperties.zoom.map((z) => z < maxzoom),
|
||||
selectedElement: this.selectedElement
|
||||
selectedElement: this.selectedElement,
|
||||
})
|
||||
|
||||
const lastClickLayerConfig = new LayerConfig(<LayerConfigJson>last_click_layerconfig, "last_click")
|
||||
const lastClickLayerConfig = new LayerConfig(
|
||||
<LayerConfigJson>last_click_layerconfig,
|
||||
"last_click"
|
||||
)
|
||||
const lastClickFiltered =
|
||||
lastClickLayerConfig.isShown === undefined ? specialLayers.last_click :
|
||||
specialLayers.last_click.features.mapD(fs =>
|
||||
fs.filter(
|
||||
f => {
|
||||
const matches = lastClickLayerConfig.isShown.matchesProperties(f.properties)
|
||||
console.log("LastClick ",f,"matches",matches)
|
||||
return matches
|
||||
}))
|
||||
lastClickLayerConfig.isShown === undefined
|
||||
? specialLayers.last_click
|
||||
: specialLayers.last_click.features.mapD((fs) =>
|
||||
fs.filter((f) => {
|
||||
const matches = lastClickLayerConfig.isShown.matchesProperties(
|
||||
f.properties
|
||||
)
|
||||
console.log("LastClick ", f, "matches", matches)
|
||||
return matches
|
||||
})
|
||||
)
|
||||
new ShowDataLayer(this.map, {
|
||||
features: new StaticFeatureSource(lastClickFiltered),
|
||||
layer: lastClickLayerConfig,
|
||||
onClick: feature => {
|
||||
onClick: (feature) => {
|
||||
console.log("Last click was clicked", feature)
|
||||
if (this.mapProperties.zoom.data >= Constants.minZoomLevelToAddNewPoint) {
|
||||
this.selectedElement.setData(feature)
|
||||
|
@ -821,9 +826,9 @@ export default class ThemeViewState implements SpecialVisualizationState {
|
|||
}
|
||||
this.map.data.flyTo({
|
||||
zoom: Constants.minZoomLevelToAddNewPoint,
|
||||
center: GeoOperations.centerpointCoordinates(feature)
|
||||
center: GeoOperations.centerpointCoordinates(feature),
|
||||
})
|
||||
}
|
||||
},
|
||||
})
|
||||
}
|
||||
|
||||
|
|
|
@ -27,9 +27,19 @@ export class Unit {
|
|||
) {
|
||||
this.quantity = quantity
|
||||
this._validator = validator
|
||||
if(!inverted && ["string","text","key","icon","translation","fediverse","id"].indexOf(validator.name) >= 0){
|
||||
if (
|
||||
!inverted &&
|
||||
["string", "text", "key", "icon", "translation", "fediverse", "id"].indexOf(
|
||||
validator.name
|
||||
) >= 0
|
||||
) {
|
||||
console.trace("Unit error")
|
||||
throw "Invalid unit configuration. The validator is of a forbidden type: "+validator.name+"; set a (number) type to your freeform key or set inverted. Hint: this unit is applied onto keys: "+appliesToKeys.join("; ")
|
||||
throw (
|
||||
"Invalid unit configuration. The validator is of a forbidden type: " +
|
||||
validator.name +
|
||||
"; set a (number) type to your freeform key or set inverted. Hint: this unit is applied onto keys: " +
|
||||
appliesToKeys.join("; ")
|
||||
)
|
||||
}
|
||||
this.inverted = inverted
|
||||
this.appliesToKeys = new Set(appliesToKeys)
|
||||
|
|
|
@ -84,18 +84,18 @@
|
|||
<Logo alt="MapComplete Logo" class="h-12 w-12 sm:h-24 sm:w-24" />
|
||||
</div>
|
||||
|
||||
<div class="flex flex-col link-underline">
|
||||
<div class="link-underline flex flex-col">
|
||||
<h1 class="m-0 font-extrabold tracking-tight md:text-6xl">
|
||||
<Tr t={t.title} />
|
||||
</h1>
|
||||
<Tr
|
||||
cls="mr-4 text-base font-semibold sm:text-lg md:mt-5 md:text-xl lg:mx-0"
|
||||
t={Translations.t.index.intro}
|
||||
/>
|
||||
<a href="#about">
|
||||
<Tr t={Translations.t.index.learnMore} />
|
||||
<ChevronDoubleRight class="inline h-4 w-4" />
|
||||
</a>
|
||||
<Tr
|
||||
cls="mr-4 text-base font-semibold sm:text-lg md:mt-5 md:text-xl lg:mx-0"
|
||||
t={Translations.t.index.intro}
|
||||
/>
|
||||
<a href="#about">
|
||||
<Tr t={Translations.t.index.learnMore} />
|
||||
<ChevronDoubleRight class="inline h-4 w-4" />
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
@ -146,48 +146,47 @@
|
|||
<UnofficialThemeList search={themeSearchText} {state} />
|
||||
</LoginToggle>
|
||||
|
||||
<h3 id="about">
|
||||
<Tr t={Translations.t.index.about} />
|
||||
</h3>
|
||||
<Tr cls="link-underline" t={Translations.t.general.aboutMapComplete.intro} />
|
||||
<h3 id="about">
|
||||
<Tr t={Translations.t.index.about} />
|
||||
</h3>
|
||||
<Tr cls="link-underline" t={Translations.t.general.aboutMapComplete.intro} />
|
||||
|
||||
<span class="link-underline flex flex-col gap-y-1">
|
||||
<a class="flex" href="https://github.com/pietervdvn/MapComplete/" target="_blank">
|
||||
<Github class="mr-2 h-6 w-6" />
|
||||
<Tr t={Translations.t.general.attribution.gotoSourceCode} />
|
||||
</a>
|
||||
<a class="flex" href="https://github.com/pietervdvn/MapComplete/issues" target="_blank">
|
||||
<Bug class="mr-2 h-6 w-6" />
|
||||
<Tr t={Translations.t.general.attribution.openIssueTracker} />
|
||||
</a>
|
||||
<span class="link-underline flex flex-col gap-y-1">
|
||||
<a class="flex" href="https://github.com/pietervdvn/MapComplete/" target="_blank">
|
||||
<Github class="mr-2 h-6 w-6" />
|
||||
<Tr t={Translations.t.general.attribution.gotoSourceCode} />
|
||||
</a>
|
||||
<a class="flex" href="https://github.com/pietervdvn/MapComplete/issues" target="_blank">
|
||||
<Bug class="mr-2 h-6 w-6" />
|
||||
<Tr t={Translations.t.general.attribution.openIssueTracker} />
|
||||
</a>
|
||||
|
||||
<a class="flex" href="https://en.osm.town/@MapComplete" target="_blank">
|
||||
<Mastodon class="mr-2 h-6 w-6" />
|
||||
<Tr t={Translations.t.general.attribution.followOnMastodon} />
|
||||
</a>
|
||||
<a class="flex" href="https://en.osm.town/@MapComplete" target="_blank">
|
||||
<Mastodon class="mr-2 h-6 w-6" />
|
||||
<Tr t={Translations.t.general.attribution.followOnMastodon} />
|
||||
</a>
|
||||
|
||||
<a class="flex" href="https://liberapay.com/pietervdvn/" target="_blank">
|
||||
<Liberapay class="mr-2 h-6 w-6" />
|
||||
<Tr t={Translations.t.general.attribution.donate} />
|
||||
</a>
|
||||
<a class="flex" href="https://liberapay.com/pietervdvn/" target="_blank">
|
||||
<Liberapay class="mr-2 h-6 w-6" />
|
||||
<Tr t={Translations.t.general.attribution.donate} />
|
||||
</a>
|
||||
|
||||
<a
|
||||
class="flex"
|
||||
href={window.location.protocol + "//" + window.location.host + "/studio.html"}
|
||||
>
|
||||
<Pencil class="mr-2 h-6 w-6" />
|
||||
<Tr t={Translations.t.general.morescreen.createYourOwnTheme} />
|
||||
</a>
|
||||
|
||||
<a
|
||||
class="flex"
|
||||
href={window.location.protocol + "//" + window.location.host + "/privacy.html"}
|
||||
>
|
||||
<Eye class="mr-2 h-6 w-6" />
|
||||
<Tr t={Translations.t.privacy.title} />
|
||||
</a>
|
||||
</span>
|
||||
<a
|
||||
class="flex"
|
||||
href={window.location.protocol + "//" + window.location.host + "/studio.html"}
|
||||
>
|
||||
<Pencil class="mr-2 h-6 w-6" />
|
||||
<Tr t={Translations.t.general.morescreen.createYourOwnTheme} />
|
||||
</a>
|
||||
|
||||
<a
|
||||
class="flex"
|
||||
href={window.location.protocol + "//" + window.location.host + "/privacy.html"}
|
||||
>
|
||||
<Eye class="mr-2 h-6 w-6" />
|
||||
<Tr t={Translations.t.privacy.title} />
|
||||
</a>
|
||||
</span>
|
||||
|
||||
<Tr t={tr.streetcomplete} />
|
||||
|
||||
|
|
|
@ -20,10 +20,18 @@
|
|||
style="background-color: #00000088; z-index: 20"
|
||||
/>
|
||||
<!-- draw a _second_ absolute div, placed using 'bottom' which will be above the navigation bar on mobile browsers -->
|
||||
<div class="absolute bottom-0 right-0 h-full w-screen p-4 md:p-6 pointer-events-none" style="z-index: 21" on:click={() =>{
|
||||
console.log("Closing...")
|
||||
dispatch("close")}}>
|
||||
<div class="content normal-background h-full pointer-events-auto" on:click|stopPropagation={() => {}}>
|
||||
<div
|
||||
class="pointer-events-none absolute bottom-0 right-0 h-full w-screen p-4 md:p-6"
|
||||
style="z-index: 21"
|
||||
on:click={() => {
|
||||
console.log("Closing...")
|
||||
dispatch("close")
|
||||
}}
|
||||
>
|
||||
<div
|
||||
class="content normal-background pointer-events-auto h-full"
|
||||
on:click|stopPropagation={() => {}}
|
||||
>
|
||||
<div class="h-full rounded-xl">
|
||||
<slot />
|
||||
</div>
|
||||
|
|
|
@ -38,8 +38,6 @@
|
|||
function getStateFor(option: FilterConfig): UIEventSource<number | string> {
|
||||
return filteredLayer.appliedFilters.get(option.id)
|
||||
}
|
||||
|
||||
|
||||
</script>
|
||||
|
||||
{#if filteredLayer.layerDef.name}
|
||||
|
|
|
@ -27,9 +27,8 @@ export default class MoreScreen {
|
|||
if (searchTerm === "osmcha" || searchTerm === "stats") {
|
||||
window.location.href = Utils.OsmChaLinkFor(7)
|
||||
}
|
||||
if (searchTerm === "studio" ) {
|
||||
if (searchTerm === "studio") {
|
||||
window.location.href = "./studio.html"
|
||||
|
||||
}
|
||||
// Enter pressed -> search the first _official_ matchin theme and open it
|
||||
const publicTheme = MoreScreen.officialThemes.find(
|
||||
|
|
|
@ -21,9 +21,9 @@
|
|||
selectedElement.properties.id
|
||||
)
|
||||
|
||||
function getLayer(properties: Record<string, string>){
|
||||
if(properties.id === "settings"){
|
||||
return UserRelatedState.usersettingsConfig
|
||||
function getLayer(properties: Record<string, string>) {
|
||||
if (properties.id === "settings") {
|
||||
return UserRelatedState.usersettingsConfig
|
||||
}
|
||||
if (properties.id === "new_point_dialog") {
|
||||
return state.layout.layers.find((l) => l.id === "last_click")
|
||||
|
@ -36,7 +36,6 @@
|
|||
|
||||
let layer: LayerConfig = getLayer(selectedElement.properties)
|
||||
|
||||
|
||||
let stillMatches = tags.map(
|
||||
(tags) => !layer?.source?.osmTags || layer.source.osmTags?.matchesProperties(tags)
|
||||
)
|
||||
|
|
|
@ -86,12 +86,12 @@
|
|||
</script>
|
||||
|
||||
{#if theme.id !== personal.id || $unlockedPersonal}
|
||||
<a class={"flex w-full items-center text-ellipsis rounded my-2"} href={$href}>
|
||||
<Marker icons={theme.icon} size="m-1 block h-11 w-11 sm:mr-2 shrink-0"/>
|
||||
<a class={"my-2 flex w-full items-center text-ellipsis rounded"} href={$href}>
|
||||
<Marker icons={theme.icon} size="m-1 block h-11 w-11 sm:mr-2 shrink-0" />
|
||||
|
||||
<span class="flex flex-col overflow-hidden text-ellipsis font-bold text-xl">
|
||||
<span class="flex flex-col overflow-hidden text-ellipsis text-xl font-bold">
|
||||
<Tr cls="underline" t={title} />
|
||||
<Tr cls="subtle text-base" t={description}/>
|
||||
<Tr cls="subtle text-base" t={description} />
|
||||
|
||||
{#if selected}
|
||||
<span class="thanks hidden-on-mobile" aria-hidden="true">
|
||||
|
|
|
@ -150,13 +150,12 @@
|
|||
</div>
|
||||
|
||||
<If condition={state.featureSwitches.featureSwitchBackToThemeOverview}>
|
||||
|
||||
<div class="link-underline w-full m-2 mx-4 flex">
|
||||
<!-- bottom buttons, a bit hidden away: switch layout -->
|
||||
<a class="flex justify-end items-center w-fit" href={Utils.HomepageLink()}>
|
||||
<ChevronDoubleLeft class="w-4 h-4" />
|
||||
<Tr t={Translations.t.general.backToIndex} />
|
||||
</a>
|
||||
</div>
|
||||
<div class="link-underline m-2 mx-4 flex w-full">
|
||||
<!-- bottom buttons, a bit hidden away: switch layout -->
|
||||
<a class="flex w-fit items-center justify-end" href={Utils.HomepageLink()}>
|
||||
<ChevronDoubleLeft class="h-4 w-4" />
|
||||
<Tr t={Translations.t.general.backToIndex} />
|
||||
</a>
|
||||
</div>
|
||||
</If>
|
||||
</div>
|
||||
|
|
|
@ -67,7 +67,7 @@
|
|||
|
||||
<div>
|
||||
<div class:interactive={!readonly} class="flex flex-col items-end py-1 px-2">
|
||||
<div class="flex flex-col w-full">
|
||||
<div class="flex w-full flex-col">
|
||||
{#if renderingExternal}
|
||||
<TagRenderingAnswer
|
||||
tags={new UIEventSource(mockPropertiesExternal)}
|
||||
|
|
|
@ -11,7 +11,6 @@ export class ComparisonState {
|
|||
public readonly knownImages: Store<Set<string>>
|
||||
|
||||
constructor(tags: UIEventSource<OsmTags>, externalProperties: Record<string, string>) {
|
||||
|
||||
externalProperties = { ...externalProperties }
|
||||
delete externalProperties["@context"]
|
||||
|
||||
|
@ -74,7 +73,7 @@ export class ComparisonState {
|
|||
)
|
||||
|
||||
this.hasDifferencesAtStart =
|
||||
this. different.data.length + this.missing.data.length + this.unknownImages.data.length > 0
|
||||
|
||||
this.different.data.length + this.missing.data.length + this.unknownImages.data.length >
|
||||
0
|
||||
}
|
||||
}
|
||||
|
|
|
@ -27,11 +27,11 @@
|
|||
|
||||
export let readonly = false
|
||||
|
||||
export let comparisonState : ComparisonState
|
||||
export let comparisonState: ComparisonState
|
||||
let missing = comparisonState.missing
|
||||
let unknownImages = comparisonState.unknownImages
|
||||
let knownImages = comparisonState.knownImages
|
||||
let different =comparisonState.different
|
||||
let different = comparisonState.different
|
||||
|
||||
const t = Translations.t.external
|
||||
|
||||
|
@ -50,27 +50,50 @@
|
|||
}
|
||||
</script>
|
||||
|
||||
|
||||
{#if $unknownImages.length === 0 && $missing.length === 0 && $different.length === 0}
|
||||
<div class="thanks m-0 flex items-center gap-x-2 px-2">
|
||||
<Party class="h-8 w-8 shrink-0" />
|
||||
<Tr t={t.allIncluded.Subs({ source: sourceUrl })} />
|
||||
</div>
|
||||
{:else}
|
||||
{#if !readonly}
|
||||
<Tr t={t.loadedFrom.Subs({ url: sourceUrl, source: sourceUrl })} />
|
||||
{#if !readonly}
|
||||
<Tr t={t.loadedFrom.Subs({ url: sourceUrl, source: sourceUrl })} />
|
||||
{/if}
|
||||
|
||||
<div class="flex flex-col" class:gap-y-8={!readonly}>
|
||||
{#if $different.length > 0}
|
||||
{#if !readonly}
|
||||
<h3>
|
||||
<Tr t={t.conflicting.title} />
|
||||
</h3>
|
||||
<Tr t={t.conflicting.intro} />
|
||||
{/if}
|
||||
{#each $different as key (key)}
|
||||
<div class="mx-2 rounded-2xl">
|
||||
<ComparisonAction
|
||||
{key}
|
||||
{state}
|
||||
{tags}
|
||||
{externalProperties}
|
||||
{layer}
|
||||
{feature}
|
||||
{readonly}
|
||||
/>
|
||||
</div>
|
||||
{/each}
|
||||
{/if}
|
||||
|
||||
<div class="flex flex-col" class:gap-y-8={!readonly}>
|
||||
{#if $different.length > 0}
|
||||
{#if !readonly}
|
||||
<h3>
|
||||
<Tr t={t.conflicting.title} />
|
||||
</h3>
|
||||
<Tr t={t.conflicting.intro} />
|
||||
{/if}
|
||||
{#each $different as key (key)}
|
||||
<div class="mx-2 rounded-2xl">
|
||||
{#if $missing.length > 0}
|
||||
{#if !readonly}
|
||||
<h3 class="m-0">
|
||||
<Tr t={t.missing.title} />
|
||||
</h3>
|
||||
|
||||
<Tr t={t.missing.intro} />
|
||||
{/if}
|
||||
{#if currentStep === "init"}
|
||||
{#each $missing as key (key)}
|
||||
<div class:focus={applyAllHovered} class="mx-2 rounded-2xl">
|
||||
<ComparisonAction
|
||||
{key}
|
||||
{state}
|
||||
|
@ -82,86 +105,66 @@
|
|||
/>
|
||||
</div>
|
||||
{/each}
|
||||
{/if}
|
||||
|
||||
{#if $missing.length > 0}
|
||||
{#if !readonly}
|
||||
<h3 class="m-0">
|
||||
<Tr t={t.missing.title} />
|
||||
</h3>
|
||||
|
||||
<Tr t={t.missing.intro} />
|
||||
{#if !readonly && $missing.length > 1}
|
||||
<button
|
||||
on:click={() => applyAllMissing()}
|
||||
on:mouseover={() => (applyAllHovered = true)}
|
||||
on:focus={() => (applyAllHovered = true)}
|
||||
on:blur={() => (applyAllHovered = false)}
|
||||
on:mouseout={() => (applyAllHovered = false)}
|
||||
>
|
||||
<Tr t={t.applyAll} />
|
||||
</button>
|
||||
{/if}
|
||||
{#if currentStep === "init"}
|
||||
{#each $missing as key (key)}
|
||||
<div class:focus={applyAllHovered} class="mx-2 rounded-2xl">
|
||||
<ComparisonAction
|
||||
{key}
|
||||
{state}
|
||||
{tags}
|
||||
{externalProperties}
|
||||
{layer}
|
||||
{feature}
|
||||
{readonly}
|
||||
/>
|
||||
</div>
|
||||
{/each}
|
||||
{#if !readonly && $missing.length > 1}
|
||||
<button
|
||||
on:click={() => applyAllMissing()}
|
||||
on:mouseover={() => (applyAllHovered = true)}
|
||||
on:focus={() => (applyAllHovered = true)}
|
||||
on:blur={() => (applyAllHovered = false)}
|
||||
on:mouseout={() => (applyAllHovered = false)}
|
||||
>
|
||||
<Tr t={t.applyAll} />
|
||||
</button>
|
||||
{/if}
|
||||
{:else if currentStep === "applying_all"}
|
||||
<Loading />
|
||||
{:else if currentStep === "all_applied"}
|
||||
<div class="thanks">
|
||||
<Tr t={t.allAreApplied} />
|
||||
</div>
|
||||
{/if}
|
||||
{/if}
|
||||
</div>
|
||||
|
||||
{#if $unknownImages.length > 0}
|
||||
{#if readonly}
|
||||
<div class="w-full overflow-x-auto">
|
||||
<div class="flex h-32 w-max gap-x-2">
|
||||
{#each $unknownImages as image (image)}
|
||||
<AttributedImage
|
||||
imgClass="h-32 w-max shrink-0"
|
||||
image={{ url: image }}
|
||||
previewedImage={state.previewedImage}
|
||||
/>
|
||||
{/each}
|
||||
</div>
|
||||
{:else if currentStep === "applying_all"}
|
||||
<Loading />
|
||||
{:else if currentStep === "all_applied"}
|
||||
<div class="thanks">
|
||||
<Tr t={t.allAreApplied} />
|
||||
</div>
|
||||
{:else}
|
||||
{#each $unknownImages as image (image)}
|
||||
<LinkableImage
|
||||
{tags}
|
||||
{state}
|
||||
image={{
|
||||
pictureUrl: image,
|
||||
provider: "Velopark",
|
||||
thumbUrl: image,
|
||||
details: undefined,
|
||||
coordinates: undefined,
|
||||
osmTags: { image },
|
||||
}}
|
||||
{feature}
|
||||
{layer}
|
||||
/>
|
||||
{/each}
|
||||
{/if}
|
||||
{/if}
|
||||
{#if externalProperties["_last_edit_timestamp"] !== undefined}
|
||||
<span class="subtle text-sm flex flex-end justify-end mt-2 mr-4">
|
||||
<Tr t={t.lastModified.Subs({date: new Date(externalProperties["_last_edit_timestamp"]).toLocaleString() })}/>
|
||||
</span>
|
||||
</div>
|
||||
|
||||
{#if $unknownImages.length > 0}
|
||||
{#if readonly}
|
||||
<div class="w-full overflow-x-auto">
|
||||
<div class="flex h-32 w-max gap-x-2">
|
||||
{#each $unknownImages as image (image)}
|
||||
<AttributedImage
|
||||
imgClass="h-32 w-max shrink-0"
|
||||
image={{ url: image }}
|
||||
previewedImage={state.previewedImage}
|
||||
/>
|
||||
{/each}
|
||||
</div>
|
||||
</div>
|
||||
{:else}
|
||||
{#each $unknownImages as image (image)}
|
||||
<LinkableImage
|
||||
{tags}
|
||||
{state}
|
||||
image={{
|
||||
pictureUrl: image,
|
||||
provider: "Velopark",
|
||||
thumbUrl: image,
|
||||
details: undefined,
|
||||
coordinates: undefined,
|
||||
osmTags: { image },
|
||||
}}
|
||||
{feature}
|
||||
{layer}
|
||||
/>
|
||||
{/each}
|
||||
{/if}
|
||||
{/if}
|
||||
{#if externalProperties["_last_edit_timestamp"] !== undefined}
|
||||
<span class="subtle flex-end mt-2 mr-4 flex justify-end text-sm">
|
||||
<Tr
|
||||
t={t.lastModified.Subs({
|
||||
date: new Date(externalProperties["_last_edit_timestamp"]).toLocaleString(),
|
||||
})}
|
||||
/>
|
||||
</span>
|
||||
{/if}
|
||||
{/if}
|
||||
|
|
|
@ -32,17 +32,16 @@
|
|||
export let collapsed: boolean
|
||||
const t = Translations.t.external
|
||||
|
||||
let comparisonState: Store<ComparisonState | undefined> = externalData.mapD(external => {
|
||||
let comparisonState: Store<ComparisonState | undefined> = externalData.mapD((external) => {
|
||||
if (external["success"]) {
|
||||
return new ComparisonState(tags, external["success"])
|
||||
}
|
||||
return undefined
|
||||
})
|
||||
let unknownImages = comparisonState.bindD(ct => ct.unknownImages)
|
||||
let knownImages = comparisonState.bindD(ct => ct.knownImages)
|
||||
let propertyKeysExternal = comparisonState.mapD(ct => ct.propertyKeysExternal)
|
||||
let hasDifferencesAtStart = comparisonState.mapD(ct => ct.hasDifferencesAtStart)
|
||||
|
||||
let unknownImages = comparisonState.bindD((ct) => ct.unknownImages)
|
||||
let knownImages = comparisonState.bindD((ct) => ct.knownImages)
|
||||
let propertyKeysExternal = comparisonState.mapD((ct) => ct.propertyKeysExternal)
|
||||
let hasDifferencesAtStart = comparisonState.mapD((ct) => ct.hasDifferencesAtStart)
|
||||
</script>
|
||||
|
||||
{#if !$sourceUrl}
|
||||
|
@ -50,7 +49,7 @@
|
|||
{:else if $externalData === undefined}
|
||||
<Loading />
|
||||
{:else if $externalData["error"] !== undefined}
|
||||
<div class="subtle italic low-interaction p-2 px-4 rounded">
|
||||
<div class="subtle low-interaction rounded p-2 px-4 italic">
|
||||
<Tr t={Translations.t.external.error} />
|
||||
</div>
|
||||
{:else if $propertyKeysExternal.length === 0 && $knownImages.size + $unknownImages.length === 0}
|
||||
|
@ -62,7 +61,7 @@
|
|||
{:else if $comparisonState !== undefined}
|
||||
<AccordionSingle expanded={!collapsed}>
|
||||
<span slot="header" class="flex">
|
||||
<GlobeAlt class="w-6 h-6" />
|
||||
<GlobeAlt class="h-6 w-6" />
|
||||
<Tr t={Translations.t.external.title} />
|
||||
</span>
|
||||
<ComparisonTable
|
||||
|
|
|
@ -6,12 +6,11 @@
|
|||
|
||||
<Accordion>
|
||||
<AccordionItem open={expanded} paddingDefault="p-0" inactiveClass="text-black">
|
||||
<span slot="header" class="text-base p-2 ">
|
||||
<span slot="header" class="p-2 text-base">
|
||||
<slot name="header" />
|
||||
</span>
|
||||
<div class="low-interaction p-2 rounded-b">
|
||||
<div class="low-interaction rounded-b p-2">
|
||||
<slot />
|
||||
</div>
|
||||
</AccordionItem>
|
||||
</Accordion>
|
||||
|
||||
|
|
|
@ -30,7 +30,7 @@
|
|||
lon,
|
||||
lat,
|
||||
allowSpherical: new UIEventSource<boolean>(false),
|
||||
blacklist: AllImageProviders.LoadImagesFor(tags)
|
||||
blacklist: AllImageProviders.LoadImagesFor(tags),
|
||||
},
|
||||
state.indexedFeatures
|
||||
)
|
||||
|
@ -39,7 +39,6 @@
|
|||
let allDone = imagesProvider.allDone
|
||||
</script>
|
||||
|
||||
|
||||
<div class="flex justify-between">
|
||||
<h4>
|
||||
<Tr t={Translations.t.image.nearby.title} />
|
||||
|
@ -53,9 +52,9 @@
|
|||
{:else}
|
||||
<div class="flex w-full space-x-1 overflow-x-auto" style="scroll-snap-type: x proximity">
|
||||
{#each $images as image (image.pictureUrl)}
|
||||
<span class="w-fit shrink-0" style="scroll-snap-align: start">
|
||||
<LinkableImage {tags} {image} {state} {feature} {layer} {linkable} />
|
||||
</span>
|
||||
<span class="w-fit shrink-0" style="scroll-snap-align: start">
|
||||
<LinkableImage {tags} {image} {state} {feature} {layer} {linkable} />
|
||||
</span>
|
||||
{/each}
|
||||
</div>
|
||||
{/if}
|
||||
|
|
|
@ -28,9 +28,8 @@
|
|||
</script>
|
||||
|
||||
<AccordionSingle>
|
||||
<span slot="header" class="text-base p-2">
|
||||
<Tr t={t.seeNearby} />
|
||||
</span>
|
||||
<span slot="header" class="p-2 text-base">
|
||||
<Tr t={t.seeNearby} />
|
||||
</span>
|
||||
<NearbyImages {tags} {state} {lon} {lat} {feature} {linkable} {layer} />
|
||||
</AccordionSingle>
|
||||
|
||||
|
|
|
@ -16,7 +16,7 @@ export default class IconValidator extends Validator {
|
|||
}
|
||||
|
||||
getFeedback(s: string, getCountry, sloppy?: boolean): Translation | undefined {
|
||||
if(Utils.isEmoji(s)){
|
||||
if (Utils.isEmoji(s)) {
|
||||
return undefined
|
||||
}
|
||||
s = this.reformat(s)
|
||||
|
|
|
@ -20,8 +20,6 @@
|
|||
$: iconItem = icon.icon?.GetRenderValue($tags)?.Subs($tags)?.txt
|
||||
let color = icon.color?.GetRenderValue($tags)?.txt ?? "#000000"
|
||||
$: color = icon.color?.GetRenderValue($tags)?.txt ?? "#000000"
|
||||
|
||||
|
||||
</script>
|
||||
|
||||
{#if iconItem?.startsWith("<")}
|
||||
|
|
|
@ -39,7 +39,9 @@ export class MapLibreAdaptor implements MapProperties, ExportableMap {
|
|||
readonly allowMoving: UIEventSource<true | boolean | undefined>
|
||||
readonly allowRotating: UIEventSource<true | boolean | undefined>
|
||||
readonly allowZooming: UIEventSource<true | boolean | undefined>
|
||||
readonly lastClickLocation: Store<undefined | { lon: number; lat: number, mode : "left" | "right" | "middle" }>
|
||||
readonly lastClickLocation: Store<
|
||||
undefined | { lon: number; lat: number; mode: "left" | "right" | "middle" }
|
||||
>
|
||||
readonly minzoom: UIEventSource<number>
|
||||
readonly maxzoom: UIEventSource<number>
|
||||
readonly rotation: UIEventSource<number>
|
||||
|
@ -70,7 +72,7 @@ export class MapLibreAdaptor implements MapProperties, ExportableMap {
|
|||
this.location.setData({ ...this.location.data })
|
||||
}
|
||||
this.zoom = state?.zoom ?? new UIEventSource(1)
|
||||
this.minzoom = state?.minzoom ?? new UIEventSource(0.5)// 0.5 is the maplibre minzoom
|
||||
this.minzoom = state?.minzoom ?? new UIEventSource(0.5) // 0.5 is the maplibre minzoom
|
||||
this.maxzoom = state?.maxzoom ?? new UIEventSource(24)
|
||||
this.zoom.addCallbackAndRunD((z) => {
|
||||
if (z < this.minzoom.data) {
|
||||
|
@ -92,13 +94,17 @@ export class MapLibreAdaptor implements MapProperties, ExportableMap {
|
|||
this.rasterLayer =
|
||||
state?.rasterLayer ?? new UIEventSource<RasterLayerPolygon | undefined>(undefined)
|
||||
|
||||
const lastClickLocation = new UIEventSource<{lat:number,lon:number,mode: "left" | "right" | "middle"}>(undefined)
|
||||
const lastClickLocation = new UIEventSource<{
|
||||
lat: number
|
||||
lon: number
|
||||
mode: "left" | "right" | "middle"
|
||||
}>(undefined)
|
||||
this.lastClickLocation = lastClickLocation
|
||||
const self = this
|
||||
|
||||
new RasterLayerHandler(this._maplibreMap, this.rasterLayer)
|
||||
|
||||
const clickmodes = ["left" , "middle", "right"] as const
|
||||
const clickmodes = ["left", "middle", "right"] as const
|
||||
function handleClick(e: maplibregl.MapMouseEvent, mode?: "left" | "right" | "middle") {
|
||||
if (e.originalEvent["consumed"]) {
|
||||
// Workaround, 'ShowPointLayer' sets this flag
|
||||
|
@ -148,8 +154,8 @@ export class MapLibreAdaptor implements MapProperties, ExportableMap {
|
|||
})
|
||||
|
||||
map._container.addEventListener("contextmenu", (e) => {
|
||||
const lngLat = map.unproject([e.x, e.y])
|
||||
lastClickLocation.setData({lon: lngLat.lng, lat: lngLat.lat, mode: "right"})
|
||||
const lngLat = map.unproject([e.x, e.y])
|
||||
lastClickLocation.setData({ lon: lngLat.lng, lat: lngLat.lat, mode: "right" })
|
||||
})
|
||||
map.on("dblclick", (e) => {
|
||||
handleClick(e, "left")
|
||||
|
@ -675,5 +681,4 @@ export class MapLibreAdaptor implements MapProperties, ExportableMap {
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -27,7 +27,6 @@
|
|||
|
||||
let _map: Map
|
||||
onMount(() => {
|
||||
|
||||
const { lon, lat } = mapProperties?.location?.data ?? { lon: 0, lat: 0 }
|
||||
|
||||
const rasterLayer: RasterLayerProperties = mapProperties?.rasterLayer?.data?.properties
|
||||
|
@ -73,11 +72,10 @@
|
|||
})
|
||||
onDestroy(async () => {
|
||||
await Utils.waitFor(250)
|
||||
try{
|
||||
|
||||
if (_map) _map.remove()
|
||||
map = null
|
||||
}catch (e) {
|
||||
try {
|
||||
if (_map) _map.remove()
|
||||
map = null
|
||||
} catch (e) {
|
||||
console.error("Could not destroy map")
|
||||
}
|
||||
})
|
||||
|
|
|
@ -8,19 +8,21 @@
|
|||
export let icons: string | { icon: string; color: string }[]
|
||||
|
||||
let iconsParsed: { icon: string; color: string }[]
|
||||
if(typeof icons === "string") {
|
||||
iconsParsed = icons.split(";").map(subspec => {
|
||||
if(subspec.startsWith("http://") || subspec.startsWith("https://")){
|
||||
if (typeof icons === "string") {
|
||||
iconsParsed = icons.split(";").map((subspec) => {
|
||||
if (subspec.startsWith("http://") || subspec.startsWith("https://")) {
|
||||
return {
|
||||
icon: subspec, color: "black"
|
||||
icon: subspec,
|
||||
color: "black",
|
||||
}
|
||||
}
|
||||
const [icon, color] = subspec.split(":")
|
||||
return {
|
||||
icon, color: color ?? "black"
|
||||
icon,
|
||||
color: color ?? "black",
|
||||
}
|
||||
})
|
||||
}else{
|
||||
} else {
|
||||
iconsParsed = icons
|
||||
}
|
||||
|
||||
|
|
|
@ -97,10 +97,10 @@ class SingleBackgroundHandler {
|
|||
}
|
||||
}
|
||||
|
||||
private tryEnableSafe(): boolean{
|
||||
private tryEnableSafe(): boolean {
|
||||
try {
|
||||
return this.tryEnable()
|
||||
}catch (e) {
|
||||
} catch (e) {
|
||||
console.log("Error: could not enable due to error", e)
|
||||
return false
|
||||
}
|
||||
|
@ -119,11 +119,7 @@ class SingleBackgroundHandler {
|
|||
console.debug("Enabling", background.id)
|
||||
let addLayerBeforeId = "transit_pier" // this is the first non-landuse item in the stylesheet, we add the raster layer before the roads but above the landuse
|
||||
if (!map.getLayer(addLayerBeforeId)) {
|
||||
console.warn(
|
||||
"Layer",
|
||||
addLayerBeforeId,
|
||||
"not found"
|
||||
)
|
||||
console.warn("Layer", addLayerBeforeId, "not found")
|
||||
addLayerBeforeId = undefined
|
||||
}
|
||||
if (background.category === "osmbasedmap" || background.category === "map") {
|
||||
|
|
|
@ -66,7 +66,7 @@
|
|||
deleteConfig.softDeletionTags,
|
||||
{
|
||||
theme: state?.layout?.id ?? "unknown",
|
||||
specialMotivation: deleteReason
|
||||
specialMotivation: deleteReason,
|
||||
},
|
||||
canBeDeleted.data
|
||||
)
|
||||
|
@ -74,7 +74,7 @@
|
|||
// no _delete_reason is given, which implies that this is _not_ a deletion but merely a retagging via a nonDeleteMapping
|
||||
actionToTake = new ChangeTagAction(featureId, selectedTags, tags.data, {
|
||||
theme: state?.layout?.id ?? "unkown",
|
||||
changeType: "special-delete"
|
||||
changeType: "special-delete",
|
||||
})
|
||||
}
|
||||
|
||||
|
@ -87,81 +87,74 @@
|
|||
|
||||
<LoginToggle ignoreLoading={true} {state}>
|
||||
{#if $canBeDeleted === false && !hasSoftDeletion}
|
||||
<div class="low-interaction rounded text-sm flex p-2 italic subtle gap-x-1">
|
||||
<div class="low-interaction subtle flex gap-x-1 rounded p-2 text-sm italic">
|
||||
<div class="relative h-fit">
|
||||
<Trash class="w-8 h-8 pb-1" />
|
||||
<Invalid class="absolute bottom-0 right-0 w-5 h-5"/>
|
||||
<Trash class="h-8 w-8 pb-1" />
|
||||
<Invalid class="absolute bottom-0 right-0 h-5 w-5" />
|
||||
</div>
|
||||
<div class="flex flex-col">
|
||||
|
||||
<Tr t={t.cannotBeDeleted} />
|
||||
<Tr t={$canBeDeletedReason} />
|
||||
<Tr t={t.useSomethingElse} />
|
||||
</div>
|
||||
</div>
|
||||
{:else}
|
||||
|
||||
|
||||
<AccordionSingle>
|
||||
<span slot="header" class="flex">
|
||||
|
||||
<TrashIcon class="h-6 w-6" />
|
||||
<Tr t={t.delete} />
|
||||
<TrashIcon class="h-6 w-6" />
|
||||
<Tr t={t.delete} />
|
||||
</span>
|
||||
<span>
|
||||
{#if currentState === "confirm"}
|
||||
<TagRenderingQuestion
|
||||
bind:selectedTags
|
||||
clss=""
|
||||
{tags}
|
||||
config={deleteConfig.constructTagRendering()}
|
||||
{state}
|
||||
selectedElement={feature}
|
||||
{layer}
|
||||
>
|
||||
<button
|
||||
slot="save-button"
|
||||
on:click={onDelete}
|
||||
class={twJoin(
|
||||
selectedTags === undefined && "disabled",
|
||||
"primary flex items-center bg-red-600"
|
||||
)}
|
||||
>
|
||||
<TrashIcon
|
||||
class={twJoin(
|
||||
"ml-1 mr-2 h-6 w-6 rounded-full p-1",
|
||||
selectedTags !== undefined && "bg-red-600"
|
||||
)}
|
||||
/>
|
||||
<Tr t={t.delete} />
|
||||
</button>
|
||||
{#if currentState === "confirm"}
|
||||
<TagRenderingQuestion
|
||||
bind:selectedTags
|
||||
clss=""
|
||||
{tags}
|
||||
config={deleteConfig.constructTagRendering()}
|
||||
{state}
|
||||
selectedElement={feature}
|
||||
{layer}
|
||||
>
|
||||
<button
|
||||
slot="save-button"
|
||||
on:click={onDelete}
|
||||
class={twJoin(
|
||||
selectedTags === undefined && "disabled",
|
||||
"primary flex items-center bg-red-600"
|
||||
)}
|
||||
>
|
||||
<TrashIcon
|
||||
class={twJoin(
|
||||
"ml-1 mr-2 h-6 w-6 rounded-full p-1",
|
||||
selectedTags !== undefined && "bg-red-600"
|
||||
)}
|
||||
/>
|
||||
<Tr t={t.delete} />
|
||||
</button>
|
||||
|
||||
<div slot="under-buttons" class="subtle italic">
|
||||
{#if selectedTags !== undefined}
|
||||
{#if canBeDeleted && isHardDelete}
|
||||
<!-- This is a hard delete - explain that this is a hard delete...-->
|
||||
<Tr t={t.explanations.hardDelete} />
|
||||
{:else}
|
||||
<!-- This is a soft deletion: we explain _why_ the deletion is soft -->
|
||||
<Tr t={t.explanations.softDelete.Subs({ reason: $canBeDeletedReason })} />
|
||||
{/if}
|
||||
{/if}
|
||||
</div>
|
||||
</TagRenderingQuestion>
|
||||
{:else if currentState === "applying"}
|
||||
<Loading />
|
||||
{:else}
|
||||
<!-- currentState === 'deleted' -->
|
||||
|
||||
<div slot="under-buttons" class="italic subtle">
|
||||
{#if selectedTags !== undefined}
|
||||
{#if canBeDeleted && isHardDelete}
|
||||
<!-- This is a hard delete - explain that this is a hard delete...-->
|
||||
<Tr t={t.explanations.hardDelete} />
|
||||
{:else}
|
||||
<!-- This is a soft deletion: we explain _why_ the deletion is soft -->
|
||||
<Tr t={t.explanations.softDelete.Subs({ reason: $canBeDeletedReason })} />
|
||||
{/if}
|
||||
<div class="low-interaction flex">
|
||||
<TrashIcon class="h-6 w-6" />
|
||||
<Tr t={t.isDeleted} />
|
||||
</div>
|
||||
{/if}
|
||||
</div>
|
||||
</TagRenderingQuestion>
|
||||
{:else if currentState === "applying"}
|
||||
<Loading />
|
||||
{:else}
|
||||
<!-- currentState === 'deleted' -->
|
||||
|
||||
<div class="low-interaction flex">
|
||||
<TrashIcon class="h-6 w-6" />
|
||||
<Tr t={t.isDeleted} />
|
||||
</div>
|
||||
{/if}
|
||||
</span>
|
||||
</AccordionSingle>
|
||||
|
||||
{/if}
|
||||
|
||||
</LoginToggle>
|
||||
|
|
|
@ -26,23 +26,22 @@
|
|||
<LoginToggle ignoreLoading={true} {state}>
|
||||
{#if $isFavourite}
|
||||
<div class="flex h-fit items-start">
|
||||
<button class="w-full" on:click={() => markFavourite(false)}>
|
||||
<HeartSolidIcon class="mr-2 w-16 shrink-0" on:click={() => markFavourite(false)} />
|
||||
<div class="flex flex-col items-start">
|
||||
<button class="w-full" on:click={() => markFavourite(false)}>
|
||||
<HeartSolidIcon class="mr-2 w-16 shrink-0" on:click={() => markFavourite(false)} />
|
||||
<div class="flex flex-col items-start">
|
||||
<Tr t={t.button.unmark} />
|
||||
<Tr cls="normal-font subtle" t={t.button.unmarkNotDeleted} />
|
||||
</div>
|
||||
</button>
|
||||
</div>
|
||||
<Tr cls="font-bold thanks m-2 p-2 block" t={t.button.isFavourite} />
|
||||
{:else}
|
||||
<button class="w-full" on:click={() => markFavourite(true)}>
|
||||
<HeartOutlineIcon class="mr-2 w-16 shrink-0" on:click={() => markFavourite(true)} />
|
||||
<div class="flex w-full flex-col items-start">
|
||||
|
||||
<Tr t={t.button.markAsFavouriteTitle} />
|
||||
<Tr cls="normal-font subtle" t={t.button.markDescription} />
|
||||
</div>
|
||||
</button>
|
||||
</div>
|
||||
<Tr cls="font-bold thanks m-2 p-2 block" t={t.button.isFavourite} />
|
||||
{:else}
|
||||
<button class="w-full" on:click={() => markFavourite(true)}>
|
||||
<HeartOutlineIcon class="mr-2 w-16 shrink-0" on:click={() => markFavourite(true)} />
|
||||
<div class="flex w-full flex-col items-start">
|
||||
<Tr t={t.button.markAsFavouriteTitle} />
|
||||
<Tr cls="normal-font subtle" t={t.button.markDescription} />
|
||||
</div>
|
||||
</button>
|
||||
{/if}
|
||||
</LoginToggle>
|
||||
|
|
|
@ -47,12 +47,12 @@
|
|||
location: new UIEventSource({ lon, lat }),
|
||||
minzoom: new UIEventSource($reason.minZoom),
|
||||
rasterLayer: state.mapProperties.rasterLayer,
|
||||
zoom: new UIEventSource($reason?.startZoom ?? 16)
|
||||
zoom: new UIEventSource($reason?.startZoom ?? 16),
|
||||
}
|
||||
}
|
||||
|
||||
let moveWizardState = new MoveWizardState(id, layer.allowMove, state)
|
||||
if(moveWizardState.reasons.length === 1){
|
||||
if (moveWizardState.reasons.length === 1) {
|
||||
reason.setData(moveWizardState.reasons[0])
|
||||
}
|
||||
let notAllowed = moveWizardState.moveDisallowedReason
|
||||
|
@ -78,8 +78,8 @@
|
|||
/>
|
||||
<Tr t={Translations.T(moveWizardState.reasons[0].invitingText)} />
|
||||
{:else}
|
||||
<Move class="h-6 w-6" />
|
||||
<Tr t={t.inviteToMove.generic} />
|
||||
<Move class="h-6 w-6" />
|
||||
<Tr t={t.inviteToMove.generic} />
|
||||
{/if}
|
||||
</span>
|
||||
<span class="flex flex-col p-2">
|
||||
|
@ -88,9 +88,9 @@
|
|||
{#each moveWizardState.reasons as reasonSpec}
|
||||
<button
|
||||
on:click={() => {
|
||||
reason.setData(reasonSpec)
|
||||
currentStep = "pick_location"
|
||||
}}
|
||||
reason.setData(reasonSpec)
|
||||
currentStep = "pick_location"
|
||||
}}
|
||||
>
|
||||
<ToSvelte construct={reasonSpec.icon.SetClass("w-16 h-16 pr-2")} />
|
||||
<Tr t={Translations.T(reasonSpec.text)} />
|
||||
|
@ -115,15 +115,15 @@
|
|||
<div class="flex flex-wrap">
|
||||
<If
|
||||
condition={currentMapProperties.zoom.mapD(
|
||||
(zoom) => zoom >= Constants.minZoomLevelToAddNewPoint
|
||||
)}
|
||||
(zoom) => zoom >= Constants.minZoomLevelToAddNewPoint
|
||||
)}
|
||||
>
|
||||
<button
|
||||
class="primary w-full"
|
||||
class="primary w-full"
|
||||
on:click={() => {
|
||||
moveWizardState.moveFeature(newLocation.data, reason.data, featureToMove)
|
||||
currentStep = "moved"
|
||||
}}
|
||||
moveWizardState.moveFeature(newLocation.data, reason.data, featureToMove)
|
||||
currentStep = "moved"
|
||||
}}
|
||||
>
|
||||
<Tr t={t.confirmMove} />
|
||||
</button>
|
||||
|
@ -133,19 +133,24 @@
|
|||
</div>
|
||||
</If>
|
||||
{#if moveWizardState.reasons.length > 1}
|
||||
<button class="w-full" on:click={() => {currentStep = "reason"}}>
|
||||
<ChevronLeft class="w-6 h-6" />
|
||||
<button
|
||||
class="w-full"
|
||||
on:click={() => {
|
||||
currentStep = "reason"
|
||||
}}
|
||||
>
|
||||
<ChevronLeft class="h-6 w-6" />
|
||||
<Tr t={t.cancel} />
|
||||
</button>
|
||||
{/if}
|
||||
</div>
|
||||
</div>
|
||||
{:else if currentStep === "moved"}
|
||||
<div class="flex flex-col">
|
||||
<Tr cls="thanks" t={t.pointIsMoved} />
|
||||
<button
|
||||
on:click={() => {
|
||||
currentStep = "reason"
|
||||
}}
|
||||
currentStep = "reason"
|
||||
}}
|
||||
>
|
||||
<Move class="h-6 w-6 pr-2" />
|
||||
<Tr t={t.inviteToMoveAgain} />
|
||||
|
|
|
@ -134,16 +134,15 @@ export class MoveWizardState {
|
|||
// This is a new point. Check if it was snapped to an existing way due to the '_referencing_ways'-tag
|
||||
const store = this._state.featureProperties.getStore(id)
|
||||
store?.addCallbackAndRunD((tags) => {
|
||||
try{
|
||||
|
||||
try {
|
||||
if (tags._referencing_ways !== undefined && tags._referencing_ways !== "[]") {
|
||||
console.log("Got referencing ways according to the tags")
|
||||
this.moveDisallowedReason.setData(t.partOfAWay)
|
||||
return true // unregister
|
||||
}
|
||||
}catch (e) {
|
||||
console.error("Could not get '_referencing_ways'-attribute of tags due to", e)
|
||||
}
|
||||
} catch (e) {
|
||||
console.error("Could not get '_referencing_ways'-attribute of tags due to", e)
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
|
|
|
@ -11,13 +11,12 @@
|
|||
export let layer: LayerConfig
|
||||
export let text: string
|
||||
export let cssClasses: string = ""
|
||||
let knowableRenderings = layer.tagRenderings.filter(tr => tr.question !== undefined)
|
||||
let hasKnownQuestion = tags.mapD(t => knowableRenderings.some(tr => tr.IsKnown(t)))
|
||||
|
||||
let knowableRenderings = layer.tagRenderings.filter((tr) => tr.question !== undefined)
|
||||
let hasKnownQuestion = tags.mapD((t) => knowableRenderings.some((tr) => tr.IsKnown(t)))
|
||||
</script>
|
||||
|
||||
{#if !$hasKnownQuestion}
|
||||
<span class={cssClasses}>
|
||||
{text}
|
||||
{text}
|
||||
</span>
|
||||
{/if}
|
||||
|
|
|
@ -15,9 +15,9 @@
|
|||
|
||||
<button
|
||||
on:click
|
||||
class="h-8 w-8 shrink-0 self-start rounded-full p-1 as-link"
|
||||
class="as-link h-8 w-8 shrink-0 self-start rounded-full p-1"
|
||||
aria-labelledby={arialabel === undefined ? ariaLabelledBy : undefined}
|
||||
use:ariaLabel={arialabel}
|
||||
>
|
||||
<Pencil class="h-4 w-4 hover-alert" />
|
||||
<Pencil class="hover-alert h-4 w-4" />
|
||||
</button>
|
||||
|
|
|
@ -49,7 +49,9 @@
|
|||
function createVisualisation(specpart: Exclude<RenderingSpecification, string>): BaseUIElement {
|
||||
{
|
||||
try {
|
||||
return specpart.func.constr(state, tags, specpart.args, feature, layer)?.SetClass(specpart.style)
|
||||
return specpart.func
|
||||
.constr(state, tags, specpart.args, feature, layer)
|
||||
?.SetClass(specpart.style)
|
||||
} catch (e) {
|
||||
console.error(
|
||||
"Could not construct a special visualisation with specification",
|
||||
|
|
|
@ -28,12 +28,18 @@
|
|||
</script>
|
||||
|
||||
{#if config !== undefined && (config?.condition === undefined || config.condition.matchesProperties($tags))}
|
||||
<div {id} class={twMerge("link-underline flex flex-col w-full", extraClasses)}>
|
||||
<div {id} class={twMerge("link-underline flex w-full flex-col", extraClasses)}>
|
||||
{#if $trs.length === 1}
|
||||
<TagRenderingMapping mapping={$trs[0]} {tags} {state} {selectedElement} {layer}
|
||||
clss={config?.classes?.join(" ") ?? ""} />
|
||||
<TagRenderingMapping
|
||||
mapping={$trs[0]}
|
||||
{tags}
|
||||
{state}
|
||||
{selectedElement}
|
||||
{layer}
|
||||
clss={config?.classes?.join(" ") ?? ""}
|
||||
/>
|
||||
{/if}
|
||||
{#if $trs.length > 1}
|
||||
{#if $trs.length > 1}
|
||||
<ul>
|
||||
{#each $trs as mapping}
|
||||
<li>
|
||||
|
|
|
@ -66,7 +66,6 @@
|
|||
Utils.focusOnFocusableChild(htmlElem)
|
||||
} else {
|
||||
htmlElem.classList.remove("focus")
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -31,14 +31,19 @@
|
|||
| "large-height"
|
||||
| string
|
||||
}
|
||||
|
||||
</script>
|
||||
|
||||
{#if mapping.icon !== undefined}
|
||||
<div class="inline-flex items-center">
|
||||
<Marker
|
||||
icons={mapping.icon}
|
||||
size={twJoin(`mapping-icon-${mapping.iconClass ?? "small"}-height mapping-icon-${mapping.iconClass ?? "small"}-width`, "mr-2", "shrink-0 mx-2")}
|
||||
size={twJoin(
|
||||
`mapping-icon-${mapping.iconClass ?? "small"}-height mapping-icon-${
|
||||
mapping.iconClass ?? "small"
|
||||
}-width`,
|
||||
"mr-2",
|
||||
"shrink-0 mx-2"
|
||||
)}
|
||||
clss={`mapping-icon-${mapping.iconClass ?? "small"}`}
|
||||
/>
|
||||
<SpecialTranslation t={mapping.then} {tags} {state} {layer} feature={selectedElement} {clss} />
|
||||
|
|
|
@ -310,7 +310,7 @@
|
|||
</script>
|
||||
|
||||
{#if question !== undefined}
|
||||
<div class={clss} >
|
||||
<div class={clss}>
|
||||
<form
|
||||
class="relative flex flex-col overflow-y-auto px-2"
|
||||
style="max-height: 75vh"
|
||||
|
@ -326,20 +326,19 @@
|
|||
|
||||
{#if config.questionhint}
|
||||
<span class="italic">
|
||||
|
||||
{#if config.questionHintIsMd}
|
||||
<Markdown srcWritable={config.questionhint.current} />
|
||||
{:else}
|
||||
<div class="max-h-60 overflow-y-auto">
|
||||
<SpecialTranslation
|
||||
t={config.questionhint}
|
||||
{tags}
|
||||
{state}
|
||||
{layer}
|
||||
feature={selectedElement}
|
||||
/>
|
||||
</div>
|
||||
{/if}
|
||||
{#if config.questionHintIsMd}
|
||||
<Markdown srcWritable={config.questionhint.current} />
|
||||
{:else}
|
||||
<div class="max-h-60 overflow-y-auto">
|
||||
<SpecialTranslation
|
||||
t={config.questionhint}
|
||||
{tags}
|
||||
{state}
|
||||
{layer}
|
||||
feature={selectedElement}
|
||||
/>
|
||||
</div>
|
||||
{/if}
|
||||
</span>
|
||||
{/if}
|
||||
</legend>
|
||||
|
|
|
@ -35,8 +35,8 @@
|
|||
<SingleReview {review} />
|
||||
{/each}
|
||||
{:else}
|
||||
<div class="subtle italic m-2">
|
||||
<Tr t={Translations.t.reviews.no_reviews_yet} />
|
||||
<div class="subtle m-2 italic">
|
||||
<Tr t={Translations.t.reviews.no_reviews_yet} />
|
||||
</div>
|
||||
{/if}
|
||||
<div class="flex justify-end">
|
||||
|
|
|
@ -80,7 +80,12 @@
|
|||
|
||||
<LoginToggle {state}>
|
||||
<div class="m-1 flex flex-col">
|
||||
<FileSelector cls="button w-fit" accept="application/json" multiple={false} on:submit={(e) => onImport(e.detail)}>
|
||||
<FileSelector
|
||||
cls="button w-fit"
|
||||
accept="application/json"
|
||||
multiple={false}
|
||||
on:submit={(e) => onImport(e.detail)}
|
||||
>
|
||||
{text}
|
||||
</FileSelector>
|
||||
{#if error}
|
||||
|
|
|
@ -38,7 +38,7 @@
|
|||
{:else}
|
||||
<button
|
||||
use:ariaLabel={Translations.t.reviews.rate.Subs({ n: i + 1 })}
|
||||
class="rounded-full as-link"
|
||||
class="as-link rounded-full"
|
||||
style="padding: 0; border: none;"
|
||||
bind:this={container}
|
||||
on:click={(e) => {
|
||||
|
|
File diff suppressed because it is too large
Load diff
|
@ -27,13 +27,13 @@
|
|||
Bug: Region received empty list as configuration at {path.join(".")}
|
||||
{:else if title}
|
||||
<AccordionSingle>
|
||||
<div slot="header">{title}</div>
|
||||
<div class="flex w-full flex-col gap-y-1 border border-black pl-2">
|
||||
<slot name="description" />
|
||||
{#each configsFiltered as config}
|
||||
<SchemaBasedInput {state} path={config.path} schema={config} />
|
||||
{/each}
|
||||
</div>
|
||||
<div slot="header">{title}</div>
|
||||
<div class="flex w-full flex-col gap-y-1 border border-black pl-2">
|
||||
<slot name="description" />
|
||||
{#each configsFiltered as config}
|
||||
<SchemaBasedInput {state} path={config.path} schema={config} />
|
||||
{/each}
|
||||
</div>
|
||||
</AccordionSingle>
|
||||
{:else}
|
||||
<div class="flex w-full flex-col gap-y-1 pl-2">
|
||||
|
|
|
@ -143,63 +143,64 @@
|
|||
{/if}
|
||||
</span>
|
||||
<div class="normal-background p-2">
|
||||
|
||||
{#if isTagRenderingBlock}
|
||||
<QuestionPreview {state} path={fusePath(i, [])} {schema}>
|
||||
<button
|
||||
on:click={() => {
|
||||
del(i)
|
||||
}}
|
||||
>
|
||||
<TrashIcon class="h-4 w-4" />
|
||||
Delete this question
|
||||
</button>
|
||||
|
||||
{#if i > 0}
|
||||
{#if isTagRenderingBlock}
|
||||
<QuestionPreview {state} path={fusePath(i, [])} {schema}>
|
||||
<button
|
||||
on:click={() => {
|
||||
moveTo(i, 0)
|
||||
del(i)
|
||||
}}
|
||||
>
|
||||
Move to front
|
||||
<TrashIcon class="h-4 w-4" />
|
||||
Delete this question
|
||||
</button>
|
||||
|
||||
<button
|
||||
on:click={() => {
|
||||
swap(i, i - 1)
|
||||
}}
|
||||
>
|
||||
Move up
|
||||
</button>
|
||||
{/if}
|
||||
{#if i + 1 < $currentValue.length}
|
||||
<button
|
||||
on:click={() => {
|
||||
swap(i, i + 1)
|
||||
}}
|
||||
>
|
||||
Move down
|
||||
</button>
|
||||
<button
|
||||
on:click={() => {
|
||||
moveTo(i, $currentValue.length - 1)
|
||||
}}
|
||||
>
|
||||
Move to back
|
||||
</button>
|
||||
{/if}
|
||||
</QuestionPreview>
|
||||
{:else if schema.hints.types}
|
||||
<SchemaBasedMultiType {state} path={fusePath(i, [])} schema={schemaForMultitype()} />
|
||||
{:else}
|
||||
{#each subparts as subpart}
|
||||
<SchemaBasedInput {state} path={fusePath(i, [subpart.path.at(-1)])} schema={subpart} />
|
||||
{/each}
|
||||
{/if}
|
||||
{#if i > 0}
|
||||
<button
|
||||
on:click={() => {
|
||||
moveTo(i, 0)
|
||||
}}
|
||||
>
|
||||
Move to front
|
||||
</button>
|
||||
|
||||
<button
|
||||
on:click={() => {
|
||||
swap(i, i - 1)
|
||||
}}
|
||||
>
|
||||
Move up
|
||||
</button>
|
||||
{/if}
|
||||
{#if i + 1 < $currentValue.length}
|
||||
<button
|
||||
on:click={() => {
|
||||
swap(i, i + 1)
|
||||
}}
|
||||
>
|
||||
Move down
|
||||
</button>
|
||||
<button
|
||||
on:click={() => {
|
||||
moveTo(i, $currentValue.length - 1)
|
||||
}}
|
||||
>
|
||||
Move to back
|
||||
</button>
|
||||
{/if}
|
||||
</QuestionPreview>
|
||||
{:else if schema.hints.types}
|
||||
<SchemaBasedMultiType {state} path={fusePath(i, [])} schema={schemaForMultitype()} />
|
||||
{:else}
|
||||
{#each subparts as subpart}
|
||||
<SchemaBasedInput
|
||||
{state}
|
||||
path={fusePath(i, [subpart.path.at(-1)])}
|
||||
schema={subpart}
|
||||
/>
|
||||
{/each}
|
||||
{/if}
|
||||
</div>
|
||||
</AccordionSingle>
|
||||
|
||||
{/each}
|
||||
{/if}
|
||||
<div class="flex">
|
||||
|
|
|
@ -3,11 +3,9 @@ import StudioGUI from "./StudioGUI.svelte"
|
|||
|
||||
export default class StudioGui {
|
||||
public setup() {
|
||||
new StudioGUI(
|
||||
{
|
||||
target: document.getElementById("main")
|
||||
}
|
||||
)
|
||||
new StudioGUI({
|
||||
target: document.getElementById("main"),
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
</script>
|
||||
|
||||
<main>
|
||||
<div class="flex-col flex gap-y-2">
|
||||
<div class="flex flex-col gap-y-2">
|
||||
<h1>Stylesheet testing grounds</h1>
|
||||
|
||||
This document exists to explore the style hierarchy.
|
||||
|
@ -65,9 +65,7 @@
|
|||
<Community class="h-6 w-6" />
|
||||
Secondary action (disabled)
|
||||
</button>
|
||||
<button class="as-link">
|
||||
Mimick link
|
||||
</button>
|
||||
<button class="as-link">Mimick link</button>
|
||||
</div>
|
||||
<input type="text" />
|
||||
|
||||
|
|
|
@ -255,11 +255,11 @@
|
|||
htmlElem={openMapButton}
|
||||
>
|
||||
<div class="m-0.5 mx-1 flex cursor-pointer items-center max-[480px]:w-full sm:mx-1 md:mx-2">
|
||||
<Marker icons={layout.icon} size="h-4 w-4 md:h-8 md:w-8 mr-0.5 sm:mr-1 md:mr-2" ></Marker>
|
||||
<Marker icons={layout.icon} size="h-4 w-4 md:h-8 md:w-8 mr-0.5 sm:mr-1 md:mr-2" />
|
||||
<b class="mr-1">
|
||||
<Tr t={layout.title} />
|
||||
</b>
|
||||
<ChevronRight class="w-4 h-4"/>
|
||||
<ChevronRight class="h-4 w-4" />
|
||||
</div>
|
||||
</MapControlButton>
|
||||
<MapControlButton
|
||||
|
@ -347,13 +347,16 @@
|
|||
/>
|
||||
</If>
|
||||
<a
|
||||
class="self-center bg-black-transparent pointer-events-auto h-fit max-h-12 cursor-pointer self-end overflow-hidden rounded-2xl px-1 ml-1 text-white opacity-50 hover:opacity-100"
|
||||
class="bg-black-transparent pointer-events-auto ml-1 h-fit max-h-12 cursor-pointer self-end self-center overflow-hidden rounded-2xl px-1 text-white opacity-50 hover:opacity-100"
|
||||
on:click={() => {
|
||||
state.guistate.themeViewTab.setData("copyright")
|
||||
state.guistate.themeIsOpened.setData(true)
|
||||
}}
|
||||
>
|
||||
© <span class="hidden sm:inline sm:pr-2 "> OpenStreetMap<span class="hidden md:inline md:pr-2 w-24">, {rasterLayerName}</span></span>
|
||||
© <span class="hidden sm:inline sm:pr-2">
|
||||
OpenStreetMap
|
||||
<span class="hidden w-24 md:inline md:pr-2">, {rasterLayerName}</span>
|
||||
</span>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -485,7 +488,7 @@
|
|||
</div>
|
||||
|
||||
<div class="flex" slot="title0">
|
||||
<Marker icons={layout.icon} size="h-4 w-4"/>
|
||||
<Marker icons={layout.icon} size="h-4 w-4" />
|
||||
|
||||
<Tr t={layout.title} />
|
||||
</div>
|
||||
|
@ -583,9 +586,19 @@
|
|||
<Tr t={Translations.t.general.attribution.openIssueTracker} />
|
||||
</a>
|
||||
|
||||
<a class="flex" href={"https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Themes/"+layout.id+".md"} target="_blank">
|
||||
<DocumentChartBar class="h-6 w-6"/>
|
||||
<Tr t={Translations.t.general.attribution.openThemeDocumentation.Subs({name: layout.title})}/>
|
||||
<a
|
||||
class="flex"
|
||||
href={"https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Themes/" +
|
||||
layout.id +
|
||||
".md"}
|
||||
target="_blank"
|
||||
>
|
||||
<DocumentChartBar class="h-6 w-6" />
|
||||
<Tr
|
||||
t={Translations.t.general.attribution.openThemeDocumentation.Subs({
|
||||
name: layout.title,
|
||||
})}
|
||||
/>
|
||||
</a>
|
||||
|
||||
<a class="flex" href="https://en.osm.town/@MapComplete" target="_blank">
|
||||
|
|
|
@ -1660,13 +1660,13 @@ In the case that MapComplete is pointed to the testing grounds, the edit will be
|
|||
}
|
||||
}
|
||||
|
||||
private static emojiRegex = /^\p{Extended_Pictographic}+$/u
|
||||
private static emojiRegex = /^\p{Extended_Pictographic}+$/u
|
||||
|
||||
/**
|
||||
* Returns 'true' if the given string contains at least one and only emoji characters
|
||||
* @param string
|
||||
*/
|
||||
public static isEmoji(string: string){
|
||||
public static isEmoji(string: string) {
|
||||
return Utils.emojiRegex.test(string)
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
{
|
||||
"contributors": [
|
||||
{
|
||||
"commits": 7549,
|
||||
"commits": 7596,
|
||||
"contributor": "Pieter Vander Vennet"
|
||||
},
|
||||
{
|
||||
|
@ -17,7 +17,7 @@
|
|||
"contributor": "Win Olario"
|
||||
},
|
||||
{
|
||||
"commits": 35,
|
||||
"commits": 36,
|
||||
"contributor": "dependabot[bot]"
|
||||
},
|
||||
{
|
||||
|
@ -128,6 +128,10 @@
|
|||
"commits": 9,
|
||||
"contributor": "Midgard"
|
||||
},
|
||||
{
|
||||
"commits": 8,
|
||||
"contributor": "Binnette"
|
||||
},
|
||||
{
|
||||
"commits": 8,
|
||||
"contributor": "pelderson"
|
||||
|
@ -144,10 +148,6 @@
|
|||
"commits": 7,
|
||||
"contributor": "OliNau"
|
||||
},
|
||||
{
|
||||
"commits": 7,
|
||||
"contributor": "Binnette"
|
||||
},
|
||||
{
|
||||
"commits": 6,
|
||||
"contributor": "David Haberthür"
|
||||
|
|
|
@ -3,7 +3,6 @@
|
|||
"ca"
|
||||
],
|
||||
"AE": [
|
||||
"en",
|
||||
"ar"
|
||||
],
|
||||
"AF": [
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
{
|
||||
"ca": "català",
|
||||
"cs": "čeština",
|
||||
"da": "dansk",
|
||||
"de": "Deutsch",
|
||||
"en": "English",
|
||||
|
@ -11,7 +12,7 @@
|
|||
"gl": "lingua galega",
|
||||
"he": "עברית",
|
||||
"hu": "magyar",
|
||||
"id": "Indonesia",
|
||||
"id": "bahasa Indonesia",
|
||||
"it": "italiano",
|
||||
"ja": "日本語",
|
||||
"nb_NO": "bokmål",
|
||||
|
@ -22,7 +23,6 @@
|
|||
"ru": "русский язык",
|
||||
"sl": "slovenščina",
|
||||
"sv": "svenska",
|
||||
"zgh": "ⵜⴰⵎⴰⵣⵉⵖⵜ ⵜⴰⵏⴰⵡⴰⵢⵜ ⵜⴰⵎⵖⵔⵉⴱⵉⵜ",
|
||||
"zh_Hans": "简体中文",
|
||||
"zh_Hant": "繁體中文"
|
||||
}
|
File diff suppressed because it is too large
Load diff
|
@ -1,11 +1,11 @@
|
|||
{
|
||||
"contributors": [
|
||||
{
|
||||
"commits": 374,
|
||||
"commits": 378,
|
||||
"contributor": "Pieter Vander Vennet"
|
||||
},
|
||||
{
|
||||
"commits": 346,
|
||||
"commits": 347,
|
||||
"contributor": "kjon"
|
||||
},
|
||||
{
|
||||
|
@ -21,7 +21,7 @@
|
|||
"contributor": "Robin van der Linde"
|
||||
},
|
||||
{
|
||||
"commits": 65,
|
||||
"commits": 67,
|
||||
"contributor": "mcliquid"
|
||||
},
|
||||
{
|
||||
|
@ -184,6 +184,10 @@
|
|||
"commits": 9,
|
||||
"contributor": "Jacque Fresco"
|
||||
},
|
||||
{
|
||||
"commits": 8,
|
||||
"contributor": "Jeff Huang"
|
||||
},
|
||||
{
|
||||
"commits": 8,
|
||||
"contributor": "Krzysztof Chorzempa"
|
||||
|
@ -212,10 +216,6 @@
|
|||
"commits": 6,
|
||||
"contributor": "hugoalh"
|
||||
},
|
||||
{
|
||||
"commits": 6,
|
||||
"contributor": "Jeff Huang"
|
||||
},
|
||||
{
|
||||
"commits": 6,
|
||||
"contributor": "Juele juele"
|
||||
|
|
20
src/index.ts
20
src/index.ts
|
@ -52,13 +52,13 @@ async function main() {
|
|||
])
|
||||
console.log("The available layers on server are", Array.from(availableLayers))
|
||||
const state = new ThemeViewState(layout, availableLayers)
|
||||
const target = document.getElementById("maindiv")
|
||||
const target = document.getElementById("maindiv")
|
||||
const childs = Array.from(target.children)
|
||||
new ThemeViewGUI({
|
||||
target,
|
||||
props: { state },
|
||||
})
|
||||
childs.forEach(ch => target.removeChild(ch))
|
||||
childs.forEach((ch) => target.removeChild(ch))
|
||||
Array.from(document.getElementsByClassName("delete-on-load")).forEach((el) => {
|
||||
el.parentElement.removeChild(el)
|
||||
})
|
||||
|
@ -69,13 +69,15 @@ async function main() {
|
|||
new FixedUiElement(err.toString().split("\n").join("<br/>")).SetClass("block alert"),
|
||||
|
||||
customDefinition?.length > 0
|
||||
? new SubtleButton(new SvelteUIElement(ArrowDownTray), "Download the raw file").onClick(
|
||||
() =>
|
||||
Utils.offerContentsAsDownloadableFile(
|
||||
DetermineLayout.getCustomDefinition(),
|
||||
"mapcomplete-theme.json",
|
||||
{ mimetype: "application/json" }
|
||||
)
|
||||
? new SubtleButton(
|
||||
new SvelteUIElement(ArrowDownTray),
|
||||
"Download the raw file"
|
||||
).onClick(() =>
|
||||
Utils.offerContentsAsDownloadableFile(
|
||||
DetermineLayout.getCustomDefinition(),
|
||||
"mapcomplete-theme.json",
|
||||
{ mimetype: "application/json" }
|
||||
)
|
||||
)
|
||||
: undefined,
|
||||
]).AttachTo("maindiv")
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue