Add draft of sport pitches
This commit is contained in:
parent
857e4fe114
commit
94c0b8667a
9 changed files with 310 additions and 16 deletions
|
@ -24,6 +24,7 @@ import * as benches_at_pt from "../assets/layers/benches/benches_at_pt.json"
|
||||||
import * as picnic_tables from "../assets/layers/benches/picnic_tables.json"
|
import * as picnic_tables from "../assets/layers/benches/picnic_tables.json"
|
||||||
import * as play_forest from "../assets/layers/play_forest/play_forest.json"
|
import * as play_forest from "../assets/layers/play_forest/play_forest.json"
|
||||||
import * as playground from "../assets/layers/playground/playground.json"
|
import * as playground from "../assets/layers/playground/playground.json"
|
||||||
|
import * as sport_pitch from "../assets/layers/sport_pitch/sport_pitch.json"
|
||||||
import LayerConfig from "./JSON/LayerConfig";
|
import LayerConfig from "./JSON/LayerConfig";
|
||||||
import {LayerConfigJson} from "./JSON/LayerConfigJson";
|
import {LayerConfigJson} from "./JSON/LayerConfigJson";
|
||||||
|
|
||||||
|
@ -56,7 +57,8 @@ export default class AllKnownLayers {
|
||||||
benches_at_pt,
|
benches_at_pt,
|
||||||
picnic_tables,
|
picnic_tables,
|
||||||
play_forest,
|
play_forest,
|
||||||
playground
|
playground,
|
||||||
|
sport_pitch
|
||||||
];
|
];
|
||||||
|
|
||||||
// Must be below the list...
|
// Must be below the list...
|
||||||
|
|
|
@ -23,6 +23,7 @@ import * as playgrounds from "../assets/themes/playgrounds/playgrounds.json"
|
||||||
import * as bicycle_lib from "../assets/themes/bicycle_library/bicycle_library.json"
|
import * as bicycle_lib from "../assets/themes/bicycle_library/bicycle_library.json"
|
||||||
import * as play_forests from "../assets/themes/play_forests/play_forests.json"
|
import * as play_forests from "../assets/themes/play_forests/play_forests.json"
|
||||||
import * as speelplekken from "../assets/themes/speelplekken/speelplekken.json"
|
import * as speelplekken from "../assets/themes/speelplekken/speelplekken.json"
|
||||||
|
import * as sport_pitches from "../assets/themes/sport_pitches/sport_pitches.json"
|
||||||
import LayerConfig from "./JSON/LayerConfig";
|
import LayerConfig from "./JSON/LayerConfig";
|
||||||
import LayoutConfig from "./JSON/LayoutConfig";
|
import LayoutConfig from "./JSON/LayoutConfig";
|
||||||
import AllKnownLayers from "./AllKnownLayers";
|
import AllKnownLayers from "./AllKnownLayers";
|
||||||
|
@ -73,7 +74,8 @@ export class AllKnownLayouts {
|
||||||
new LayoutConfig(playgrounds),
|
new LayoutConfig(playgrounds),
|
||||||
new LayoutConfig(trees),
|
new LayoutConfig(trees),
|
||||||
new LayoutConfig(play_forests) ,
|
new LayoutConfig(play_forests) ,
|
||||||
new LayoutConfig(speelplekken)
|
new LayoutConfig(speelplekken),
|
||||||
|
new LayoutConfig(sport_pitches)
|
||||||
];
|
];
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -78,6 +78,7 @@ Every field is documented in the source code itself - you can find them here:
|
||||||
- [The top level `LayoutConfig`](https://github.com/pietervdvn/MapComplete/blob/master/Customizations/JSON/LayoutConfigJson.ts)
|
- [The top level `LayoutConfig`](https://github.com/pietervdvn/MapComplete/blob/master/Customizations/JSON/LayoutConfigJson.ts)
|
||||||
- [A layer object `LayerConfig`](https://github.com/pietervdvn/MapComplete/blob/master/Customizations/JSON/LayerConfigJson.ts)
|
- [A layer object `LayerConfig`](https://github.com/pietervdvn/MapComplete/blob/master/Customizations/JSON/LayerConfigJson.ts)
|
||||||
- [The `TagRendering`](https://github.com/pietervdvn/MapComplete/blob/master/Customizations/JSON/TagRenderingConfigJson.ts)
|
- [The `TagRendering`](https://github.com/pietervdvn/MapComplete/blob/master/Customizations/JSON/TagRenderingConfigJson.ts)
|
||||||
|
- At last, the exact semantics of tags is documented [here](Docs/Tags_format.md)
|
||||||
|
|
||||||
## Some pitfalls
|
## Some pitfalls
|
||||||
|
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
|
|
||||||
# MapComplete
|
# MapComplete
|
||||||
|
|
||||||
> Let a thousand flowers bloom
|
> Let a thousand flowers bloom
|
||||||
|
@ -242,3 +243,5 @@ Urinal icon: https://thenounproject.com/term/urinal/1307984/
|
||||||
24/7 icon: https://www.vecteezy.com/vector-art/1394992-24-7-service-and-support-icon-set
|
24/7 icon: https://www.vecteezy.com/vector-art/1394992-24-7-service-and-support-icon-set
|
||||||
|
|
||||||
Translation-icon: https://commons.wikimedia.org/wiki/File:OOjs_UI_icon_language-ltr.svg
|
Translation-icon: https://commons.wikimedia.org/wiki/File:OOjs_UI_icon_language-ltr.svg
|
||||||
|
|
||||||
|
PingPong-table icon: Font Awesome Free 5.2.0 by @fontawesome - https://fontawesome.com
|
|
@ -1,24 +1,31 @@
|
||||||
{
|
{
|
||||||
"id": "playground",
|
"id": "playground",
|
||||||
"name": {
|
"name": {
|
||||||
"nl": "Speeltuinen"
|
"nl": "Speeltuinen",
|
||||||
|
"en": "Playgrounds"
|
||||||
},
|
},
|
||||||
"minzoom": 13,
|
"minzoom": 13,
|
||||||
"overpassTags": {
|
"overpassTags": {
|
||||||
"and": ["leisure=playground","playground!=forest"]
|
"and": [
|
||||||
|
"leisure=playground",
|
||||||
|
"playground!=forest"
|
||||||
|
]
|
||||||
},
|
},
|
||||||
"description": {
|
"description": {
|
||||||
"nl": "Speeltuinen en speelbossen"
|
"nl": "Speeltuinen",
|
||||||
|
"en": "Playgrounds"
|
||||||
},
|
},
|
||||||
"title": {
|
"title": {
|
||||||
"render": {
|
"render": {
|
||||||
"nl": "Speeltuin"
|
"nl": "Speeltuin",
|
||||||
|
"en": "Playground"
|
||||||
},
|
},
|
||||||
"mappings": [
|
"mappings": [
|
||||||
{
|
{
|
||||||
"if": "name~*",
|
"if": "name~*",
|
||||||
"then": {
|
"then": {
|
||||||
"nl": "Speeltuin <i>{name}</i>"
|
"nl": "Speeltuin <i>{name}</i>",
|
||||||
|
"en": "Playground <i>{name}</i>"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
@ -27,10 +34,12 @@
|
||||||
"images",
|
"images",
|
||||||
{
|
{
|
||||||
"question": {
|
"question": {
|
||||||
"nl": "Wat is de ondergrond van deze speeltuin?<br/><i>Indien er verschillende ondergronden zijn, neem de meest voorkomende</i>"
|
"nl": "Wat is de ondergrond van deze speeltuin?<br/><i>Indien er verschillende ondergronden zijn, neem de meest voorkomende</i>",
|
||||||
|
"en": "Which is the surface of this playground?<br/><i>If there are multiple, select the most occuring one</i>"
|
||||||
},
|
},
|
||||||
"render": {
|
"render": {
|
||||||
"nl": "De ondergrond is <b>{surface}</b>"
|
"nl": "De ondergrond is <b>{surface}</b>",
|
||||||
|
"en": "The surface is <b>{surface}</b>"
|
||||||
},
|
},
|
||||||
"freeform": {
|
"freeform": {
|
||||||
"key": "surface"
|
"key": "surface"
|
||||||
|
@ -38,23 +47,38 @@
|
||||||
"mappings": [
|
"mappings": [
|
||||||
{
|
{
|
||||||
"if": "surface=grass",
|
"if": "surface=grass",
|
||||||
"then": "De ondergrond is <b>gras</b>"
|
"then": {
|
||||||
|
"nl": "De ondergrond is <b>gras</b>",
|
||||||
|
"en": "The surface is <b>grass</b>"
|
||||||
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"if": "surface=sand",
|
"if": "surface=sand",
|
||||||
"then": "De ondergrond is <b>zand</b>"
|
"then": {
|
||||||
|
"nl": "De ondergrond is <b>zand</b>",
|
||||||
|
"en": "The surface is <b>sand</b>"
|
||||||
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"if": "surface=paving_stones",
|
"if": "surface=paving_stones",
|
||||||
"then": "De ondergrond bestaat uit <b>stoeptegels</b>"
|
"then": {
|
||||||
|
"nl": "De ondergrond bestaat uit <b>stoeptegels</b>",
|
||||||
|
"en": "The surface is <b>paving stones</b>"
|
||||||
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"if": "surface=asphalt",
|
"if": "surface=asphalt",
|
||||||
"then": "De ondergrond is <b>asfalt</b>"
|
"then": {
|
||||||
|
"nl": "De ondergrond is <b>asfalt</b>",
|
||||||
|
"en": "The surface is <b>asphalt</b>"
|
||||||
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"if": "surface=concrete",
|
"if": "surface=concrete",
|
||||||
"then": "De ondergrond is <b>beton</b>"
|
"then": {
|
||||||
|
"nl": "De ondergrond is <b>beton</b>",
|
||||||
|
"en": "The surface is <b>concrete</b>"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
|
|
228
assets/layers/sport_pitch/sport_pitch.json
Normal file
228
assets/layers/sport_pitch/sport_pitch.json
Normal file
|
@ -0,0 +1,228 @@
|
||||||
|
{
|
||||||
|
"id": "sport_pitch",
|
||||||
|
"name": {
|
||||||
|
"nl": "Sportterrein"
|
||||||
|
},
|
||||||
|
"wayHandling": 2,
|
||||||
|
"minzoom": 12,
|
||||||
|
"overpassTags": {
|
||||||
|
"and": [
|
||||||
|
"leisure=pitch"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"title": {
|
||||||
|
"render": {
|
||||||
|
"nl": "Sportterrein"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"description": {
|
||||||
|
"nl": "Een sportterrein"
|
||||||
|
},
|
||||||
|
"tagRenderings": [
|
||||||
|
"images",
|
||||||
|
{
|
||||||
|
"render": {
|
||||||
|
"nl": "Hier kan men {sport} beoefenen"
|
||||||
|
},
|
||||||
|
"freeform": {
|
||||||
|
"key": "sport"
|
||||||
|
},
|
||||||
|
"question": "Welke sporten kan men hier beoefenen?",
|
||||||
|
"multiAnswer": true,
|
||||||
|
"mappings": [
|
||||||
|
{
|
||||||
|
"if": {
|
||||||
|
"and": [
|
||||||
|
"sport=basketball"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"then": {
|
||||||
|
"nl": "Hier kan men basketbal spelen"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"if": {
|
||||||
|
"and": [
|
||||||
|
"sport=soccer"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"then": {
|
||||||
|
"nl": "Hier kan men voetbal spelen"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"if": {
|
||||||
|
"and": [
|
||||||
|
"sport=table_tennis"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"then": {
|
||||||
|
"nl": "Dit is een pingpongtafel"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"if": {
|
||||||
|
"and": [
|
||||||
|
"sport=tennis"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"then": {
|
||||||
|
"nl": "Hier kan men tennis spelen"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"if": {
|
||||||
|
"and": [
|
||||||
|
"sport=korfball"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"then": {
|
||||||
|
"nl": "Hier kan men korfbal spelen"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"if": {
|
||||||
|
"and": [
|
||||||
|
"sport=basket"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"then": {
|
||||||
|
"nl": "Hier kan men basketbal beoefenen"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},{
|
||||||
|
"question": {
|
||||||
|
"nl": "Wat is de ondergrond van dit sportveld?",
|
||||||
|
"en": "Which is the surface of this sport pitch?"
|
||||||
|
},
|
||||||
|
"render": {
|
||||||
|
"nl": "De ondergrond is <b>{surface}</b>",
|
||||||
|
"en": "The surface is <b>{surface}</b>"
|
||||||
|
},
|
||||||
|
"freeform": {
|
||||||
|
"key": "surface"
|
||||||
|
},
|
||||||
|
"mappings": [
|
||||||
|
{
|
||||||
|
"if": "surface=grass",
|
||||||
|
"then": {
|
||||||
|
"nl": "De ondergrond is <b>gras</b>",
|
||||||
|
"en": "The surface is <b>grass</b>"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"if": "surface=sand",
|
||||||
|
"then": {
|
||||||
|
"nl": "De ondergrond is <b>zand</b>",
|
||||||
|
"en": "The surface is <b>sand</b>"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"if": "surface=paving_stones",
|
||||||
|
"then": {
|
||||||
|
"nl": "De ondergrond bestaat uit <b>stoeptegels</b>",
|
||||||
|
"en": "The surface is <b>paving stones</b>"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"if": "surface=asphalt",
|
||||||
|
"then": {
|
||||||
|
"nl": "De ondergrond is <b>asfalt</b>",
|
||||||
|
"en": "The surface is <b>asphalt</b>"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"if": "surface=concrete",
|
||||||
|
"then": {
|
||||||
|
"nl": "De ondergrond is <b>beton</b>",
|
||||||
|
"en": "The surface is <b>concrete</b>"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"question": {
|
||||||
|
"nl": "Is dit sportterrein publiek toegankelijk?"
|
||||||
|
},
|
||||||
|
"mappings": [
|
||||||
|
{
|
||||||
|
"if": "access=public",
|
||||||
|
"then": "Publiek toegankelijk"
|
||||||
|
},
|
||||||
|
{"if": "access=limited",
|
||||||
|
"then": "Beperkt toegankelijk (enkel na reservatie, tijdens bepaalde uren, ...)"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"if": "access=members",
|
||||||
|
"then": "Enkel toegankelijk voor leden van de bijhorende sportclub"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"if": "access=private",
|
||||||
|
"then": "Privaat en niet toegankelijk"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"question": {
|
||||||
|
"nl": "Moet men reserveren om gebruik te maken van dit sportveld?"
|
||||||
|
},
|
||||||
|
"condition": {
|
||||||
|
"and": [ "access!=public", "access!=private", "access!=members"]},
|
||||||
|
"mappings": [
|
||||||
|
{
|
||||||
|
"if": "reservation=required",
|
||||||
|
"then": "Reserveren is verplicht om gebruik te maken van dit sportterrein"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"if": "reservation=recommended",
|
||||||
|
"then": "Reserveren is sterk aangeraden om gebruik te maken van dit sportterrein"
|
||||||
|
},
|
||||||
|
{"if": "reservation=yes",
|
||||||
|
"then": "Reserveren is mogelijk, maar geen voorwaarde"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"if": "reservation=no",
|
||||||
|
"then": "Reserveren is niet mogelijk"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"phone",
|
||||||
|
"email",
|
||||||
|
"questions",
|
||||||
|
{"render":"{reviews(name, sportpitch)}"}
|
||||||
|
],
|
||||||
|
"hideUnderlayingFeaturesMinPercentage": 0,
|
||||||
|
"icon": {
|
||||||
|
"render": "./assets/layers/sport_pitch/tabletennis.svg"
|
||||||
|
},
|
||||||
|
"width": {
|
||||||
|
"render": "8"
|
||||||
|
},
|
||||||
|
"iconSize": {
|
||||||
|
"render": "40,40,center"
|
||||||
|
},
|
||||||
|
"color": {
|
||||||
|
"render": "#00f"
|
||||||
|
},
|
||||||
|
"presets": [
|
||||||
|
{
|
||||||
|
"title": {
|
||||||
|
"nl": "Ping-pong tafel"
|
||||||
|
},
|
||||||
|
"tags": [
|
||||||
|
"leisure=pitch",
|
||||||
|
"sport=table_tennis"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"title": {
|
||||||
|
"nl": "Sportterrein"
|
||||||
|
},
|
||||||
|
"tags": [
|
||||||
|
"leisure=pitch",
|
||||||
|
"fixme=Toegevoegd met MapComplete, geometry nog uit te tekenen"
|
||||||
|
]
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
5
assets/layers/sport_pitch/tabletennis.svg
Normal file
5
assets/layers/sport_pitch/tabletennis.svg
Normal file
|
@ -0,0 +1,5 @@
|
||||||
|
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><path d="M496.2 296.5C527.7 218.7 512 126.2 449 63.1 365.1-21 229-21 145.1 63.1l-56 56.1 211.5 211.5c46.1-62.1 131.5-77.4 195.6-34.2zm-217.9 79.7L57.9 155.9c-27.3 45.3-21.7 105 17.3 144.1l34.5 34.6L6.7 424c-8.6 7.5-9.1 20.7-1 28.8l53.4 53.5c8 8.1 21.2 7.6 28.7-1L177.1 402l35.7 35.7c19.7 19.7 44.6 30.5 70.3 33.3-7.1-17-11-35.6-11-55.1-.1-13.8 2.5-27 6.2-39.7zM416 320c-53 0-96 43-96 96s43 96 96 96 96-43 96-96-43-96-96-96z"/></svg>
|
||||||
|
<!--
|
||||||
|
Font Awesome Free 5.2.0 by @fontawesome - https://fontawesome.com
|
||||||
|
License - https://fontawesome.com/license (Icons: CC BY 4.0, Fonts: SIL OFL 1.1, Code: MIT License)
|
||||||
|
-->
|
After Width: | Height: | Size: 669 B |
|
@ -12,8 +12,9 @@
|
||||||
"language": [
|
"language": [
|
||||||
"nl"
|
"nl"
|
||||||
],
|
],
|
||||||
"maintainer": "",
|
"maintainer": "MapComplete",
|
||||||
"icon": "./assets/layers/play_forest/icon.svg",
|
"icon": "./assets/layers/play_forest/icon.svg",
|
||||||
|
"hideInOverview": true,
|
||||||
"version": "0",
|
"version": "0",
|
||||||
"startLat": 51.16174,
|
"startLat": 51.16174,
|
||||||
"startLon": 4.449462,
|
"startLon": 4.449462,
|
||||||
|
@ -22,7 +23,8 @@
|
||||||
"socialImage": "",
|
"socialImage": "",
|
||||||
"layers": [
|
"layers": [
|
||||||
"play_forest",
|
"play_forest",
|
||||||
"playground"
|
"playground",
|
||||||
|
"sport_pitch"
|
||||||
],
|
],
|
||||||
"roamingRenderings": []
|
"roamingRenderings": []
|
||||||
}
|
}
|
27
assets/themes/sport_pitches/sport_pitches.json
Normal file
27
assets/themes/sport_pitches/sport_pitches.json
Normal file
|
@ -0,0 +1,27 @@
|
||||||
|
{
|
||||||
|
"id": "sport_pitches",
|
||||||
|
"title": {
|
||||||
|
"nl": "Sportvelden"
|
||||||
|
},
|
||||||
|
"shortDescription": {
|
||||||
|
"nl": "Deze kaart toont sportvelden"
|
||||||
|
},
|
||||||
|
"description": {
|
||||||
|
"nl": "Een sportveld is een ingerichte plaats met infrastructuur om een sport te beoefenen"
|
||||||
|
},
|
||||||
|
"language": [
|
||||||
|
"nl"
|
||||||
|
],
|
||||||
|
"maintainer": "",
|
||||||
|
"icon": "./assets/layers/sport_pitch/tabletennis.svg",
|
||||||
|
"version": "0",
|
||||||
|
"startLat": 0,
|
||||||
|
"startLon": 0,
|
||||||
|
"startZoom": 1,
|
||||||
|
"widenFactor": 0.05,
|
||||||
|
"socialImage": "",
|
||||||
|
"layers": [
|
||||||
|
"sport_pitch"
|
||||||
|
],
|
||||||
|
"roamingRenderings": []
|
||||||
|
}
|
Loading…
Reference in a new issue