Added manual pump question
This commit is contained in:
parent
75a3a70afa
commit
ee2777495b
5 changed files with 44 additions and 4 deletions
|
@ -4,6 +4,7 @@ import {GRB} from "./Layouts/GRB";
|
|||
import {Statues} from "./Layouts/Statues";
|
||||
import {Bookcases} from "./Layouts/Bookcases";
|
||||
import { BikePumps } from "./Layers/BikePumps";
|
||||
import { BikePumpsLayout } from "./Layouts/BikePumps";
|
||||
|
||||
export class AllKnownLayouts {
|
||||
public static allSets: any = AllKnownLayouts.AllLayouts();
|
||||
|
@ -12,7 +13,7 @@ export class AllKnownLayouts {
|
|||
const layouts = [
|
||||
new Groen(),
|
||||
new GRB(),
|
||||
new BikePumps(),
|
||||
new BikePumpsLayout(),
|
||||
/*new Toilets(),
|
||||
new Statues(),
|
||||
new Bookcases()*/
|
||||
|
|
|
@ -5,6 +5,8 @@ import {OperatorTag} from "../Questions/OperatorTag";
|
|||
import {NameQuestion} from "../Questions/NameQuestion";
|
||||
import {NameInline} from "../Questions/NameInline";
|
||||
import * as L from "leaflet";
|
||||
import { PumpManual } from "../Questions/PumpManual";
|
||||
import FixedName from "../Questions/FixedName";
|
||||
|
||||
export class BikePumps extends LayerDefinition {
|
||||
|
||||
|
@ -31,11 +33,12 @@ export class BikePumps extends LayerDefinition {
|
|||
|
||||
this.minzoom = 13;
|
||||
this.style = this.generateStyleFunction();
|
||||
this.title = new NameInline("pomp");
|
||||
this.title = new FixedName("pomp");
|
||||
this.elementsToShow = [
|
||||
// new NameQuestion(),
|
||||
// new AccessTag(),
|
||||
new OperatorTag()
|
||||
new OperatorTag(),
|
||||
new PumpManual()
|
||||
];
|
||||
|
||||
}
|
||||
|
|
|
@ -2,7 +2,7 @@ import {Layout} from "../Layout";
|
|||
import {GrbToFix} from "../Layers/GrbToFix";
|
||||
import { BikePumps } from "../Layers/BikePumps";
|
||||
|
||||
export class GRB extends Layout {
|
||||
export class BikePumpsLayout extends Layout {
|
||||
constructor() {
|
||||
super(
|
||||
"pomp",
|
||||
|
|
13
Customizations/Questions/FixedName.ts
Normal file
13
Customizations/Questions/FixedName.ts
Normal file
|
@ -0,0 +1,13 @@
|
|||
import { TagRenderingOptions } from "../TagRendering";
|
||||
|
||||
export default class FixedName extends TagRenderingOptions {
|
||||
constructor(category: string) {
|
||||
super({
|
||||
mappings: [
|
||||
{
|
||||
k: null, txt: category
|
||||
}
|
||||
]
|
||||
})
|
||||
}
|
||||
}
|
23
Customizations/Questions/PumpManual.ts
Normal file
23
Customizations/Questions/PumpManual.ts
Normal 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);
|
||||
}
|
||||
|
||||
}
|
Loading…
Reference in a new issue