forked from MapComplete/MapComplete
Add translations + bike Shops
This commit is contained in:
parent
232664ee14
commit
2c92f5bbe2
26 changed files with 390 additions and 83 deletions
|
@ -5,12 +5,15 @@ import * as L from "leaflet";
|
|||
import FixedText from "../Questions/FixedText";
|
||||
import ParkingType from "../Questions/bike/ParkingType";
|
||||
import {ImageCarouselWithUploadConstructor} from "../../UI/Image/ImageCarouselWithUpload";
|
||||
import BikeStationOperator from "../Questions/bike/StationOperator";
|
||||
import Translations from "../../UI/i18n/Translations";
|
||||
import ParkingOperator from "../Questions/bike/ParkingOperator";
|
||||
|
||||
|
||||
export default class BikeParkings extends LayerDefinition {
|
||||
constructor() {
|
||||
super();
|
||||
this.name = "bike_parking";
|
||||
this.name = Translations.t.cylofix.parking.name.txt;
|
||||
this.icon = "./assets/bike/parking.svg";
|
||||
this.overpassFilter = new Tag("amenity", "bicycle_parking");
|
||||
this.newElementTags = [
|
||||
|
@ -20,10 +23,10 @@ export default class BikeParkings extends LayerDefinition {
|
|||
|
||||
this.minzoom = 13;
|
||||
this.style = this.generateStyleFunction();
|
||||
this.title = new FixedText("Fietsparking");
|
||||
this.title = new FixedText(Translations.t.cylofix.parking.title.txt)
|
||||
this.elementsToShow = [
|
||||
new ImageCarouselWithUploadConstructor(),
|
||||
new OperatorTag(),
|
||||
//new ParkingOperator(),
|
||||
new ParkingType()
|
||||
];
|
||||
|
||||
|
|
50
Customizations/Layers/BikeShops.ts
Normal file
50
Customizations/Layers/BikeShops.ts
Normal file
|
@ -0,0 +1,50 @@
|
|||
import { LayerDefinition } from "../LayerDefinition";
|
||||
import Translations from "../../UI/i18n/Translations";
|
||||
import { Tag } from "../../Logic/TagsFilter";
|
||||
import FixedText from "../Questions/FixedText";
|
||||
import { ImageCarouselWithUploadConstructor } from "../../UI/Image/ImageCarouselWithUpload";
|
||||
import * as L from "leaflet";
|
||||
import ShopRetail from "../Questions/bike/ShopRetail";
|
||||
import ShopPump from "../Questions/bike/ShopPump";
|
||||
import ShopRental from "../Questions/bike/ShopRental";
|
||||
import ShopRepair from "../Questions/bike/ShopRepair";
|
||||
|
||||
|
||||
export default class BikeShops extends LayerDefinition {
|
||||
constructor() {
|
||||
super();
|
||||
this.name = Translations.t.cylofix.shop.name.txt;
|
||||
this.icon = "./assets/bike/shop.svg";
|
||||
this.overpassFilter = new Tag("shop", "bicycle");
|
||||
this.newElementTags = [
|
||||
new Tag("shop", "bicycle"),
|
||||
];
|
||||
this.maxAllowedOverlapPercentage = 10;
|
||||
|
||||
this.minzoom = 13;
|
||||
this.style = this.generateStyleFunction();
|
||||
this.title = new FixedText(Translations.t.cylofix.shop.title.txt)
|
||||
this.elementsToShow = [
|
||||
new ImageCarouselWithUploadConstructor(),
|
||||
//new ParkingOperator(),
|
||||
new ShopRetail(),
|
||||
new ShopRental(),
|
||||
new ShopRepair(),
|
||||
new ShopPump(),
|
||||
];
|
||||
|
||||
}
|
||||
|
||||
private generateStyleFunction() {
|
||||
const self = this;
|
||||
return function (properties: any) {
|
||||
return {
|
||||
color: "#00bb00",
|
||||
icon: L.icon({
|
||||
iconUrl: self.icon,
|
||||
iconSize: [50, 50]
|
||||
})
|
||||
};
|
||||
};
|
||||
}
|
||||
}
|
|
@ -12,6 +12,7 @@ import PumpManometer from "../Questions/bike/PumpManometer";
|
|||
import {ImageCarouselWithUploadConstructor} from "../../UI/Image/ImageCarouselWithUpload";
|
||||
import PumpOperational from "../Questions/bike/PumpOperational";
|
||||
import PumpValves from "../Questions/bike/PumpValves";
|
||||
import Translations from "../../UI/i18n/Translations";
|
||||
|
||||
|
||||
export default class BikeStations extends LayerDefinition {
|
||||
|
@ -22,7 +23,7 @@ export default class BikeStations extends LayerDefinition {
|
|||
|
||||
constructor() {
|
||||
super();
|
||||
this.name = "bike station or pump";
|
||||
this.name = Translations.t.cylofix.station.name.txt;
|
||||
this.icon = "./assets/wrench.svg";
|
||||
|
||||
this.overpassFilter = new And([
|
||||
|
@ -37,7 +38,7 @@ export default class BikeStations extends LayerDefinition {
|
|||
|
||||
this.minzoom = 13;
|
||||
this.style = this.generateStyleFunction();
|
||||
this.title = new FixedText("Bike station");
|
||||
this.title = new FixedText(Translations.t.cylofix.station.title.txt)
|
||||
|
||||
this.elementsToShow = [
|
||||
new ImageCarouselWithUploadConstructor(),
|
||||
|
@ -51,7 +52,7 @@ export default class BikeStations extends LayerDefinition {
|
|||
new PumpValves().OnlyShowIf(this.pump),
|
||||
new PumpOperational().OnlyShowIf(this.pump),
|
||||
|
||||
new BikeStationOperator(),
|
||||
// new BikeStationOperator(),
|
||||
// new BikeStationBrand() DISABLED
|
||||
];
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue