Bike pump updates
This commit is contained in:
parent
9e43be6a07
commit
bb61f7777f
5 changed files with 95 additions and 36 deletions
|
@ -1,10 +1,9 @@
|
|||
import {LayerDefinition} from "../LayerDefinition";
|
||||
import {And, Or, Tag} from "../../Logic/TagsFilter";
|
||||
import {OperatorTag} from "../Questions/OperatorTag";
|
||||
import * as L from "leaflet";
|
||||
import { PumpManual } from "../Questions/PumpManual";
|
||||
import FixedText from "../Questions/FixedText";
|
||||
import {ImageCarouselWithUploadConstructor} from "../../UI/Image/ImageCarouselWithUpload";
|
||||
import {TagRenderingOptions} from "../TagRendering";
|
||||
|
||||
export class BikePumps extends LayerDefinition {
|
||||
|
||||
|
@ -14,12 +13,21 @@ export class BikePumps extends LayerDefinition {
|
|||
this.icon = "./assets/bike_pump.svg";
|
||||
|
||||
this.overpassFilter =
|
||||
new Or([
|
||||
new And([
|
||||
new Tag("amenity", "compressed_air"),
|
||||
new Tag("bicycle", "yes")
|
||||
]),
|
||||
new And([
|
||||
new Tag("amenity", "bicycle_repair_station"),
|
||||
new Tag("service:bicycle:pump", "yes"),
|
||||
/* new Or([
|
||||
new Tag("service:bicycle:tools", ""),
|
||||
new Tag("service:bicycle:tools", "no"),
|
||||
])*/
|
||||
]),
|
||||
]);
|
||||
|
||||
|
||||
this.newElementTags = [
|
||||
new Tag("amenity", "bicycle_repair_station"),
|
||||
new Tag("service:bicycle:pump", "yes"),
|
||||
|
@ -44,10 +52,51 @@ export class BikePumps extends LayerDefinition {
|
|||
this.title = new FixedText("Pomp");
|
||||
this.elementsToShow = [
|
||||
new ImageCarouselWithUploadConstructor(),
|
||||
// new NameQuestion(),
|
||||
// new AccessTag(),
|
||||
new OperatorTag(),
|
||||
new PumpManual()
|
||||
|
||||
new TagRenderingOptions({
|
||||
question: "What valves are supported?",
|
||||
mappings: [
|
||||
{
|
||||
k: new Tag("valves", " sclaverand;schrader;dunlop"),
|
||||
txt: "There is a default head, so Presta, Dunlop and Auto"
|
||||
},
|
||||
{k: new Tag("valves", "dunlop"), txt: "Only dunlop"},
|
||||
{k: new Tag("valves", "sclaverand"), txt: "Only Sclaverand (also known as Dunlop)"},
|
||||
{k: new Tag("valves", "auto"), txt: "Only auto"},
|
||||
],
|
||||
freeform: {
|
||||
key: "valves",
|
||||
template: "Supported valves are $$$",
|
||||
renderTemplate: "Supported valves are {valves}"
|
||||
}
|
||||
}),
|
||||
|
||||
new TagRenderingOptions({
|
||||
question: "Who maintains this bicycle pump?",
|
||||
freeform: {
|
||||
key: "operator",
|
||||
template: "Maintained by $$$",
|
||||
renderTemplate: "Maintained by {operator}",
|
||||
placeholder: "operator"
|
||||
}
|
||||
}),
|
||||
|
||||
new TagRenderingOptions({
|
||||
question: "Does the pump have a pressure indicator or manometer?",
|
||||
mappings: [
|
||||
{k: new Tag("manometer", "yes"), txt: "Yes, there is a manometer"},
|
||||
{k: new Tag("manometer", "yes"), txt: "No"}
|
||||
]
|
||||
|
||||
}),
|
||||
|
||||
/* new TagRenderingOptions({
|
||||
question: "Is dit een manuele pomp?",
|
||||
mappings: [
|
||||
{k: new Tag("manual", "yes"), txt: "Manuele pomp"},
|
||||
{k: new Tag("manual", "no"), txt: "Automatische pomp"}
|
||||
]
|
||||
}) */
|
||||
];
|
||||
|
||||
}
|
||||
|
|
|
@ -18,6 +18,39 @@ export class GhostBike extends LayerDefinition {
|
|||
" in the form of a white bicycle placed permanently near the accident location."),
|
||||
new ImageCarouselWithUploadConstructor(),
|
||||
|
||||
new TagRenderingOptions({
|
||||
question: "Whom is remembered by this ghost bike?" +
|
||||
"<span class='question-subtext'>" +
|
||||
"<br/>" +
|
||||
"Please respect privacy - only fill out the name if it is widely published or marked on the cycle." +
|
||||
"</span>",
|
||||
mappings: [{k: new Tag("noname", "yes"), txt: "There is no name marked on the bike"},],
|
||||
freeform: {
|
||||
key: "name",
|
||||
extraTags: new Tag("noname", ""),
|
||||
template: "$$$",
|
||||
renderTemplate: "In the remembrance of <b>{name}</b>",
|
||||
}
|
||||
}),
|
||||
new TagRenderingOptions({
|
||||
question: "When was the ghost bike installed?",
|
||||
freeform: {
|
||||
key: "start_date",
|
||||
template: "The ghost bike was placed on $$$", // TODO create a date picker
|
||||
renderTemplate: "The ghost bike was placed on <b>{start_date}</b>",
|
||||
}
|
||||
}),
|
||||
new TagRenderingOptions({
|
||||
question: "On what URL can more information be found?" +
|
||||
"<span class='question-subtext'>If available, add a link to a news report about the accident or about the placing of the ghost bike</span>",
|
||||
freeform: {
|
||||
key: "source",
|
||||
template: "More information available on $$$",
|
||||
renderTemplate: "<a href='{source}' target='_blank'>More information</a>",
|
||||
}
|
||||
}),
|
||||
|
||||
|
||||
|
||||
];
|
||||
|
||||
|
|
|
@ -1,23 +0,0 @@
|
|||
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);
|
||||
}
|
||||
|
||||
}
|
|
@ -23,10 +23,10 @@
|
|||
</div>
|
||||
|
||||
<div id="topleft-tools">
|
||||
Loading... If this message persists, check if javascript is enabled and if no extension (uMatrix) is
|
||||
blocking it.
|
||||
<div id="userbadge-and-search">
|
||||
<div id="userbadge">
|
||||
Loading... If this message persists, check if javascript is enabled and if no extension (uMatrix) is
|
||||
blocking it.
|
||||
</div>
|
||||
<br/>
|
||||
<div id="searchbox"></div>
|
||||
|
|
2
index.ts
2
index.ts
|
@ -80,7 +80,7 @@ if (window.location.search) {
|
|||
}
|
||||
|
||||
if (paramDict.layout) {
|
||||
defaultLayout = paramDict.quests
|
||||
defaultLayout = paramDict.layout
|
||||
}
|
||||
|
||||
if (paramDict.test) {
|
||||
|
|
Loading…
Reference in a new issue