Add minimaps to climbing layer + translation sync

This commit is contained in:
Pieter Vander Vennet 2021-06-24 02:35:55 +02:00
parent ce61923778
commit 7ca9ff4728
10 changed files with 106 additions and 66 deletions

View file

@ -130,6 +130,9 @@
"key": "name" "key": "name"
} }
}, },
{
"render": "{minimap(18): height: 5rem; overflow: hidden; border-radius:3rem; }"
},
"website", "website",
"email", "email",
"phone", "phone",
@ -241,6 +244,9 @@
"tagRenderings": [ "tagRenderings": [
"images", "images",
"questions", "questions",
{
"render": "{minimap(18): height: 5rem; overflow: hidden; border-radius:3rem; }"
},
{ {
"#": "name", "#": "name",
"render": { "render": {
@ -327,6 +333,9 @@
"tagRenderings": [ "tagRenderings": [
"images", "images",
"questions", "questions",
{
"render": "{minimap(18): height: 5rem; overflow: hidden; border-radius:3rem; }"
},
{ {
"#": "Name", "#": "Name",
"render": { "render": {
@ -507,7 +516,7 @@
{ {
"if": "climbing=crag", "if": "climbing=crag",
"then": { "then": {
"en": "Climbing crag" "en": "Climbing crag <b>{name}</b>"
} }
}, },
{ {
@ -553,6 +562,9 @@
"tagRenderings": [ "tagRenderings": [
"images", "images",
"questions", "questions",
{
"render": "{minimap(18, id, _contained_climbing_route_ids): height: 9rem; overflow: hidden; border-radius:3rem; }"
},
{ {
"#": "Contained routes length hist", "#": "Contained routes length hist",
"render": { "render": {
@ -702,6 +714,7 @@
"calculatedTags": [ "calculatedTags": [
"_contained_climbing_routes_properties=feat.overlapWith('climbing_route').map(f => f.feat.properties).map(p => {return {id: p.id, name: p.name, 'climbing:grade:french': p['climbing:grade:french'], 'climbing:length': p['climbing:length']} })", "_contained_climbing_routes_properties=feat.overlapWith('climbing_route').map(f => f.feat.properties).map(p => {return {id: p.id, name: p.name, 'climbing:grade:french': p['climbing:grade:french'], 'climbing:length': p['climbing:length']} })",
"_contained_climbing_routes=JSON.parse(feat.properties._contained_climbing_routes_properties ?? '[]').map(p => `<li><a href='#${p.id}'>${p.name ?? 'climbing route'}</a> (<b>${p['climbing:grade:french'] ?? 'unknown difficulty'}</b>, ${p['climbing:length'] ?? 'unkown length'} meter)</li>`).join('')", "_contained_climbing_routes=JSON.parse(feat.properties._contained_climbing_routes_properties ?? '[]').map(p => `<li><a href='#${p.id}'>${p.name ?? 'climbing route'}</a> (<b>${p['climbing:grade:french'] ?? 'unknown difficulty'}</b>, ${p['climbing:length'] ?? 'unkown length'} meter)</li>`).join('')",
"_contained_climbing_route_ids=JSON.parse(feat.properties._contained_climbing_routes_properties ?? '[]').map(p => p.id)",
"_difficulty_hist=JSON.parse(feat.properties._contained_climbing_routes_properties ?? '[]').map(p => p['climbing:grade:french'])", "_difficulty_hist=JSON.parse(feat.properties._contained_climbing_routes_properties ?? '[]').map(p => p['climbing:grade:french'])",
"_length_hist=JSON.parse(feat.properties._contained_climbing_routes_properties ?? '[]').map(p => p['climbing:length'])", "_length_hist=JSON.parse(feat.properties._contained_climbing_routes_properties ?? '[]').map(p => p['climbing:length'])",
"_contained_climbing_routes_count=JSON.parse(_contained_climbing_routes).length" "_contained_climbing_routes_count=JSON.parse(_contained_climbing_routes).length"
@ -751,6 +764,9 @@
"nb_NO": "En klatremulighet?" "nb_NO": "En klatremulighet?"
}, },
"tagRenderings": [ "tagRenderings": [
{
"render": "{minimap(18): height: 5rem; overflow: hidden; border-radius:3rem; }"
},
{ {
"render": { "render": {
"en": "<strong>{name}</strong>", "en": "<strong>{name}</strong>",

View file

@ -14,28 +14,28 @@
}, },
"1": { "1": {
"tagRenderings": { "tagRenderings": {
"2": { "3": {
"render": "<strong>{name}</strong>" "render": "<strong>{name}</strong>"
} }
} }
}, },
"2": { "2": {
"tagRenderings": { "tagRenderings": {
"2": { "3": {
"render": "<strong>{name}</strong>" "render": "<strong>{name}</strong>"
} }
} }
}, },
"3": { "3": {
"tagRenderings": { "tagRenderings": {
"5": { "6": {
"render": "<strong>{name}</strong>" "render": "<strong>{name}</strong>"
} }
} }
}, },
"4": { "4": {
"tagRenderings": { "tagRenderings": {
"0": { "1": {
"render": "<strong>{name}</strong>" "render": "<strong>{name}</strong>"
} }
} }

View file

@ -136,7 +136,7 @@
}, },
"description": "Eine Kletterhalle", "description": "Eine Kletterhalle",
"tagRenderings": { "tagRenderings": {
"2": { "3": {
"render": "<strong>{name}</strong>", "render": "<strong>{name}</strong>",
"question": "Wie heißt diese Kletterhalle?" "question": "Wie heißt diese Kletterhalle?"
} }
@ -153,7 +153,7 @@
} }
}, },
"tagRenderings": { "tagRenderings": {
"2": { "3": {
"render": "<strong>{name}</strong>", "render": "<strong>{name}</strong>",
"question": "Wie heißt diese Kletterroute?", "question": "Wie heißt diese Kletterroute?",
"mappings": { "mappings": {
@ -162,10 +162,10 @@
} }
} }
}, },
"3": {
"render": "Diese Route ist {climbing:length} Meter lang"
},
"4": { "4": {
"render": "Diese Route ist {canonical(climbing:length)} lang"
},
"5": {
"render": "Die Schwierigkeit ist {climbing:grade:french} entsprechend des französisch/belgischen Systems" "render": "Die Schwierigkeit ist {climbing:grade:french} entsprechend des französisch/belgischen Systems"
} }
} }
@ -177,7 +177,7 @@
}, },
"description": "Eine Klettergelegenheit", "description": "Eine Klettergelegenheit",
"tagRenderings": { "tagRenderings": {
"5": { "6": {
"render": "<strong>{name}</strong>", "render": "<strong>{name}</strong>",
"question": "Wie heißt diese Klettergelegenheit?", "question": "Wie heißt diese Klettergelegenheit?",
"mappings": { "mappings": {
@ -201,10 +201,10 @@
}, },
"description": "Eine Klettergelegenheit?", "description": "Eine Klettergelegenheit?",
"tagRenderings": { "tagRenderings": {
"0": { "1": {
"render": "<strong>{name}</strong>" "render": "<strong>{name}</strong>"
}, },
"1": { "2": {
"question": "Kann hier geklettert werden?", "question": "Kann hier geklettert werden?",
"mappings": { "mappings": {
"0": { "0": {
@ -226,7 +226,7 @@
"question": "Gibt es eine (inoffizielle) Website mit mehr Informationen (z.B. Topos)?" "question": "Gibt es eine (inoffizielle) Website mit mehr Informationen (z.B. Topos)?"
}, },
"4": { "4": {
"render": "Die Routen sind durchschnittlich <b>{climbing:length}m</b> lang", "render": "Die Routen sind durchschnittlich <b>{canonical(climbing:length)}</b> lang",
"question": "Wie lang sind die Routen (durchschnittlich) in Metern?" "question": "Wie lang sind die Routen (durchschnittlich) in Metern?"
}, },
"5": { "5": {

View file

@ -407,7 +407,7 @@
}, },
"description": "A climbing gym", "description": "A climbing gym",
"tagRenderings": { "tagRenderings": {
"2": { "3": {
"render": "<strong>{name}</strong>", "render": "<strong>{name}</strong>",
"question": "What is the name of this climbing gym?" "question": "What is the name of this climbing gym?"
} }
@ -424,7 +424,7 @@
} }
}, },
"tagRenderings": { "tagRenderings": {
"2": { "3": {
"render": "<strong>{name}</strong>", "render": "<strong>{name}</strong>",
"question": "What is the name of this climbing route?", "question": "What is the name of this climbing route?",
"mappings": { "mappings": {
@ -433,15 +433,15 @@
} }
} }
}, },
"3": {
"question": "How long is this climbing route (in meters)?",
"render": "This route is {climbing:length} meter long"
},
"4": { "4": {
"question": "How long is this climbing route (in meters)?",
"render": "This route is {canonical(climbing:length)} long"
},
"5": {
"question": "What is the difficulty of this climbing route according to the french/belgian system?", "question": "What is the difficulty of this climbing route according to the french/belgian system?",
"render": "The difficulty is {climbing:grade:french} according to the french/belgian system" "render": "The difficulty is {climbing:grade:french} according to the french/belgian system"
}, },
"5": { "6": {
"question": "How much bolts does this route have before reaching the moulinette?", "question": "How much bolts does this route have before reaching the moulinette?",
"render": "This route has {climbing:bolts} bolts", "render": "This route has {climbing:bolts} bolts",
"mappings": { "mappings": {
@ -453,7 +453,7 @@
} }
} }
}, },
"7": { "8": {
"render": "The rock type is {_embedding_features_with_rock:rock} as stated <a href='#{_embedding_features_with_rock:id}'>on the surrounding crag</a>" "render": "The rock type is {_embedding_features_with_rock:rock} as stated <a href='#{_embedding_features_with_rock:id}'>on the surrounding crag</a>"
} }
}, },
@ -469,7 +469,7 @@
"render": "Climbing opportunity", "render": "Climbing opportunity",
"mappings": { "mappings": {
"0": { "0": {
"then": "Climbing crag" "then": "Climbing crag <b>{name}</b>"
}, },
"1": { "1": {
"then": "Climbing area <b>{name}</b>" "then": "Climbing area <b>{name}</b>"
@ -484,16 +484,16 @@
}, },
"description": "A climbing opportunity", "description": "A climbing opportunity",
"tagRenderings": { "tagRenderings": {
"2": { "3": {
"render": "<h3>Length overview</h3>{histogram(_length_hist)}" "render": "<h3>Length overview</h3>{histogram(_length_hist)}"
}, },
"3": { "4": {
"render": "<h3>Difficulties overview</h3>{histogram(_difficulty_hist)}" "render": "<h3>Difficulties overview</h3>{histogram(_difficulty_hist)}"
}, },
"4": { "5": {
"render": "<h3>Contains {_contained_climbing_routes_count} routes</h3> <ul>{_contained_climbing_routes}</ul>" "render": "<h3>Contains {_contained_climbing_routes_count} routes</h3> <ul>{_contained_climbing_routes}</ul>"
}, },
"5": { "6": {
"render": "<strong>{name}</strong>", "render": "<strong>{name}</strong>",
"question": "What is the name of this climbing opportunity?", "question": "What is the name of this climbing opportunity?",
"mappings": { "mappings": {
@ -502,7 +502,7 @@
} }
} }
}, },
"6": { "7": {
"mappings": { "mappings": {
"0": { "0": {
"then": "A climbing boulder - a single rock or cliff with one or a few climbing routes which can be climbed safely without rope" "then": "A climbing boulder - a single rock or cliff with one or a few climbing routes which can be climbed safely without rope"
@ -512,7 +512,7 @@
} }
} }
}, },
"7": { "8": {
"question": "What is the rock type here?", "question": "What is the rock type here?",
"render": "The rock type is {rock}", "render": "The rock type is {rock}",
"mappings": { "mappings": {
@ -536,10 +536,10 @@
}, },
"description": "A climbing opportunity?", "description": "A climbing opportunity?",
"tagRenderings": { "tagRenderings": {
"0": { "1": {
"render": "<strong>{name}</strong>" "render": "<strong>{name}</strong>"
}, },
"1": { "2": {
"question": "Is climbing possible here?", "question": "Is climbing possible here?",
"mappings": { "mappings": {
"0": { "0": {
@ -556,6 +556,18 @@
} }
} }
}, },
"units": {
"0": {
"applicableUnits": {
"0": {
"human": " meter"
},
"1": {
"human": " feet"
}
}
}
},
"roamingRenderings": { "roamingRenderings": {
"0": { "0": {
"question": "Is there a (unofficial) website with more informations (e.g. topos)?" "question": "Is there a (unofficial) website with more informations (e.g. topos)?"
@ -594,7 +606,7 @@
} }
}, },
"4": { "4": {
"render": "The routes are <b>{climbing:length}m</b> long on average", "render": "The routes are <b>{canonical(climbing:length)}</b> long on average",
"question": "What is the (average) length of the routes in meters?" "question": "What is the (average) length of the routes in meters?"
}, },
"5": { "5": {

View file

@ -151,28 +151,28 @@
}, },
"1": { "1": {
"tagRenderings": { "tagRenderings": {
"2": { "3": {
"render": "<strong>{name}</strong>" "render": "<strong>{name}</strong>"
} }
} }
}, },
"2": { "2": {
"tagRenderings": { "tagRenderings": {
"2": { "3": {
"render": "<strong>{name}</strong>" "render": "<strong>{name}</strong>"
} }
} }
}, },
"3": { "3": {
"tagRenderings": { "tagRenderings": {
"5": { "6": {
"render": "<strong>{name}</strong>" "render": "<strong>{name}</strong>"
} }
} }
}, },
"4": { "4": {
"tagRenderings": { "tagRenderings": {
"0": { "1": {
"render": "<strong>{name}</strong>" "render": "<strong>{name}</strong>"
} }
} }

View file

@ -97,28 +97,28 @@
}, },
"1": { "1": {
"tagRenderings": { "tagRenderings": {
"2": { "3": {
"render": "<strong>{name}</strong>" "render": "<strong>{name}</strong>"
} }
} }
}, },
"2": { "2": {
"tagRenderings": { "tagRenderings": {
"2": { "3": {
"render": "<strong>{name}</strong>" "render": "<strong>{name}</strong>"
} }
} }
}, },
"3": { "3": {
"tagRenderings": { "tagRenderings": {
"5": { "6": {
"render": "<strong>{name}</strong>" "render": "<strong>{name}</strong>"
} }
} }
}, },
"4": { "4": {
"tagRenderings": { "tagRenderings": {
"0": { "1": {
"render": "<strong>{name}</strong>" "render": "<strong>{name}</strong>"
} }
} }

View file

@ -407,7 +407,7 @@
}, },
"description": "クライミングジム", "description": "クライミングジム",
"tagRenderings": { "tagRenderings": {
"2": { "3": {
"render": "<strong>{name}</strong>", "render": "<strong>{name}</strong>",
"question": "このクライミングジムは何という名前ですか?" "question": "このクライミングジムは何という名前ですか?"
} }
@ -424,7 +424,7 @@
} }
}, },
"tagRenderings": { "tagRenderings": {
"2": { "3": {
"render": "<strong>{name}</strong>", "render": "<strong>{name}</strong>",
"question": "この登坂ルートの名前は何ですか?", "question": "この登坂ルートの名前は何ですか?",
"mappings": { "mappings": {
@ -433,10 +433,10 @@
} }
} }
}, },
"3": {
"render": "このルート長は、 {climbing:length} メーターです"
},
"4": { "4": {
"render": "このルート長は、 {canonical(climbing:length)} メーターです"
},
"5": {
"render": "フランス/ベルギーのランク評価システムによると、{climbing:grade:french}の困難度です" "render": "フランス/ベルギーのランク評価システムによると、{climbing:grade:french}の困難度です"
} }
} }
@ -448,7 +448,7 @@
}, },
"description": "登坂教室", "description": "登坂教室",
"tagRenderings": { "tagRenderings": {
"5": { "6": {
"render": "<strong>{name}</strong>", "render": "<strong>{name}</strong>",
"question": "この登坂教室の名前は何ですか?", "question": "この登坂教室の名前は何ですか?",
"mappings": { "mappings": {
@ -472,10 +472,10 @@
}, },
"description": "登坂教室?", "description": "登坂教室?",
"tagRenderings": { "tagRenderings": {
"0": { "1": {
"render": "<strong>{name}</strong>" "render": "<strong>{name}</strong>"
}, },
"1": { "2": {
"question": "ここで登坂はできますか?", "question": "ここで登坂はできますか?",
"mappings": { "mappings": {
"0": { "0": {
@ -497,7 +497,7 @@
"question": "もっと情報のある(非公式の)ウェブサイトはありますか(例えば、topos)?" "question": "もっと情報のある(非公式の)ウェブサイトはありますか(例えば、topos)?"
}, },
"4": { "4": {
"render": "ルートの長さは平均で<b>{climbing:length} m</b>です", "render": "ルートの長さは平均で<b>{canonical(climbing:length)}</b>です",
"question": "ルートの(平均)長さはメートル単位でいくつですか?" "question": "ルートの(平均)長さはメートル単位でいくつですか?"
}, },
"5": { "5": {

View file

@ -158,8 +158,8 @@
"render": "Klatrerute" "render": "Klatrerute"
}, },
"tagRenderings": { "tagRenderings": {
"3": { "4": {
"render": "Denne ruten er {climbing:length} meter lang" "render": "Denne ruten er {canonical(climbing:length)} lang"
} }
} }
}, },
@ -182,7 +182,7 @@
}, },
"description": "En klatremulighet?", "description": "En klatremulighet?",
"tagRenderings": { "tagRenderings": {
"1": { "2": {
"question": "Er klatring mulig her?", "question": "Er klatring mulig her?",
"mappings": { "mappings": {
"0": { "0": {

View file

@ -286,7 +286,7 @@
} }
}, },
"tagRenderings": { "tagRenderings": {
"2": { "3": {
"render": "<strong>{name}</strong>", "render": "<strong>{name}</strong>",
"question": "Wat is de naam van dit Klimzaal?" "question": "Wat is de naam van dit Klimzaal?"
} }
@ -303,7 +303,7 @@
} }
}, },
"tagRenderings": { "tagRenderings": {
"2": { "3": {
"render": "<strong>{name}</strong>", "render": "<strong>{name}</strong>",
"question": "Hoe heet deze klimroute?", "question": "Hoe heet deze klimroute?",
"mappings": { "mappings": {
@ -312,11 +312,11 @@
} }
} }
}, },
"3": {
"question": "Hoe lang is deze klimroute (in meters)?",
"render": "Deze klimroute is {climbing:length} meter lang"
},
"4": { "4": {
"question": "Hoe lang is deze klimroute (in meters)?",
"render": "Deze klimroute is {canonical(climbing:length)} lang"
},
"5": {
"question": "Hoe moeilijk is deze klimroute volgens het Franse/Belgische systeem?", "question": "Hoe moeilijk is deze klimroute volgens het Franse/Belgische systeem?",
"render": "De klimmoeilijkheid is {climbing:grade:french} volgens het Franse/Belgische systeem" "render": "De klimmoeilijkheid is {climbing:grade:french} volgens het Franse/Belgische systeem"
} }
@ -340,7 +340,7 @@
}, },
"description": "Een klimgelegenheid", "description": "Een klimgelegenheid",
"tagRenderings": { "tagRenderings": {
"5": { "6": {
"render": "<strong>{name}</strong>", "render": "<strong>{name}</strong>",
"question": "Wat is de naam van dit Klimgelegenheid?", "question": "Wat is de naam van dit Klimgelegenheid?",
"mappings": { "mappings": {
@ -349,7 +349,7 @@
} }
} }
}, },
"7": { "8": {
"mappings": { "mappings": {
"0": { "0": {
"then": "Kalksteen" "then": "Kalksteen"
@ -371,7 +371,7 @@
}, },
"description": "Een klimgelegenheid?", "description": "Een klimgelegenheid?",
"tagRenderings": { "tagRenderings": {
"1": { "2": {
"mappings": { "mappings": {
"0": { "0": {
"then": "Klimmen is hier niet mogelijk" "then": "Klimmen is hier niet mogelijk"
@ -387,6 +387,18 @@
} }
} }
}, },
"units": {
"0": {
"applicableUnits": {
"0": {
"human": " meter"
},
"1": {
"human": " voet"
}
}
}
},
"roamingRenderings": { "roamingRenderings": {
"0": { "0": {
"question": "Is er een (onofficiële) website met meer informatie (b.v. met topos)?" "question": "Is er een (onofficiële) website met meer informatie (b.v. met topos)?"
@ -402,7 +414,7 @@
} }
}, },
"4": { "4": {
"render": "De klimroutes zijn gemiddeld <b>{climbing:length}m</b> lang", "render": "De klimroutes zijn gemiddeld <b>{canonical(climbing:length)}</b> lang",
"question": "Wat is de (gemiddelde) lengte van de klimroutes, in meter?" "question": "Wat is de (gemiddelde) lengte van de klimroutes, in meter?"
}, },
"5": { "5": {

View file

@ -336,28 +336,28 @@
}, },
"1": { "1": {
"tagRenderings": { "tagRenderings": {
"2": { "3": {
"render": "<strong>{name}</strong>" "render": "<strong>{name}</strong>"
} }
} }
}, },
"2": { "2": {
"tagRenderings": { "tagRenderings": {
"2": { "3": {
"render": "<strong>{name}</strong>" "render": "<strong>{name}</strong>"
} }
} }
}, },
"3": { "3": {
"tagRenderings": { "tagRenderings": {
"5": { "6": {
"render": "<strong>{name}</strong>" "render": "<strong>{name}</strong>"
} }
} }
}, },
"4": { "4": {
"tagRenderings": { "tagRenderings": {
"0": { "1": {
"render": "<strong>{name}</strong>" "render": "<strong>{name}</strong>"
} }
} }