| 
									
										
										
										
											2020-07-17 17:21:07 +02:00
										 |  |  | import {LayerDefinition} from "../LayerDefinition"; | 
					
						
							|  |  |  | import {And, Not, Or, Tag} from "../../Logic/TagsFilter"; | 
					
						
							|  |  |  | import {TagRenderingOptions} from "../TagRendering"; | 
					
						
							|  |  |  | import {UIEventSource} from "../../UI/UIEventSource"; | 
					
						
							|  |  |  | import {Park} from "./Park"; | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | export class Widths extends LayerDefinition { | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     private cyclistWidth: number; | 
					
						
							|  |  |  |     private carWidth: number; | 
					
						
							| 
									
										
										
										
											2020-07-17 18:57:07 +02:00
										 |  |  |     private pedestrianWidth: number; | 
					
						
							| 
									
										
										
										
											2020-07-17 17:21:07 +02:00
										 |  |  | 
 | 
					
						
							|  |  |  |     private readonly _bothSideParking = new Tag("parking:lane:both", "parallel"); | 
					
						
							|  |  |  |     private readonly _noSideParking = new Tag("parking:lane:both", "no_parking"); | 
					
						
							| 
									
										
										
										
											2020-07-19 00:13:45 +02:00
										 |  |  |     private readonly _otherParkingMode = | 
					
						
							|  |  |  |         new Or([ | 
					
						
							|  |  |  |             new Tag("parking:lane:both", "perpendicular"), | 
					
						
							|  |  |  |             new Tag("parking:lane:left", "perpendicular"), | 
					
						
							|  |  |  |             new Tag("parking:lane:right", "perpendicular"), | 
					
						
							|  |  |  |             new Tag("parking:lane:both", "diagonal"), | 
					
						
							|  |  |  |             new Tag("parking:lane:left", "diagonal"), | 
					
						
							|  |  |  |             new Tag("parking:lane:right", "diagonal"), | 
					
						
							|  |  |  |         ]) | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2020-07-17 17:21:07 +02:00
										 |  |  | 
 | 
					
						
							|  |  |  |     private readonly _leftSideParking = | 
					
						
							|  |  |  |         new And([new Tag("parking:lane:left", "parallel"), new Tag("parking:lane:right", "no_parking")]); | 
					
						
							|  |  |  |     private readonly _rightSideParking = | 
					
						
							|  |  |  |         new And([new Tag("parking:lane:right", "parallel"), new Tag("parking:lane:left", "no_parking")]); | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2020-07-17 18:57:07 +02:00
										 |  |  | 
 | 
					
						
							|  |  |  |     private _sidewalkBoth = new Tag("sidewalk", "both"); | 
					
						
							|  |  |  |     private _sidewalkLeft = new Tag("sidewalk", "left"); | 
					
						
							|  |  |  |     private _sidewalkRight = new Tag("sidewalk", "right"); | 
					
						
							|  |  |  |     private _sidewalkNone = new Tag("sidewalk", "none"); | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2020-07-17 17:21:07 +02:00
										 |  |  |     private readonly _oneSideParking = new Or([this._leftSideParking, this._rightSideParking]); | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2020-07-25 18:00:08 +02:00
										 |  |  |     private readonly _carfree = new Or( | 
					
						
							|  |  |  |         [new Tag("highway", "pedestrian"), new Tag("highway", "living_street"), | 
					
						
							|  |  |  |         new Tag("access","destination"), new Tag("motor_vehicle", "destination")]) | 
					
						
							| 
									
										
										
										
											2020-07-17 17:21:07 +02:00
										 |  |  |     private readonly _notCarFree = new Not(this._carfree); | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     private calcProps(properties) { | 
					
						
							|  |  |  |         let parkingStateKnown = true; | 
					
						
							|  |  |  |         let parallelParkingCount = 0; | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |         if (this._oneSideParking.matchesProperties(properties)) { | 
					
						
							|  |  |  |             parallelParkingCount = 1; | 
					
						
							|  |  |  |         } else if (this._bothSideParking.matchesProperties(properties)) { | 
					
						
							|  |  |  |             parallelParkingCount = 2; | 
					
						
							|  |  |  |         } else if (this._noSideParking.matchesProperties(properties)) { | 
					
						
							|  |  |  |             parallelParkingCount = 0; | 
					
						
							| 
									
										
										
										
											2020-07-19 00:13:45 +02:00
										 |  |  |         } else if (this._otherParkingMode.matchesProperties(properties)) { | 
					
						
							|  |  |  |             parallelParkingCount = 0; | 
					
						
							| 
									
										
										
										
											2020-07-17 17:21:07 +02:00
										 |  |  |         } else { | 
					
						
							|  |  |  |             parkingStateKnown = false; | 
					
						
							|  |  |  |             console.log("No parking data for ", properties.name, properties.id, properties) | 
					
						
							|  |  |  |         } | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2020-07-17 18:57:07 +02:00
										 |  |  |         let pedestrianFlowNeeded = 0; | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |         if (this._sidewalkBoth.matchesProperties(properties)) { | 
					
						
							|  |  |  |             pedestrianFlowNeeded = 0; | 
					
						
							|  |  |  |         } else if (this._sidewalkNone.matchesProperties(properties)) { | 
					
						
							|  |  |  |             pedestrianFlowNeeded = 2; | 
					
						
							|  |  |  |         } else if (this._sidewalkLeft.matchesProperties(properties) || this._sidewalkRight.matches(properties)) { | 
					
						
							|  |  |  |             pedestrianFlowNeeded = 1; | 
					
						
							|  |  |  |         } else { | 
					
						
							|  |  |  |             pedestrianFlowNeeded = -1; | 
					
						
							|  |  |  |         } | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2020-07-17 17:21:07 +02:00
										 |  |  |         let onewayCar = properties.oneway === "yes"; | 
					
						
							|  |  |  |         let onewayBike = properties["oneway:bicycle"] === "yes" || | 
					
						
							|  |  |  |             (onewayCar && properties["oneway:bicycle"] === undefined) | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2020-07-18 00:49:22 +02:00
										 |  |  |         let cyclingAllowed =  | 
					
						
							|  |  |  |             !(properties.bicycle === "use_sidepath" | 
					
						
							|  |  |  |            || properties.bicycle === "no"); | 
					
						
							| 
									
										
										
										
											2020-07-17 17:21:07 +02:00
										 |  |  | 
 | 
					
						
							|  |  |  |         let carWidth = (onewayCar ? 1 : 2) * this.carWidth; | 
					
						
							| 
									
										
										
										
											2020-07-18 00:49:22 +02:00
										 |  |  |         let cyclistWidth = 0; | 
					
						
							|  |  |  |         if (cyclingAllowed) { | 
					
						
							|  |  |  |             cyclistWidth = (onewayBike ? 1 : 2) * this.cyclistWidth; | 
					
						
							|  |  |  |         } | 
					
						
							| 
									
										
										
										
											2020-07-17 17:21:07 +02:00
										 |  |  | 
 | 
					
						
							|  |  |  |         const width = parseFloat(properties["width:carriageway"]); | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2020-07-27 09:38:21 +02:00
										 |  |  |         const targetWidthIgnoringPedestrians = | 
					
						
							| 
									
										
										
										
											2020-07-17 17:21:07 +02:00
										 |  |  |             carWidth + | 
					
						
							|  |  |  |             cyclistWidth + | 
					
						
							|  |  |  |             parallelParkingCount * this.carWidth; | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2020-07-27 09:38:21 +02:00
										 |  |  |         const targetWidth = targetWidthIgnoringPedestrians +  Math.max(0, pedestrianFlowNeeded) * this.pedestrianWidth; | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2020-07-17 17:21:07 +02:00
										 |  |  |         return { | 
					
						
							|  |  |  |             parkingLanes: parallelParkingCount, | 
					
						
							|  |  |  |             parkingStateKnown: parkingStateKnown, | 
					
						
							|  |  |  |             width: width, | 
					
						
							|  |  |  |             targetWidth: targetWidth, | 
					
						
							| 
									
										
										
										
											2020-07-27 09:38:21 +02:00
										 |  |  |             targetWidthIgnoringPedestrians: targetWidthIgnoringPedestrians, | 
					
						
							| 
									
										
										
										
											2020-07-17 18:57:07 +02:00
										 |  |  |             onewayBike: onewayBike, | 
					
						
							|  |  |  |             pedestrianFlowNeeded: pedestrianFlowNeeded, | 
					
						
							| 
									
										
										
										
											2020-07-18 00:49:22 +02:00
										 |  |  |             cyclingAllowed: cyclingAllowed | 
					
						
							| 
									
										
										
										
											2020-07-17 17:21:07 +02:00
										 |  |  |         } | 
					
						
							|  |  |  |     } | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     constructor(carWidth: number, | 
					
						
							| 
									
										
										
										
											2020-07-17 18:57:07 +02:00
										 |  |  |                 cyclistWidth: number, | 
					
						
							|  |  |  |                 pedestrianWidth: number) { | 
					
						
							| 
									
										
										
										
											2020-07-17 17:21:07 +02:00
										 |  |  |         super(); | 
					
						
							|  |  |  |         this.carWidth = carWidth; | 
					
						
							|  |  |  |         this.cyclistWidth = cyclistWidth; | 
					
						
							| 
									
										
										
										
											2020-07-17 18:57:07 +02:00
										 |  |  |         this.pedestrianWidth = pedestrianWidth; | 
					
						
							| 
									
										
										
										
											2020-07-18 20:40:51 +02:00
										 |  |  |         this.minzoom = 12; | 
					
						
							| 
									
										
										
										
											2020-07-17 18:57:07 +02:00
										 |  |  | 
 | 
					
						
							|  |  |  |         function r(n: number) { | 
					
						
							|  |  |  |             const pre = Math.floor(n); | 
					
						
							|  |  |  |             const post = Math.floor((n * 10) % 10); | 
					
						
							|  |  |  |             return "" + pre + "." + post; | 
					
						
							|  |  |  |         } | 
					
						
							| 
									
										
										
										
											2020-07-17 17:21:07 +02:00
										 |  |  | 
 | 
					
						
							|  |  |  |         this.name = "widths"; | 
					
						
							|  |  |  |         this.overpassFilter = new Tag("width:carriageway", "*"); | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |         this.title = new TagRenderingOptions({ | 
					
						
							|  |  |  |             freeform: { | 
					
						
							|  |  |  |                 renderTemplate: "{name}", | 
					
						
							|  |  |  |                 template: "$$$", | 
					
						
							|  |  |  |                 key: "name" | 
					
						
							|  |  |  |             } | 
					
						
							|  |  |  |         }) | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |         const self = this; | 
					
						
							|  |  |  |         this.style = (properties) => { | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2020-07-17 18:57:07 +02:00
										 |  |  |             let c = "#f00"; | 
					
						
							| 
									
										
										
										
											2020-07-17 17:21:07 +02:00
										 |  |  | 
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |             const props = self.calcProps(properties); | 
					
						
							| 
									
										
										
										
											2020-07-27 09:38:21 +02:00
										 |  |  |             if (props.width >= props.targetWidthIgnoringPedestrians) { | 
					
						
							| 
									
										
										
										
											2020-07-17 18:57:07 +02:00
										 |  |  |                 c = "#fa0" | 
					
						
							|  |  |  |             } | 
					
						
							| 
									
										
										
										
											2020-07-18 00:49:22 +02:00
										 |  |  |             if (props.width >= props.targetWidth || !props.cyclingAllowed) { | 
					
						
							| 
									
										
										
										
											2020-07-17 18:57:07 +02:00
										 |  |  |                 c = "#0c0"; | 
					
						
							| 
									
										
										
										
											2020-07-17 17:21:07 +02:00
										 |  |  |             } | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2020-07-17 18:57:07 +02:00
										 |  |  |             if (!props.parkingStateKnown && properties["note:width:carriageway"] === undefined) { | 
					
						
							| 
									
										
										
										
											2020-07-17 17:21:07 +02:00
										 |  |  |                 c = "#f0f" | 
					
						
							|  |  |  |             } | 
					
						
							| 
									
										
										
										
											2020-07-17 18:57:07 +02:00
										 |  |  |              | 
					
						
							| 
									
										
										
										
											2020-07-17 17:21:07 +02:00
										 |  |  |             if (this._carfree.matchesProperties(properties)) { | 
					
						
							|  |  |  |                 c = "#aaa"; | 
					
						
							|  |  |  |             } | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2020-07-17 18:57:07 +02:00
										 |  |  |             // Mark probably wrong data
 | 
					
						
							| 
									
										
										
										
											2020-07-17 17:21:07 +02:00
										 |  |  |             if (props.width > 15) { | 
					
						
							| 
									
										
										
										
											2020-07-17 18:57:07 +02:00
										 |  |  |                 c = "#f0f" | 
					
						
							| 
									
										
										
										
											2020-07-17 17:21:07 +02:00
										 |  |  |             } | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2020-07-17 18:57:07 +02:00
										 |  |  |             let dashArray = undefined; | 
					
						
							|  |  |  |             if (props.onewayBike) { | 
					
						
							|  |  |  |                 dashArray = [20, 8] | 
					
						
							|  |  |  |             } | 
					
						
							| 
									
										
										
										
											2020-07-17 17:21:07 +02:00
										 |  |  |             return { | 
					
						
							|  |  |  |                 icon: null, | 
					
						
							|  |  |  |                 color: c, | 
					
						
							|  |  |  |                 weight: 7, | 
					
						
							|  |  |  |                 dashArray: dashArray | 
					
						
							|  |  |  |             } | 
					
						
							|  |  |  |         } | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |         this.elementsToShow = [ | 
					
						
							|  |  |  |             new TagRenderingOptions({ | 
					
						
							| 
									
										
										
										
											2020-07-17 18:57:07 +02:00
										 |  |  |                 question: "Mogen auto's hier parkeren?", | 
					
						
							| 
									
										
										
										
											2020-07-17 17:21:07 +02:00
										 |  |  |                 mappings: [ | 
					
						
							|  |  |  |                     { | 
					
						
							|  |  |  |                         k: this._bothSideParking, | 
					
						
							| 
									
										
										
										
											2020-07-17 18:57:07 +02:00
										 |  |  |                         txt: "Auto's kunnen langs beide zijden parkeren.<br+>Dit gebruikt <b>" + r(this.carWidth * 2) + "m</b><br/>" | 
					
						
							| 
									
										
										
										
											2020-07-17 17:21:07 +02:00
										 |  |  |                     }, | 
					
						
							|  |  |  |                     { | 
					
						
							|  |  |  |                         k: this._oneSideParking, | 
					
						
							| 
									
										
										
										
											2020-07-17 18:57:07 +02:00
										 |  |  |                         txt: "Auto's kunnen langs één kant parkeren.<br/>Dit gebruikt <b>" + r(this.carWidth) + "m</b><br/>" | 
					
						
							| 
									
										
										
										
											2020-07-17 17:21:07 +02:00
										 |  |  |                     }, | 
					
						
							| 
									
										
										
										
											2020-07-19 00:13:45 +02:00
										 |  |  |                     { | 
					
						
							|  |  |  |                         k: this._otherParkingMode, | 
					
						
							|  |  |  |                         txt: "Deze straat heeft dwarsparkeren of diagonaalparkeren aan minstens één zijde. Deze parkeerruimte is niet opgenomen in de straatbreedte." | 
					
						
							|  |  |  |                     }, | 
					
						
							| 
									
										
										
										
											2020-07-17 17:21:07 +02:00
										 |  |  |                     {k: this._noSideParking, txt: "Auto's mogen hier niet parkeren"}, | 
					
						
							| 
									
										
										
										
											2020-07-17 18:57:07 +02:00
										 |  |  |                     // {k: null, txt: "Nog geen parkeerinformatie bekend"}
 | 
					
						
							|  |  |  |                 ], | 
					
						
							|  |  |  |                 freeform: { | 
					
						
							|  |  |  |                     key: "note:width:carriageway", | 
					
						
							|  |  |  |                     renderTemplate: "{note:width:carriageway}", | 
					
						
							|  |  |  |                     template: "$$$", | 
					
						
							|  |  |  |                 } | 
					
						
							| 
									
										
										
										
											2020-07-17 17:21:07 +02:00
										 |  |  |             }).OnlyShowIf(this._notCarFree), | 
					
						
							| 
									
										
										
										
											2020-07-17 18:57:07 +02:00
										 |  |  | 
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |             new TagRenderingOptions({ | 
					
						
							|  |  |  |                 mappings: [ | 
					
						
							|  |  |  |                     { | 
					
						
							|  |  |  |                         k: this._sidewalkNone, | 
					
						
							|  |  |  |                         txt: "Deze straat heeft geen voetpaden. Voetgangers hebben hier <b>" + r(this.pedestrianWidth * 2) + "m</b> nodig" | 
					
						
							|  |  |  |                     }, | 
					
						
							|  |  |  |                     { | 
					
						
							|  |  |  |                         k: new Or([this._sidewalkLeft, this._sidewalkRight]), | 
					
						
							|  |  |  |                         txt: "Deze straat heeft een voetpad aan één kant. Voetgangers hebben hier <b>" + r(this.pedestrianWidth) + "m</b> nodig" | 
					
						
							|  |  |  |                     }, | 
					
						
							|  |  |  |                     {k: this._sidewalkBoth, txt: "Deze straat heeft voetpad aan beide zijden."}, | 
					
						
							|  |  |  |                 ], | 
					
						
							|  |  |  |                 freeform: { | 
					
						
							|  |  |  |                     key: "note:width:carriageway", | 
					
						
							|  |  |  |                     renderTemplate: "{note:width:carriageway}", | 
					
						
							|  |  |  |                     template: "$$$", | 
					
						
							|  |  |  |                 } | 
					
						
							|  |  |  |             }).OnlyShowIf(this._notCarFree), | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2020-07-17 17:21:07 +02:00
										 |  |  |             new TagRenderingOptions({ | 
					
						
							|  |  |  |                 mappings: [ | 
					
						
							| 
									
										
										
										
											2020-07-18 00:49:22 +02:00
										 |  |  |                     { | 
					
						
							|  |  |  |                         k: new Tag("bicycle", "use_sidepath"), | 
					
						
							|  |  |  |                         txt: "Er is een afgescheiden, verplicht te gebruiken fietspad. Fietsen op dit wegsegment hoeft dus niet" | 
					
						
							|  |  |  |                     }, | 
					
						
							|  |  |  |                     { | 
					
						
							|  |  |  |                         k: new Tag("bicycle", "no"), | 
					
						
							|  |  |  |                         txt: "Fietsen is hier niet toegestaan" | 
					
						
							|  |  |  |                     }, | 
					
						
							| 
									
										
										
										
											2020-07-17 17:21:07 +02:00
										 |  |  |                     { | 
					
						
							|  |  |  |                         k: new Tag("oneway:bicycle", "yes"), | 
					
						
							| 
									
										
										
										
											2020-07-17 18:57:07 +02:00
										 |  |  |                         txt: "Eenrichtingsverkeer, óók voor fietsers. Dit gebruikt <b>" + r(this.carWidth + this.cyclistWidth) + "m</b>" | 
					
						
							| 
									
										
										
										
											2020-07-17 17:21:07 +02:00
										 |  |  |                     }, | 
					
						
							|  |  |  |                     { | 
					
						
							|  |  |  |                         k: new And([new Tag("oneway", "yes"), new Tag("oneway:bicycle", "no")]), | 
					
						
							| 
									
										
										
										
											2020-07-17 18:57:07 +02:00
										 |  |  |                         txt: "Tweerichtingverkeer voor fietsers, eenrichting voor auto's Dit gebruikt <b>" + r(this.carWidth + 2 * this.cyclistWidth) + "m</b>" | 
					
						
							| 
									
										
										
										
											2020-07-17 17:21:07 +02:00
										 |  |  |                     }, | 
					
						
							|  |  |  |                     { | 
					
						
							|  |  |  |                         k: new Tag("oneway", "yes"), | 
					
						
							|  |  |  |                         txt: "Eenrichtingsverkeer voor iedereen. Dit gebruikt <b>" + (this.carWidth + this.cyclistWidth) + "m</b>" | 
					
						
							|  |  |  |                     }, | 
					
						
							|  |  |  |                     { | 
					
						
							|  |  |  |                         k: null, | 
					
						
							| 
									
										
										
										
											2020-07-17 18:57:07 +02:00
										 |  |  |                         txt: "Tweerichtingsverkeer voor iedereen. Dit gebruikt <b>" + r(2 * this.carWidth + 2 * this.cyclistWidth) + "m</b>" | 
					
						
							| 
									
										
										
										
											2020-07-17 17:21:07 +02:00
										 |  |  |                     } | 
					
						
							|  |  |  |                 ] | 
					
						
							|  |  |  |             }).OnlyShowIf(this._notCarFree), | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |             new TagRenderingOptions( | 
					
						
							|  |  |  |                 { | 
					
						
							|  |  |  |                     tagsPreprocessor: (tags) => { | 
					
						
							|  |  |  |                         const props = self.calcProps(tags); | 
					
						
							| 
									
										
										
										
											2020-07-17 18:57:07 +02:00
										 |  |  |                         tags.targetWidth = r(props.targetWidth); | 
					
						
							|  |  |  |                         tags.short = ""; | 
					
						
							|  |  |  |                         if (props.width < props.targetWidth) { | 
					
						
							|  |  |  |                             tags.short = "Er is dus <b class='alert'>" + r(props.targetWidth - props.width) + "m</b> te weinig" | 
					
						
							|  |  |  |                         } | 
					
						
							| 
									
										
										
										
											2020-07-17 17:21:07 +02:00
										 |  |  |                     }, | 
					
						
							|  |  |  |                     freeform: { | 
					
						
							|  |  |  |                         key: "width:carriageway", | 
					
						
							| 
									
										
										
										
											2020-07-17 18:57:07 +02:00
										 |  |  |                         renderTemplate: "De totale nodige ruimte voor vlot en veilig verkeer is dus <b>{targetWidth}m</b><br>" + | 
					
						
							|  |  |  |                             "{short}", | 
					
						
							| 
									
										
										
										
											2020-07-17 17:21:07 +02:00
										 |  |  |                         template: "$$$", | 
					
						
							|  |  |  |                     } | 
					
						
							|  |  |  |                 } | 
					
						
							|  |  |  |             ).OnlyShowIf(this._notCarFree), | 
					
						
							|  |  |  |              | 
					
						
							|  |  |  |              | 
					
						
							|  |  |  |             new TagRenderingOptions({ | 
					
						
							|  |  |  |                 mappings: [ | 
					
						
							|  |  |  |                     {k:new Tag("highway","living_street"),txt: "Dit is een woonerf"}, | 
					
						
							| 
									
										
										
										
											2020-07-18 20:40:51 +02:00
										 |  |  |                     {k:new Tag("highway","pedestrian"),txt: "Deze weg is autovrij"} | 
					
						
							| 
									
										
										
										
											2020-07-17 17:21:07 +02:00
										 |  |  |                 ] | 
					
						
							|  |  |  |             }), | 
					
						
							|  |  |  |              | 
					
						
							|  |  |  |             new TagRenderingOptions({ | 
					
						
							|  |  |  |                 mappings: [ | 
					
						
							|  |  |  |                     { | 
					
						
							|  |  |  |                         k: new Tag("sidewalk", "none"), | 
					
						
							|  |  |  |                         txt: "De afstand van huis tot huis is <b>{width:carriageway}m</b>" | 
					
						
							|  |  |  |                     }, | 
					
						
							|  |  |  |                     { | 
					
						
							|  |  |  |                         k: new Tag("sidewalk", "left"), | 
					
						
							|  |  |  |                         txt: "De afstand van huis tot voetpad is <b>{width:carriageway}m</b>" | 
					
						
							|  |  |  |                     }, | 
					
						
							|  |  |  |                     { | 
					
						
							|  |  |  |                         k: new Tag("sidewalk", "right"), | 
					
						
							|  |  |  |                         txt: "De afstand van huis tot voetpad is <b>{width:carriageway}m</b>" | 
					
						
							|  |  |  |                     }, | 
					
						
							|  |  |  |                     { | 
					
						
							|  |  |  |                         k: new Tag("sidewalk", "both"), | 
					
						
							|  |  |  |                         txt: "De afstand van voetpad tot voetpad is <b>{width:carriageway}m</b>" | 
					
						
							|  |  |  |                     }, | 
					
						
							|  |  |  |                     { | 
					
						
							|  |  |  |                         k: new Tag("sidewalk", ""), | 
					
						
							|  |  |  |                         txt: "De straatbreedte is <b>{width:carriageway}m</b>" | 
					
						
							|  |  |  |                     } | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |                 ] | 
					
						
							|  |  |  |             }) | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |         ] | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     } | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | } |