forked from MapComplete/MapComplete
		
	Add more questions to the elevator theme
This commit is contained in:
		
							parent
							
								
									e74b9022bf
								
							
						
					
					
						commit
						616c7afab0
					
				
					 5 changed files with 139 additions and 8 deletions
				
			
		|  | @ -521,6 +521,10 @@ export class ValidateLayer extends DesugaringStep<LayerConfigJson> { | ||||||
|             } |             } | ||||||
|         } |         } | ||||||
|          |          | ||||||
|  |         if(json.title === undefined && json.tagRenderings !== undefined){ | ||||||
|  |             warnings.push(context + ": this layer does not have a title defined but it does have tagRenderings. Not having a title will disable the popups, resulting in an unclickable element.") | ||||||
|  |         } | ||||||
|  | 
 | ||||||
|         if (json["builtin"] !== undefined) { |         if (json["builtin"] !== undefined) { | ||||||
|             errors.push(context + ": This layer hasn't been expanded: " + json) |             errors.push(context + ": This layer hasn't been expanded: " + json) | ||||||
|             return { |             return { | ||||||
|  |  | ||||||
|  | @ -7,12 +7,39 @@ | ||||||
|     "osmTags": "highway=elevator" |     "osmTags": "highway=elevator" | ||||||
|   }, |   }, | ||||||
|   "minzoom": 13, |   "minzoom": 13, | ||||||
|  |   "title": { | ||||||
|  |     "en": "Elevator" | ||||||
|  |   }, | ||||||
|   "tagRenderings": [ |   "tagRenderings": [ | ||||||
|     "images", |     "images", | ||||||
|  |     { | ||||||
|  |       "id": "operational_status", | ||||||
|  |       "mappings": [ | ||||||
|  |         { | ||||||
|  |           "if": "operational_status=broken", | ||||||
|  |           "then": { | ||||||
|  |             "en": "This elevator is broken" | ||||||
|  |           } | ||||||
|  |         }, | ||||||
|  |         { | ||||||
|  |           "if": "operational_status=ok", | ||||||
|  |           "then": { | ||||||
|  |             "en": "This elevator works" | ||||||
|  |           } | ||||||
|  |         }, | ||||||
|  |         { | ||||||
|  |           "if": "operational_status=", | ||||||
|  |           "then": { | ||||||
|  |             "en": "This elevator works" | ||||||
|  |           }, | ||||||
|  |           "hideInAnswer": true | ||||||
|  |         } | ||||||
|  |       ] | ||||||
|  |     }, | ||||||
|     { |     { | ||||||
|       "id": "door-width", |       "id": "door-width", | ||||||
|       "render": { |       "render": { | ||||||
|         "en": "This elevator's doors have a width of {canonical(door:width) }" |         "en": "This elevator's doors have a width of {canonical(door:width)}" | ||||||
|       }, |       }, | ||||||
|       "question": { |       "question": { | ||||||
|         "en": "What is the width of this elevator's entrance?" |         "en": "What is the width of this elevator's entrance?" | ||||||
|  | @ -25,7 +52,7 @@ | ||||||
|     { |     { | ||||||
|       "id": "elevator-width", |       "id": "elevator-width", | ||||||
|       "render": { |       "render": { | ||||||
|         "en": "This elevator has a width of {canonical(elevator:width) }" |         "en": "This elevator has a width of {canonical(elevator:width)}" | ||||||
|       }, |       }, | ||||||
|       "question": { |       "question": { | ||||||
|         "en": "What is the width of this elevator?" |         "en": "What is the width of this elevator?" | ||||||
|  | @ -38,7 +65,7 @@ | ||||||
|     { |     { | ||||||
|       "id": "elevator-depth", |       "id": "elevator-depth", | ||||||
|       "render": { |       "render": { | ||||||
|         "en": "This elevator has a depth of {canonical(elevator:depth) }" |         "en": "This elevator has a depth of {canonical(elevator:depth)}" | ||||||
|       }, |       }, | ||||||
|       "question": { |       "question": { | ||||||
|         "en": "What is the depth of this elevator?" |         "en": "What is the depth of this elevator?" | ||||||
|  | @ -47,12 +74,13 @@ | ||||||
|         "key": "elevator:depth", |         "key": "elevator:depth", | ||||||
|         "type": "pfloat" |         "type": "pfloat" | ||||||
|       } |       } | ||||||
|     } |     }, | ||||||
|  |     "induction-loop" | ||||||
|   ], |   ], | ||||||
|   "mapRendering": [ |   "mapRendering": [ | ||||||
|     { |     { | ||||||
|       "icon": { |       "icon": { | ||||||
|         "render": "./assets/layers/elevator/elevator_wheelchair.svg" |         "render": "circle:white;./assets/layers/elevator/elevator_wheelchair.svg" | ||||||
|       }, |       }, | ||||||
|       "iconSize": "40,40,bottom", |       "iconSize": "40,40,bottom", | ||||||
|       "location": [ |       "location": [ | ||||||
|  |  | ||||||
|  | @ -1 +1,55 @@ | ||||||
| <svg id="Layer_1" data-name="Layer 1" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 228.57 239.29"><defs><style>.cls-1{fill:#1d1d1b;}</style></defs><path class="cls-1" d="M208.18,119.08V11.93c0-5.24,0-5.24,5.15-5.24,2.43,0,4.87,0,7.31,0,2.05,0,3.12.76,3,2.92-.07,1.13,0,2.27,0,3.4q0,106.5,0,213c0,.69-.06,1.39,0,2.09.13,1.9-.73,2.68-2.62,2.64-3.39-.05-6.79,0-10.19,0-1.84,0-2.73-.76-2.66-2.67s0-4,0-6Z"/><path class="cls-1" d="M20,119.06V226.75c0,3.9,0,3.92-3.91,4-3,0-5.93-.05-8.89,0-1.76,0-2.58-.7-2.55-2.47s0-3.31,0-5q0-106.12,0-212.25c0-4.17.22-4.39,4.45-4.36,2.52,0,5.05.08,7.58,0,2.26-.09,3.47.67,3.32,3.13-.1,1.47,0,3,0,4.44q0,52.41,0,104.82Z"/><path class="cls-1" d="M135.46,156.52a4.35,4.35,0,0,0-4.86-3.21,12.64,12.64,0,0,0-2.44.73c-2.07.72-4.13,1.47-6.22,2.21l-.26-.54q-1.94-4.52-3.88-9c-1.77-4.11-3.53-8.22-5.32-12.31a4.21,4.21,0,0,0-4.06-2.71c-4.84-.06-9.68-.07-14.52-.11L81,131.46c-.18,0-.5-.09-.52-.19-.16-.78-.27-1.58-.4-2.42H99.2c.35,0,.69,0,1,0a4.41,4.41,0,0,0,3.41-6.75,4.58,4.58,0,0,0-4.22-2.1q-10,0-20,0h-.72c-.52-3.24-1-6.39-1.54-9.56h-9c.55,3.45,1.11,6.9,1.66,10.35.83,5.11,1.71,10.2,2.47,15.32a4.76,4.76,0,0,0,4.92,4.29c9.22,0,18.45.11,27.68.15a.86.86,0,0,1,.91.61q4.72,11.05,9.48,22.08a4.49,4.49,0,0,0,6.12,2.69c3.69-1.31,7.39-2.61,11.07-3.95a6.74,6.74,0,0,0,1.67-1,4.71,4.71,0,0,0,1.49-2.56v-1.48C135.55,156.8,135.5,156.66,135.46,156.52Z"/><path class="cls-1" d="M53.61,145.09c.2-1.23.33-2.47.59-3.69a26.58,26.58,0,0,1,6.42-12.56,4.42,4.42,0,0,1,6.63,5.85,18.7,18.7,0,0,0-4.46,8.95,18.32,18.32,0,0,0,34.75,10.84,4.62,4.62,0,0,1,3.67-3,4.41,4.41,0,0,1,4.76,5.84,23.53,23.53,0,0,1-3.45,6.12,26.77,26.77,0,0,1-14.83,10c-1.46.38-3,.53-4.47.79l-.56.11H78.9c-.14,0-.29-.08-.43-.1a34.79,34.79,0,0,1-3.7-.6c-11-2.89-17.86-9.91-20.58-20.95-.29-1.19-.39-2.43-.58-3.64Z"/><ellipse class="cls-1" cx="72.62" cy="109.74" rx="4.51" ry="3.94"/><circle class="cls-1" cx="71.76" cy="95.49" r="8.93"/><path class="cls-1" d="M157.33,131.79H154v1.75q0,18,0,36c0,2.4-1,3.89-2.94,4.52a4.17,4.17,0,0,1-5.43-3.17,10.86,10.86,0,0,1-.13-2q0-31,0-61.93v-2.49h-2c0,.48-.07,1-.07,1.47,0,7.32,0,14.65,0,22,0,2.28-1.42,3.66-3.4,3.39a3,3,0,0,1-2.63-3.33c0-5.24,0-10.47,0-15.7,0-4.38,0-8.75,0-13.13,0-5.09,2.76-7.89,7.83-7.92q10.48-.06,21,0c4.89,0,7.67,2.88,7.67,7.77q0,14.49,0,29c0,2.3-1.56,3.7-3.6,3.31-1.57-.3-2.41-1.44-2.41-3.35q0-10.84,0-21.69v-1.76h-2v1.76q0,31.32,0,62.64a10.81,10.81,0,0,1-.17,2.13,4.23,4.23,0,0,1-4.41,3.27,4.18,4.18,0,0,1-3.9-4c0-2.95,0-5.9,0-8.84V131.79Z"/><path class="cls-1" d="M155.74,89.56a9,9,0,0,1-9.1-9,9,9,0,0,1,18,0A9,9,0,0,1,155.74,89.56Z"/><path class="cls-1" d="M191.93,36.94h-71V24.12h10l-17-17-17,17h10V36.94h-71a5.83,5.83,0,0,0-5.83,5.83V197.05a5.83,5.83,0,0,0,5.83,5.83h71V215.7h-10l17,17,17-17h-10V202.88h71a5.83,5.83,0,0,0,5.83-5.83V42.77A5.83,5.83,0,0,0,191.93,36.94Zm-7.5,147a5.83,5.83,0,0,1-5.83,5.84H49.22a5.83,5.83,0,0,1-5.83-5.84V56a5.83,5.83,0,0,1,5.83-5.83H178.6A5.83,5.83,0,0,1,184.43,56Z"/></svg> | <?xml version="1.0" encoding="UTF-8" standalone="no"?> | ||||||
|  | <svg | ||||||
|  |    id="Layer_1" | ||||||
|  |    data-name="Layer 1" | ||||||
|  |    viewBox="0 0 228.57 239.29" | ||||||
|  |    version="1.1" | ||||||
|  |    xmlns="http://www.w3.org/2000/svg" | ||||||
|  |    xmlns:svg="http://www.w3.org/2000/svg"> | ||||||
|  |   <defs | ||||||
|  |      id="defs4"> | ||||||
|  |     <style | ||||||
|  |        id="style2">.cls-1{fill:#1d1d1b;}</style> | ||||||
|  |   </defs> | ||||||
|  |   <path | ||||||
|  |      class="cls-1" | ||||||
|  |      d="M208.18,119.08V11.93c0-5.24,0-5.24,5.15-5.24,2.43,0,4.87,0,7.31,0,2.05,0,3.12.76,3,2.92-.07,1.13,0,2.27,0,3.4q0,106.5,0,213c0,.69-.06,1.39,0,2.09.13,1.9-.73,2.68-2.62,2.64-3.39-.05-6.79,0-10.19,0-1.84,0-2.73-.76-2.66-2.67s0-4,0-6Z" | ||||||
|  |      id="path6" /> | ||||||
|  |   <path | ||||||
|  |      class="cls-1" | ||||||
|  |      d="M20,119.06V226.75c0,3.9,0,3.92-3.91,4-3,0-5.93-.05-8.89,0-1.76,0-2.58-.7-2.55-2.47s0-3.31,0-5q0-106.12,0-212.25c0-4.17.22-4.39,4.45-4.36,2.52,0,5.05.08,7.58,0,2.26-.09,3.47.67,3.32,3.13-.1,1.47,0,3,0,4.44q0,52.41,0,104.82Z" | ||||||
|  |      id="path8" /> | ||||||
|  |   <path | ||||||
|  |      class="cls-1" | ||||||
|  |      d="M135.46,156.52a4.35,4.35,0,0,0-4.86-3.21,12.64,12.64,0,0,0-2.44.73c-2.07.72-4.13,1.47-6.22,2.21l-.26-.54q-1.94-4.52-3.88-9c-1.77-4.11-3.53-8.22-5.32-12.31a4.21,4.21,0,0,0-4.06-2.71c-4.84-.06-9.68-.07-14.52-.11L81,131.46c-.18,0-.5-.09-.52-.19-.16-.78-.27-1.58-.4-2.42H99.2c.35,0,.69,0,1,0a4.41,4.41,0,0,0,3.41-6.75,4.58,4.58,0,0,0-4.22-2.1q-10,0-20,0h-.72c-.52-3.24-1-6.39-1.54-9.56h-9c.55,3.45,1.11,6.9,1.66,10.35.83,5.11,1.71,10.2,2.47,15.32a4.76,4.76,0,0,0,4.92,4.29c9.22,0,18.45.11,27.68.15a.86.86,0,0,1,.91.61q4.72,11.05,9.48,22.08a4.49,4.49,0,0,0,6.12,2.69c3.69-1.31,7.39-2.61,11.07-3.95a6.74,6.74,0,0,0,1.67-1,4.71,4.71,0,0,0,1.49-2.56v-1.48C135.55,156.8,135.5,156.66,135.46,156.52Z" | ||||||
|  |      id="path10" /> | ||||||
|  |   <path | ||||||
|  |      class="cls-1" | ||||||
|  |      d="M53.61,145.09c.2-1.23.33-2.47.59-3.69a26.58,26.58,0,0,1,6.42-12.56,4.42,4.42,0,0,1,6.63,5.85,18.7,18.7,0,0,0-4.46,8.95,18.32,18.32,0,0,0,34.75,10.84,4.62,4.62,0,0,1,3.67-3,4.41,4.41,0,0,1,4.76,5.84,23.53,23.53,0,0,1-3.45,6.12,26.77,26.77,0,0,1-14.83,10c-1.46.38-3,.53-4.47.79l-.56.11H78.9c-.14,0-.29-.08-.43-.1a34.79,34.79,0,0,1-3.7-.6c-11-2.89-17.86-9.91-20.58-20.95-.29-1.19-.39-2.43-.58-3.64Z" | ||||||
|  |      id="path12" /> | ||||||
|  |   <ellipse | ||||||
|  |      class="cls-1" | ||||||
|  |      cx="72.62" | ||||||
|  |      cy="109.74" | ||||||
|  |      rx="4.51" | ||||||
|  |      ry="3.94" | ||||||
|  |      id="ellipse14" /> | ||||||
|  |   <circle | ||||||
|  |      class="cls-1" | ||||||
|  |      cx="71.76" | ||||||
|  |      cy="95.49" | ||||||
|  |      r="8.93" | ||||||
|  |      id="circle16" /> | ||||||
|  |   <path | ||||||
|  |      class="cls-1" | ||||||
|  |      d="M157.33,131.79H154v1.75q0,18,0,36c0,2.4-1,3.89-2.94,4.52a4.17,4.17,0,0,1-5.43-3.17,10.86,10.86,0,0,1-.13-2q0-31,0-61.93v-2.49h-2c0,.48-.07,1-.07,1.47,0,7.32,0,14.65,0,22,0,2.28-1.42,3.66-3.4,3.39a3,3,0,0,1-2.63-3.33c0-5.24,0-10.47,0-15.7,0-4.38,0-8.75,0-13.13,0-5.09,2.76-7.89,7.83-7.92q10.48-.06,21,0c4.89,0,7.67,2.88,7.67,7.77q0,14.49,0,29c0,2.3-1.56,3.7-3.6,3.31-1.57-.3-2.41-1.44-2.41-3.35q0-10.84,0-21.69v-1.76h-2v1.76q0,31.32,0,62.64a10.81,10.81,0,0,1-.17,2.13,4.23,4.23,0,0,1-4.41,3.27,4.18,4.18,0,0,1-3.9-4c0-2.95,0-5.9,0-8.84V131.79Z" | ||||||
|  |      id="path18" /> | ||||||
|  |   <path | ||||||
|  |      class="cls-1" | ||||||
|  |      d="M155.74,89.56a9,9,0,0,1-9.1-9,9,9,0,0,1,18,0A9,9,0,0,1,155.74,89.56Z" | ||||||
|  |      id="path20" /> | ||||||
|  |   <path | ||||||
|  |      class="cls-1" | ||||||
|  |      d="M191.93,36.94h-71V24.12h10l-17-17-17,17h10V36.94h-71a5.83,5.83,0,0,0-5.83,5.83V197.05a5.83,5.83,0,0,0,5.83,5.83h71V215.7h-10l17,17,17-17h-10V202.88h71a5.83,5.83,0,0,0,5.83-5.83V42.77A5.83,5.83,0,0,0,191.93,36.94Zm-7.5,147a5.83,5.83,0,0,1-5.83,5.84H49.22a5.83,5.83,0,0,1-5.83-5.84V56a5.83,5.83,0,0,1,5.83-5.83H178.6A5.83,5.83,0,0,1,184.43,56Z" | ||||||
|  |      id="path22" /> | ||||||
|  | </svg> | ||||||
|  |  | ||||||
| Before Width: | Height: | Size: 2.9 KiB After Width: | Height: | Size: 3.3 KiB | 
|  | @ -358,7 +358,7 @@ | ||||||
|       }, |       }, | ||||||
|       "mappings": [ |       "mappings": [ | ||||||
|         { |         { | ||||||
|           "if": "kerb-height=", |           "if": "kerb:height=0", | ||||||
|           "then": { |           "then": { | ||||||
|             "en": "This door does not have a kerb", |             "en": "This door does not have a kerb", | ||||||
|             "nl": "Deze deur heeft geen drempel" |             "nl": "Deze deur heeft geen drempel" | ||||||
|  |  | ||||||
|  | @ -277,6 +277,21 @@ | ||||||
|         } |         } | ||||||
|       ] |       ] | ||||||
|     }, |     }, | ||||||
|  |     { | ||||||
|  |       "id": "wheelchair-door-width", | ||||||
|  |       "question": { | ||||||
|  |         "en": "What is the width of the door to the wheelchair accessible toilet?", | ||||||
|  |         "nl": "Hoe breed is de deur van de rolstoeltoegankelijke toilet?" | ||||||
|  |       }, | ||||||
|  |       "render": { | ||||||
|  |         "en": "The door to the wheelchair-accessible toilet is {canonical(door:width)} wide", | ||||||
|  |         "nl": "De deur naar de rolstoeltoegankelijke toilet is {canonical(door:width)} wide" | ||||||
|  |       }, | ||||||
|  |       "freeform": { | ||||||
|  |         "key": "door:width", | ||||||
|  |         "type": "pfloat" | ||||||
|  |       } | ||||||
|  |     }, | ||||||
|     { |     { | ||||||
|       "id": "toilets-type", |       "id": "toilets-type", | ||||||
|       "question": { |       "question": { | ||||||
|  | @ -625,5 +640,35 @@ | ||||||
|     "nl": "Een laag die publieke toiletten toont", |     "nl": "Een laag die publieke toiletten toont", | ||||||
|     "de": "Eine Ebene mit (öffentlichen) Toiletten", |     "de": "Eine Ebene mit (öffentlichen) Toiletten", | ||||||
|     "es": "Una capa que muestra baños (públicos)" |     "es": "Una capa que muestra baños (públicos)" | ||||||
|  |   }, | ||||||
|  |   "units": [ | ||||||
|  |     { | ||||||
|  |       "appliesToKey": [ | ||||||
|  |         "door:width" | ||||||
|  |       ], | ||||||
|  |       "applicableUnits": [ | ||||||
|  |         { | ||||||
|  |           "canonicalDenomination": "m", | ||||||
|  |           "alternativeDenomination": [ | ||||||
|  |             "meter" | ||||||
|  |           ], | ||||||
|  |           "human": { | ||||||
|  |             "en": "meter", | ||||||
|  |             "nl": "meter" | ||||||
|           } |           } | ||||||
|  |         }, | ||||||
|  |         { | ||||||
|  |           "canonicalDenomination": "cm", | ||||||
|  |           "alternativeDenomination": [ | ||||||
|  |             "centimeter", | ||||||
|  |             "cms" | ||||||
|  |           ], | ||||||
|  |           "human": { | ||||||
|  |             "en": "centimeter", | ||||||
|  |             "nl": "centimeter" | ||||||
|  |           } | ||||||
|  |         } | ||||||
|  |       ] | ||||||
|  |     } | ||||||
|  |   ] | ||||||
| } | } | ||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue