| 
									
										
										
										
											2020-07-24 14:46:25 +02:00
										 |  |  | import {LayerDefinition} from "../LayerDefinition"; | 
					
						
							| 
									
										
										
										
											2020-07-24 15:52:21 +02:00
										 |  |  | import {FixedUiElement} from "../../UI/Base/FixedUiElement"; | 
					
						
							|  |  |  | import FixedText from "../Questions/FixedText"; | 
					
						
							|  |  |  | import {Tag} from "../../Logic/TagsFilter"; | 
					
						
							|  |  |  | import {ImageCarouselWithUploadConstructor} from "../../UI/Image/ImageCarouselWithUpload"; | 
					
						
							| 
									
										
										
										
											2020-07-31 17:38:03 +02:00
										 |  |  | import {TagRenderingOptions} from "../TagRenderingOptions"; | 
					
						
							| 
									
										
										
										
											2020-07-24 14:46:25 +02:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2020-07-24 15:52:21 +02:00
										 |  |  | export class Viewpoint extends LayerDefinition { | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     constructor() { | 
					
						
							| 
									
										
										
										
											2020-07-31 04:58:58 +02:00
										 |  |  |         super("viewpoint",{ | 
					
						
							| 
									
										
										
										
											2020-07-24 15:52:21 +02:00
										 |  |  |             name: "Bezienswaardigheid", | 
					
						
							|  |  |  |             description: "Wil je een foto toevoegen van iets dat geen park, bos of natuurgebied is? Dit kan hiermee", | 
					
						
							| 
									
										
										
										
											2020-07-29 18:35:46 +02:00
										 |  |  |             presets: [{ | 
					
						
							|  |  |  |                 title: "Bezienswaardigheid (andere)", | 
					
						
							|  |  |  |                 description: "Wens je een foto toe te voegen dat geen park, bos of (erkend) natuurreservaat is? Dit kan hiermee", | 
					
						
							|  |  |  |                 tags: [new Tag("tourism", "viewpoint"), | 
					
						
							|  |  |  |                     new Tag("fixme", "Added with mapcomplete. This viewpoint should probably me merged with some existing feature")] | 
					
						
							|  |  |  |             }], | 
					
						
							| 
									
										
										
										
											2020-07-24 15:52:21 +02:00
										 |  |  |             icon: "assets/viewpoint.svg", | 
					
						
							|  |  |  |             wayHandling: LayerDefinition.WAYHANDLING_CENTER_ONLY, | 
					
						
							|  |  |  |             style: tags => { | 
					
						
							|  |  |  |                 return { | 
					
						
							| 
									
										
										
										
											2020-07-29 18:35:46 +02:00
										 |  |  |                     color: undefined, icon: { | 
					
						
							| 
									
										
										
										
											2020-07-24 15:52:21 +02:00
										 |  |  |                         iconUrl: "assets/viewpoint.svg", | 
					
						
							|  |  |  |                         iconSize: [20, 20] | 
					
						
							| 
									
										
										
										
											2020-07-26 02:01:34 +02:00
										 |  |  |                     } | 
					
						
							| 
									
										
										
										
											2020-07-24 15:52:21 +02:00
										 |  |  |                 } | 
					
						
							|  |  |  |             }, | 
					
						
							|  |  |  |             maxAllowedOverlapPercentage: 0, | 
					
						
							|  |  |  |             overpassFilter: new Tag("tourism", "viewpoint"), | 
					
						
							|  |  |  |             minzoom: 13, | 
					
						
							|  |  |  |             title: new FixedText("Bezienswaardigheid") | 
					
						
							|  |  |  |         }); | 
					
						
							|  |  |  |          | 
					
						
							|  |  |  |         this.elementsToShow = [ | 
					
						
							|  |  |  |             new FixedText(this.description), | 
					
						
							|  |  |  |             new ImageCarouselWithUploadConstructor(), | 
					
						
							|  |  |  |             new TagRenderingOptions({ | 
					
						
							|  |  |  |                 question: "Zijn er bijzonderheden die je wilt toevoegen?", | 
					
						
							|  |  |  |                 freeform:{ | 
					
						
							|  |  |  |                     key: "description:0", | 
					
						
							|  |  |  |                     template: "$$$", | 
					
						
							|  |  |  |                     renderTemplate: "<h3>Bijzonderheden</h3>{description:0}" | 
					
						
							|  |  |  |                 } | 
					
						
							|  |  |  |             }) | 
					
						
							|  |  |  |         ] | 
					
						
							|  |  |  |     } | 
					
						
							| 
									
										
										
										
											2020-07-24 14:46:25 +02:00
										 |  |  | 
 | 
					
						
							|  |  |  | } |