Add playgrounds
This commit is contained in:
parent
ac6ab22724
commit
982ba2f6d6
5 changed files with 183 additions and 9 deletions
|
@ -18,6 +18,7 @@ import * as drinking_water from "../assets/themes/drinking_water/drinking_water.
|
|||
import * as climbing from "../assets/themes/climbing/climbing.json"
|
||||
import * as surveillance_cameras from "../assets/themes/surveillance_cameras/surveillance_cameras.json"
|
||||
import * as personal from "../assets/themes/personalLayout/personalLayout.json"
|
||||
import * as playgrounds from "../assets/themes/playgrounds/playgrounds.json"
|
||||
import LayerConfig from "./JSON/LayerConfig";
|
||||
import LayoutConfig from "./JSON/LayoutConfig";
|
||||
import SharedLayers from "./SharedLayers";
|
||||
|
@ -63,7 +64,8 @@ export class AllKnownLayouts {
|
|||
new LayoutConfig(buurtnatuur),
|
||||
new LayoutConfig(bike_monitoring_stations),
|
||||
new LayoutConfig(surveillance_cameras),
|
||||
new LayoutConfig(climbing)
|
||||
new LayoutConfig(climbing),
|
||||
new LayoutConfig(playgrounds)
|
||||
];
|
||||
|
||||
|
||||
|
|
|
@ -280,7 +280,7 @@ export default class MetaTagging {
|
|||
try {
|
||||
metatag.addMetaTags(features);
|
||||
} catch (e) {
|
||||
console.error("Could not calculate metatag ", metatag.keys.join(","), ":", e)
|
||||
console.error("Could not calculate metatag for ", metatag.keys.join(","), ":", e)
|
||||
|
||||
}
|
||||
}
|
||||
|
|
1
State.ts
1
State.ts
|
@ -25,7 +25,6 @@ export default class State {
|
|||
// The singleton of the global state
|
||||
public static state: State;
|
||||
|
||||
public static vNumber = "0.2.5g";
|
||||
|
||||
// The user journey states thresholds when a new feature gets unlocked
|
||||
public static userJourney = {
|
||||
|
|
|
@ -163,13 +163,14 @@ export default class SpecialVisualizations {
|
|||
{
|
||||
funcName: "reviews",
|
||||
docs: "Adds an overview of the mangrove-reviews of this object. IMPORTANT: the _name_ of the object should be defined for this to work!",
|
||||
args: [],
|
||||
args: [{name:"subject", doc:"The identifier used for this value; by default the name of the reviewed object"}],
|
||||
constr: (tags, args) => {
|
||||
const tgs = tags.data;
|
||||
if (tgs.name === undefined || tgs.name === "") {
|
||||
const subject = args[0] ?? tgs.name ?? "";
|
||||
if (subject === "") {
|
||||
return Translations.t.reviews.name_required;
|
||||
}
|
||||
const mangrove = MangroveReviews.Get(Number(tgs._lon), Number(tgs._lat), tgs.name,
|
||||
const mangrove = MangroveReviews.Get(Number(tgs._lon), Number(tgs._lat),subject,
|
||||
State.state.mangroveIdentity,
|
||||
State.state.osmConnection._dryRun
|
||||
);
|
||||
|
|
172
assets/themes/playgrounds/playgrounds.json
Normal file
172
assets/themes/playgrounds/playgrounds.json
Normal file
|
@ -0,0 +1,172 @@
|
|||
{
|
||||
"id": "playgrounds",
|
||||
"title": {
|
||||
"nl": "Speelzones"
|
||||
},
|
||||
"shortDescription": {
|
||||
"nl": "Speelzones en speeltuinen"
|
||||
},
|
||||
"description": {
|
||||
"nl": "Deze kaart toont speelzones in het groen"
|
||||
},
|
||||
"language": [
|
||||
"nl"
|
||||
],
|
||||
"maintainer": "",
|
||||
"icon": "https://upload.wikimedia.org/wikipedia/commons/0/00/Map_icons_by_Scott_de_Jonge_-_playground.svg",
|
||||
"version": "0",
|
||||
"startLat": 50.535,
|
||||
"startLon": 4.399,
|
||||
"startZoom": 10,
|
||||
"widenFactor": 0.05,
|
||||
"socialImage": "",
|
||||
"hideInoverview": true,
|
||||
"layers": [
|
||||
{
|
||||
"id": "playgrounds",
|
||||
"name": {
|
||||
"nl": "Speeltuinen"
|
||||
},
|
||||
"minzoom": 14,
|
||||
"overpassTags": {
|
||||
"and": [
|
||||
"leisure=playground"
|
||||
]
|
||||
},
|
||||
"title": {
|
||||
"render": {
|
||||
"nl": "Speeltuin"
|
||||
},
|
||||
"mappings": [
|
||||
{
|
||||
"if": {
|
||||
"and": [
|
||||
"name~*"
|
||||
]
|
||||
},
|
||||
"then": {
|
||||
"nl": "Speeltuin <i>{name}</i>"
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
"description": {
|
||||
"nl": "Alle speeltuinen"
|
||||
},
|
||||
"tagRenderings": [
|
||||
"images",
|
||||
{
|
||||
"question": {
|
||||
"nl": "Is deze speeltuin toegankelijk voor rolstoelgebruikers?"
|
||||
},
|
||||
"mappings": [
|
||||
{
|
||||
"if": {
|
||||
"and": [
|
||||
"wheelchair=yes"
|
||||
]
|
||||
},
|
||||
"then": {
|
||||
"nl": "Geheel toegankelijk voor rolstoelgebruikers"
|
||||
}
|
||||
},
|
||||
{
|
||||
"if": {
|
||||
"and": [
|
||||
"wheelchair=limited"
|
||||
]
|
||||
},
|
||||
"then": {
|
||||
"nl": "Beperkt toegankelijk voor rolstoelgebruikers"
|
||||
}
|
||||
},
|
||||
{
|
||||
"if": {
|
||||
"and": [
|
||||
"wheelchair=no"
|
||||
]
|
||||
},
|
||||
"then": {
|
||||
"nl": "Niet toegankelijk voor rolstoelgebruikers"
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"freeform": {
|
||||
"key": "opening_hours",
|
||||
"type": "opening_hours"
|
||||
},
|
||||
"question": {
|
||||
"nl": "Op welke uren is deze speeltuin toegankelijk?"
|
||||
},
|
||||
"mappings": [
|
||||
{
|
||||
"if": {
|
||||
"and": [
|
||||
"opening_hours=sunrise-sunset"
|
||||
]
|
||||
},
|
||||
"then": {
|
||||
"nl": "Van zonsopgang tot zonsondergang"
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"render": {
|
||||
"nl": "Toegankelijk vanaf {min_age} jaar oud"
|
||||
},
|
||||
"question": {
|
||||
"nl": "Wat is de minimale leeftijd om op deze speeltuin te mogen?"
|
||||
},
|
||||
"freeform": {
|
||||
"key": "min_age",
|
||||
"type": "pnat"
|
||||
}
|
||||
},
|
||||
{
|
||||
"render": {
|
||||
"nl": "Toegankelijk tot {max_age}"
|
||||
},
|
||||
"question": {
|
||||
"nl": "Wat is de maximaal toegestane leeftijd voor deze speeltuin?"
|
||||
},
|
||||
"freeform": {
|
||||
"key": "max_age",
|
||||
"type": "pnat"
|
||||
}
|
||||
},
|
||||
"questions",
|
||||
{
|
||||
"render": "{reviews(leisure=playground)}"
|
||||
}
|
||||
],
|
||||
"hideUnderlayingFeaturesMinPercentage": 0,
|
||||
"icon": {
|
||||
"render": "https://upload.wikimedia.org/wikipedia/commons/0/00/Map_icons_by_Scott_de_Jonge_-_playground.svg"
|
||||
},
|
||||
"width": {
|
||||
"render": "3"
|
||||
},
|
||||
"iconSize": {
|
||||
"render": "40,40,center"
|
||||
},
|
||||
"color": {
|
||||
"render": "#0c3"
|
||||
},
|
||||
"presets": [
|
||||
{
|
||||
"tags": [
|
||||
"leisure=playground"
|
||||
],
|
||||
"title": {
|
||||
"nl": "Speeltuin"
|
||||
}
|
||||
}
|
||||
],
|
||||
"wayHandling": 2
|
||||
}
|
||||
],
|
||||
"roamingRenderings": []
|
||||
}
|
Loading…
Reference in a new issue