Add email question, some tweaks
This commit is contained in:
commit
f67508336a
12 changed files with 123 additions and 69 deletions
|
@ -9,29 +9,20 @@ import Website from "../Questions/Website";
|
|||
import CafeRepair from "../Questions/bike/CafeRepair";
|
||||
import CafeDiy from "../Questions/bike/CafeDiy";
|
||||
import CafePump from "../Questions/bike/CafePump";
|
||||
import {EmailQuestion} from "../Questions/EmailQuestion";
|
||||
|
||||
|
||||
export default class BikeCafes extends LayerDefinition {
|
||||
private readonly repairsBikes = anyValueExcept("service:bicycle:repair", "no")
|
||||
private readonly hasPump = new Tag("service:bicycle:pump", "yes")
|
||||
private readonly diy = new Tag("service:bicycle:diy", "yes")
|
||||
private readonly bikeServices = [
|
||||
this.diy,
|
||||
this.repairsBikes,
|
||||
this.hasPump
|
||||
]
|
||||
private readonly to = Translations.t.cyclofix.cafe
|
||||
|
||||
constructor() {
|
||||
super();
|
||||
this.name = this.to.name;
|
||||
this.icon = "./assets/bike/cafe.svg";
|
||||
super()
|
||||
this.name = this.to.name
|
||||
this.icon = "./assets/bike/cafe.svg"
|
||||
this.overpassFilter = new And([
|
||||
new Tag("amenity", /^pub|bar|cafe$/),
|
||||
new Or([
|
||||
new Regex("amenity", "^pub|bar|cafe")
|
||||
]),
|
||||
new Or([
|
||||
...this.bikeServices,
|
||||
new Tag(/^service:bicycle:/, "*"),
|
||||
new Tag("pub", "cycling")
|
||||
])
|
||||
])
|
||||
|
@ -49,24 +40,24 @@ export default class BikeCafes extends LayerDefinition {
|
|||
|
||||
this.maxAllowedOverlapPercentage = 10;
|
||||
|
||||
this.minzoom = 13;
|
||||
this.style = this.generateStyleFunction();
|
||||
this.minzoom = 13
|
||||
this.style = this.generateStyleFunction()
|
||||
this.title = new FixedText(this.to.title)
|
||||
this.elementsToShow = [
|
||||
new ImageCarouselWithUploadConstructor(),
|
||||
new CafeName(),
|
||||
new PhoneNumberQuestion("{name}"),
|
||||
new Website("{name}"),
|
||||
new PhoneNumberQuestion("{name}"),
|
||||
new EmailQuestion("{name}"),
|
||||
new CafeRepair(),
|
||||
new CafeDiy(),
|
||||
new CafePump()
|
||||
];
|
||||
this.wayHandling = LayerDefinition.WAYHANDLING_CENTER_AND_WAY;
|
||||
|
||||
]
|
||||
this.wayHandling = LayerDefinition.WAYHANDLING_CENTER_AND_WAY
|
||||
}
|
||||
|
||||
private generateStyleFunction() {
|
||||
const self = this;
|
||||
const self = this
|
||||
return function (properties: any) {
|
||||
return {
|
||||
color: "#00bb00",
|
||||
|
@ -75,7 +66,7 @@ export default class BikeCafes extends LayerDefinition {
|
|||
iconSize: [50, 50],
|
||||
iconAnchor: [25,50]
|
||||
}
|
||||
};
|
||||
};
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
|
@ -16,19 +16,6 @@ import Website from "../Questions/Website";
|
|||
|
||||
export default class BikeOtherShops extends LayerDefinition {
|
||||
private readonly sellsBikes = new Tag("service:bicycle:retail", "yes")
|
||||
private readonly repairsBikes = anyValueExcept("service:bicycle:repair", "no")
|
||||
private readonly rentsBikes = new Tag("service:bicycle:rental", "yes")
|
||||
private readonly hasPump = new Tag("service:bicycle:pump", "yes")
|
||||
private readonly hasDiy = new Tag("service:bicycle:diy", "yes")
|
||||
private readonly sellsSecondHand = anyValueExcept("service:bicycle:repair", "no")
|
||||
private readonly hasBikeServices = new Or([
|
||||
this.sellsBikes,
|
||||
this.repairsBikes,
|
||||
// this.rentsBikes,
|
||||
// this.hasPump,
|
||||
// this.hasDiy,
|
||||
// this.sellsSecondHand
|
||||
])
|
||||
|
||||
private readonly to = Translations.t.cyclofix.nonBikeShop
|
||||
|
||||
|
@ -38,7 +25,7 @@ export default class BikeOtherShops extends LayerDefinition {
|
|||
this.icon = "./assets/bike/non_bike_repair_shop.svg"
|
||||
this.overpassFilter = new And([
|
||||
anyValueExcept("shop", "bicycle"),
|
||||
this.hasBikeServices
|
||||
new Tag(/^service:bicycle:/, "*"),
|
||||
])
|
||||
this.presets = []
|
||||
this.maxAllowedOverlapPercentage = 10
|
||||
|
|
|
@ -13,6 +13,7 @@ import ShopSecondHand from "../Questions/bike/ShopSecondHand";
|
|||
import { TagRenderingOptions } from "../TagRendering";
|
||||
import {PhoneNumberQuestion} from "../Questions/PhoneNumberQuestion";
|
||||
import Website from "../Questions/Website";
|
||||
import {EmailQuestion} from "../Questions/EmailQuestion";
|
||||
|
||||
|
||||
export default class BikeShops extends LayerDefinition {
|
||||
|
@ -56,8 +57,9 @@ export default class BikeShops extends LayerDefinition {
|
|||
this.elementsToShow = [
|
||||
new ImageCarouselWithUploadConstructor(),
|
||||
new ShopName(),
|
||||
new PhoneNumberQuestion("{name}"),
|
||||
new Website("{name}"),
|
||||
new PhoneNumberQuestion("{name}"),
|
||||
new EmailQuestion("{name}"),
|
||||
new ShopRetail(),
|
||||
new ShopRental(),
|
||||
new ShopRepair(),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue