Fix detection of brokenness

This commit is contained in:
Pieter Vander Vennet 2020-07-17 12:00:52 +02:00
parent 66e5808e4e
commit b01622780b
2 changed files with 2 additions and 4 deletions

View file

@ -17,7 +17,7 @@ import PumpValves from "../Questions/bike/PumpValves";
export default class BikeStations extends LayerDefinition { export default class BikeStations extends LayerDefinition {
private readonly pump = new Tag("service:bicycle:pump", "yes"); private readonly pump = new Tag("service:bicycle:pump", "yes");
private readonly pumpOperationalAny = new Tag("service:bicycle:pump:operational_status", "yes"); private readonly pumpOperationalAny = new Tag("service:bicycle:pump:operational_status", "yes");
private readonly pumpOperationalOk = new Or([new Tag("service:bicycle:pump:operational_status", "yes"), new Tag("service:bicycle:pump:operational_status", "operational"), new Tag("service:bicycle:pump:operational_status", "ok")]); private readonly pumpOperationalOk = new Or([new Tag("service:bicycle:pump:operational_status", "yes"), new Tag("service:bicycle:pump:operational_status", "operational"), new Tag("service:bicycle:pump:operational_status", "ok"), new Tag("service:bicycle:pump:operational_status", "")]);
private readonly tools = new Tag("service:bicycle:tools", "yes"); private readonly tools = new Tag("service:bicycle:tools", "yes");
constructor() { constructor() {
@ -31,7 +31,6 @@ export default class BikeStations extends LayerDefinition {
this.newElementTags = [ this.newElementTags = [
new Tag("amenity", "bicycle_repair_station") new Tag("amenity", "bicycle_repair_station")
// new Tag("fixme", "Toegevoegd met MapComplete, geometry nog uit te tekenen")
]; ];
this.maxAllowedOverlapPercentage = 10; this.maxAllowedOverlapPercentage = 10;
@ -60,7 +59,7 @@ export default class BikeStations extends LayerDefinition {
const self = this; const self = this;
return function (properties: any) { return function (properties: any) {
const hasPump = self.pump.matchesProperties(properties) const hasPump = self.pump.matchesProperties(properties)
const isOperational = !self.pumpOperationalAny.matchesProperties(properties) || self.pumpOperationalOk.matchesProperties(properties) const isOperational = self.pumpOperationalOk.matchesProperties(properties)
const hasTools = self.tools.matchesProperties(properties) const hasTools = self.tools.matchesProperties(properties)
let iconName = "" let iconName = ""
if (hasPump) { if (hasPump) {

View file

@ -2,7 +2,6 @@ import { Layout } from "../Layout";
import { DrinkingWaterLayer } from "../Layers/DrinkingWater"; import { DrinkingWaterLayer } from "../Layers/DrinkingWater";
import { NatureReserves } from "../Layers/NatureReserves"; import { NatureReserves } from "../Layers/NatureReserves";
import { Park } from "../Layers/Park"; import { Park } from "../Layers/Park";
import { BikeParkings } from "../Layers/BikeParkings";
export class WalkByBrussels extends Layout { export class WalkByBrussels extends Layout {
constructor() { constructor() {