mapcomplete/Customizations/Layers/BikePumps.ts

57 lines
1.5 KiB
TypeScript
Raw Normal View History

2020-07-07 14:00:27 +00:00
import {LayerDefinition} from "../LayerDefinition";
import {And, Or, Tag} from "../../Logic/TagsFilter";
import {OperatorTag} from "../Questions/OperatorTag";
import * as L from "leaflet";
2020-07-07 14:39:11 +00:00
import { PumpManual } from "../Questions/PumpManual";
import FixedText from "../Questions/FixedText";
import {ImageCarouselWithUploadConstructor} from "../../UI/Image/ImageCarouselWithUpload";
2020-07-07 14:00:27 +00:00
export class BikePumps extends LayerDefinition {
constructor() {
super();
this.name = "pomp";
this.icon = "./assets/bike_pump.svg";
2020-07-15 08:47:01 +00:00
this.overpassFilter =
2020-07-07 14:00:27 +00:00
new And([
new Tag("amenity", "bicycle_repair_station"),
new Tag("service:bicycle:pump", "yes"),
2020-07-15 08:47:01 +00:00
]);
2020-07-07 14:00:27 +00:00
this.newElementTags = [
new Tag("amenity", "bicycle_repair_station"),
new Tag("service:bicycle:pump", "yes"),
2020-07-07 14:00:27 +00:00
];
2020-07-15 08:47:01 +00:00
2020-07-07 14:00:27 +00:00
this.maxAllowedOverlapPercentage = 10;
this.minzoom = 13;
2020-07-15 08:47:01 +00:00
const self = this;
this.style = (properties: any) => {
return {
color: "#00bb00",
icon: new L.icon({
iconUrl: self.icon,
iconSize: [40, 40]
})
};
};
this.title = new FixedText("Pomp");
2020-07-07 14:00:27 +00:00
this.elementsToShow = [
new ImageCarouselWithUploadConstructor(),
2020-07-07 14:00:27 +00:00
// new NameQuestion(),
// new AccessTag(),
2020-07-07 14:39:11 +00:00
new OperatorTag(),
new PumpManual()
2020-07-07 14:00:27 +00:00
];
}
}