Added manual pump question

This commit is contained in:
Pieter Fiers 2020-07-07 16:39:11 +02:00
parent 75a3a70afa
commit ee2777495b
5 changed files with 44 additions and 4 deletions

View file

@ -4,6 +4,7 @@ import {GRB} from "./Layouts/GRB";
import {Statues} from "./Layouts/Statues"; import {Statues} from "./Layouts/Statues";
import {Bookcases} from "./Layouts/Bookcases"; import {Bookcases} from "./Layouts/Bookcases";
import { BikePumps } from "./Layers/BikePumps"; import { BikePumps } from "./Layers/BikePumps";
import { BikePumpsLayout } from "./Layouts/BikePumps";
export class AllKnownLayouts { export class AllKnownLayouts {
public static allSets: any = AllKnownLayouts.AllLayouts(); public static allSets: any = AllKnownLayouts.AllLayouts();
@ -12,7 +13,7 @@ export class AllKnownLayouts {
const layouts = [ const layouts = [
new Groen(), new Groen(),
new GRB(), new GRB(),
new BikePumps(), new BikePumpsLayout(),
/*new Toilets(), /*new Toilets(),
new Statues(), new Statues(),
new Bookcases()*/ new Bookcases()*/

View file

@ -5,6 +5,8 @@ import {OperatorTag} from "../Questions/OperatorTag";
import {NameQuestion} from "../Questions/NameQuestion"; import {NameQuestion} from "../Questions/NameQuestion";
import {NameInline} from "../Questions/NameInline"; import {NameInline} from "../Questions/NameInline";
import * as L from "leaflet"; import * as L from "leaflet";
import { PumpManual } from "../Questions/PumpManual";
import FixedName from "../Questions/FixedName";
export class BikePumps extends LayerDefinition { export class BikePumps extends LayerDefinition {
@ -31,11 +33,12 @@ export class BikePumps extends LayerDefinition {
this.minzoom = 13; this.minzoom = 13;
this.style = this.generateStyleFunction(); this.style = this.generateStyleFunction();
this.title = new NameInline("pomp"); this.title = new FixedName("pomp");
this.elementsToShow = [ this.elementsToShow = [
// new NameQuestion(), // new NameQuestion(),
// new AccessTag(), // new AccessTag(),
new OperatorTag() new OperatorTag(),
new PumpManual()
]; ];
} }

View file

@ -2,7 +2,7 @@ import {Layout} from "../Layout";
import {GrbToFix} from "../Layers/GrbToFix"; import {GrbToFix} from "../Layers/GrbToFix";
import { BikePumps } from "../Layers/BikePumps"; import { BikePumps } from "../Layers/BikePumps";
export class GRB extends Layout { export class BikePumpsLayout extends Layout {
constructor() { constructor() {
super( super(
"pomp", "pomp",

View file

@ -0,0 +1,13 @@
import { TagRenderingOptions } from "../TagRendering";
export default class FixedName extends TagRenderingOptions {
constructor(category: string) {
super({
mappings: [
{
k: null, txt: category
}
]
})
}
}

View file

@ -0,0 +1,23 @@
import {TagRenderingOptions} from "../TagRendering";
import {UIEventSource} from "../../UI/UIEventSource";
import {Changes} from "../../Logic/Changes";
import {Tag} from "../../Logic/TagsFilter";
export class PumpManual extends TagRenderingOptions {
private static options = {
priority: 5,
question: "Is dit een manuele pomp?",
mappings: [
{k: new Tag("manual", "yes"), txt: "Manuele pomp"},
{k: new Tag("manual", "no"), txt: "Automatische pomp"}
]
}
constructor() {
super(PumpManual.options);
}
}