2020-07-08 17:07:46 +02:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								import {LayerDefinition} from "../LayerDefinition";
							 | 
						
					
						
							
								
									
										
										
										
											2020-07-29 13:16:21 +02:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								import {And, Or, Tag, TagsFilter} from "../../Logic/TagsFilter";
							 | 
						
					
						
							
								
									
										
										
										
											2020-07-08 17:07:46 +02:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								import {OperatorTag} from "../Questions/OperatorTag";
							 | 
						
					
						
							
								
									
										
										
										
											2020-07-14 20:18:44 +02:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								import FixedText from "../Questions/FixedText";
							 | 
						
					
						
							
								
									
										
										
										
											2020-07-16 15:56:10 +02:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								import ParkingType from "../Questions/bike/ParkingType";
							 | 
						
					
						
							
								
									
										
										
										
											2020-07-29 13:16:21 +02:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								import ParkingCapacity from "../Questions/bike/ParkingCapacity";
							 | 
						
					
						
							
								
									
										
										
										
											2020-07-16 09:54:32 +02:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								import {ImageCarouselWithUploadConstructor} from "../../UI/Image/ImageCarouselWithUpload";
							 | 
						
					
						
							
								
									
										
										
										
											2020-07-20 23:43:42 +02:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								import Translations from "../../UI/i18n/Translations";
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								import ParkingOperator from "../Questions/bike/ParkingOperator";
							 | 
						
					
						
							
								
									
										
										
										
											2020-07-29 13:16:21 +02:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								import ParkingAccessCargo from "../Questions/bike/ParkingAccessCargo";
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								import ParkingCapacityCargo from "../Questions/bike/ParkingCapacityCargo";
							 | 
						
					
						
							
								
									
										
										
										
											2020-07-08 17:07:46 +02:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2020-07-16 15:56:10 +02:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								export default class BikeParkings extends LayerDefinition {
							 | 
						
					
						
							
								
									
										
										
										
											2020-07-29 13:16:21 +02:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								        private readonly accessCargoDesignated = new Tag("cargo_bike", "designated");
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2020-07-08 17:07:46 +02:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								    constructor() {
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								        super();
							 | 
						
					
						
							
								
									
										
										
										
											2020-07-21 23:31:41 +02:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								        this.name = Translations.t.cyclofix.parking.name;
							 | 
						
					
						
							
								
									
										
										
										
											2020-07-16 15:56:10 +02:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								        this.icon = "./assets/bike/parking.svg";
							 | 
						
					
						
							
								
									
										
										
										
											2020-07-13 17:16:12 +02:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								        this.overpassFilter = new Tag("amenity", "bicycle_parking");
							 | 
						
					
						
							
								
									
										
										
										
											2020-07-29 18:35:46 +02:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								        this.presets = [{
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            title: Translations.t.cyclofix.parking.title,
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            tags: [
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                new Tag("amenity", "bicycle_parking"),
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            ]
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								        }];
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2020-07-08 17:07:46 +02:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								        this.maxAllowedOverlapPercentage = 10;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								        this.minzoom = 13;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								        this.style = this.generateStyleFunction();
							 | 
						
					
						
							
								
									
										
										
										
											2020-07-21 01:13:51 +02:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								        this.title = new FixedText(Translations.t.cyclofix.parking.title)
							 | 
						
					
						
							
								
									
										
										
										
											2020-07-08 17:07:46 +02:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								        this.elementsToShow = [
							 | 
						
					
						
							
								
									
										
										
										
											2020-07-16 09:54:32 +02:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            new ImageCarouselWithUploadConstructor(),
							 | 
						
					
						
							
								
									
										
										
										
											2020-07-20 23:43:42 +02:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            //new ParkingOperator(),
							 | 
						
					
						
							
								
									
										
										
										
											2020-07-23 17:32:18 +02:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            new ParkingType(),
							 | 
						
					
						
							
								
									
										
										
										
											2020-07-29 13:16:21 +02:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            new ParkingCapacity(),
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            new ParkingAccessCargo(),
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            new ParkingCapacityCargo().OnlyShowIf(this.accessCargoDesignated)
							 | 
						
					
						
							
								
									
										
										
										
											2020-07-08 17:07:46 +02:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								        ];
							 | 
						
					
						
							
								
									
										
										
										
											2020-07-22 00:50:30 +02:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								        this.wayHandling = LayerDefinition.WAYHANDLING_CENTER_AND_WAY;
							 | 
						
					
						
							
								
									
										
										
										
											2020-07-08 17:07:46 +02:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								    }
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								    private generateStyleFunction() {
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								        const self = this;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								        return function (properties: any) {
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            return {
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                color: "#00bb00",
							 | 
						
					
						
							
								
									
										
										
										
											2020-07-26 02:01:34 +02:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                icon: {
							 | 
						
					
						
							
								
									
										
										
										
											2020-07-08 17:07:46 +02:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    iconUrl: self.icon,
							 | 
						
					
						
							
								
									
										
										
										
											2020-07-20 16:16:22 +02:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                    iconSize: [50, 50],
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    iconAnchor: [25,50]
							 | 
						
					
						
							
								
									
										
										
										
											2020-07-26 02:01:34 +02:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                }
							 | 
						
					
						
							
								
									
										
										
										
											2020-07-08 17:07:46 +02:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            };
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								        };
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								    }
							 | 
						
					
						
							
								
									
										
										
										
											2020-07-16 15:56:10 +02:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								}
							 |