From 02c2e48293397b6a767bbe1f222898edfbda22fc Mon Sep 17 00:00:00 2001 From: Pieter Vander Vennet Date: Wed, 16 Sep 2020 01:29:38 +0200 Subject: [PATCH] Porting cyclofix-shops to a .json definition, removing now unneeded classes --- Customizations/JSON/FromJSON.ts | 5 +- Customizations/Layers/BikeOtherShops.ts | 29 +- Customizations/Layers/BikeShops.ts | 88 ---- Customizations/Layouts/Cyclofix.ts | 3 +- Customizations/Questions/EmailQuestion.ts | 18 - .../Questions/PhoneNumberQuestion.ts | 18 - Customizations/Questions/Website.ts | 17 - Customizations/Questions/bike/ShopDiy.ts | 18 - Customizations/Questions/bike/ShopName.ts | 17 - Customizations/Questions/bike/ShopPump.ts | 18 - Customizations/Questions/bike/ShopRental.ts | 18 - Customizations/Questions/bike/ShopRepair.ts | 20 - Customizations/Questions/bike/ShopRetail.ts | 18 - .../Questions/bike/ShopSecondHand.ts | 19 - State.ts | 4 +- UI/CustomGenerator/LayerPanel.ts | 2 +- UI/i18n/Translations.ts | 283 ------------ assets/bike/other_services.svg | 5 - assets/layers/bike_cafe/bike_cafes.json | 6 +- .../bike_repair_station.json | 11 +- assets/layers/bike_shop/bike_shop.json | 401 ++++++++++++++++++ .../bike_shop}/repair_shop.svg | 0 assets/{bike => layers/bike_shop}/shop.svg | 0 23 files changed, 428 insertions(+), 590 deletions(-) delete mode 100644 Customizations/Layers/BikeShops.ts delete mode 100644 Customizations/Questions/EmailQuestion.ts delete mode 100644 Customizations/Questions/PhoneNumberQuestion.ts delete mode 100644 Customizations/Questions/Website.ts delete mode 100644 Customizations/Questions/bike/ShopDiy.ts delete mode 100644 Customizations/Questions/bike/ShopName.ts delete mode 100644 Customizations/Questions/bike/ShopPump.ts delete mode 100644 Customizations/Questions/bike/ShopRental.ts delete mode 100644 Customizations/Questions/bike/ShopRepair.ts delete mode 100644 Customizations/Questions/bike/ShopRetail.ts delete mode 100644 Customizations/Questions/bike/ShopSecondHand.ts delete mode 100644 assets/bike/other_services.svg create mode 100644 assets/layers/bike_shop/bike_shop.json rename assets/{bike => layers/bike_shop}/repair_shop.svg (100%) rename assets/{bike => layers/bike_shop}/shop.svg (100%) diff --git a/Customizations/JSON/FromJSON.ts b/Customizations/JSON/FromJSON.ts index 57a015b..1ff25a6 100644 --- a/Customizations/JSON/FromJSON.ts +++ b/Customizations/JSON/FromJSON.ts @@ -18,7 +18,7 @@ import * as birdhides from "../../assets/layers/bird_hide/birdhides.json" import * as nature_reserve from "../../assets/layers/nature_reserve/nature_reserve.json" import * as bike_cafes from "../../assets/layers/bike_cafe/bike_cafes.json" import * as cycling_themed_objects from "../../assets/layers/cycling_themed_object/cycling_themed_objects.json" - +import * as bike_shops from "../../assets/layers/bike_shop/bike_shop.json" import {Utils} from "../../Utils"; import ImageCarouselWithUploadConstructor from "../../UI/Image/ImageCarouselWithUpload"; import {ImageCarouselConstructor} from "../../UI/Image/ImageCarousel"; @@ -44,7 +44,8 @@ export class FromJSON { FromJSON.Layer(birdhides), FromJSON.Layer(nature_reserve), FromJSON.Layer(bike_cafes), - FromJSON.Layer(cycling_themed_objects) + FromJSON.Layer(cycling_themed_objects), + FromJSON.Layer(bike_shops) ]; for (const layer of sharedLayersList) { diff --git a/Customizations/Layers/BikeOtherShops.ts b/Customizations/Layers/BikeOtherShops.ts index 6dfb7be..e014dbe 100644 --- a/Customizations/Layers/BikeOtherShops.ts +++ b/Customizations/Layers/BikeOtherShops.ts @@ -1,16 +1,6 @@ import {LayerDefinition} from "../LayerDefinition"; import Translations from "../../UI/i18n/Translations"; import {And, RegexTag, Tag} from "../../Logic/Tags"; -import ImageCarouselWithUploadConstructor from "../../UI/Image/ImageCarouselWithUpload"; -import ShopRetail from "../Questions/bike/ShopRetail"; -import ShopPump from "../Questions/bike/ShopPump"; -import ShopRental from "../Questions/bike/ShopRental"; -import ShopRepair from "../Questions/bike/ShopRepair"; -import ShopDiy from "../Questions/bike/ShopDiy"; -import ShopName from "../Questions/bike/ShopName"; -import ShopSecondHand from "../Questions/bike/ShopSecondHand"; -import {PhoneNumberQuestion} from "../Questions/PhoneNumberQuestion"; -import Website from "../Questions/Website"; import {TagRenderingOptions} from "../TagRenderingOptions"; @@ -59,16 +49,15 @@ export default class BikeOtherShops extends LayerDefinition { }) this.elementsToShow = [ - new ImageCarouselWithUploadConstructor(), - new ShopName(), - new PhoneNumberQuestion("{name}"), - new Website("{name}"), - new ShopRetail(), - new ShopRental(), - new ShopRepair(), - new ShopPump(), - new ShopDiy(), - new ShopSecondHand() + // new ImageCarouselWithUploadConstructor(), + // new PhoneNumberQuestion("{name}"), + // new Website("{name}"), + // ShopRetail + // new ShopRental(), + // new ShopRepair(), + // new ShopPump(), + // new ShopDiy(), + // new ShopSecondHand() ] } diff --git a/Customizations/Layers/BikeShops.ts b/Customizations/Layers/BikeShops.ts deleted file mode 100644 index 5537ca5..0000000 --- a/Customizations/Layers/BikeShops.ts +++ /dev/null @@ -1,88 +0,0 @@ -import {LayerDefinition} from "../LayerDefinition"; -import Translations from "../../UI/i18n/Translations"; -import {And, Tag} from "../../Logic/Tags"; -import ImageCarouselWithUploadConstructor from "../../UI/Image/ImageCarouselWithUpload"; -import ShopRetail from "../Questions/bike/ShopRetail"; -import ShopPump from "../Questions/bike/ShopPump"; -import ShopRental from "../Questions/bike/ShopRental"; -import ShopRepair from "../Questions/bike/ShopRepair"; -import ShopDiy from "../Questions/bike/ShopDiy"; -import ShopName from "../Questions/bike/ShopName"; -import ShopSecondHand from "../Questions/bike/ShopSecondHand"; -import {PhoneNumberQuestion} from "../Questions/PhoneNumberQuestion"; -import Website from "../Questions/Website"; -import {EmailQuestion} from "../Questions/EmailQuestion"; -import {TagRenderingOptions} from "../TagRenderingOptions"; - - -export default class BikeShops extends LayerDefinition { - private readonly sellsBikes = new Tag("service:bicycle:retail", "yes") - - constructor() { - super("bikeshop"); - this.name = Translations.t.cyclofix.shop.name - this.icon = "./assets/bike/repair_shop.svg" - this.overpassFilter = new Tag("shop", "bicycle"); - this.presets = [{ - title: Translations.t.cyclofix.shop.title, - tags: [ - new Tag("shop", "bicycle"), - ] - }] - this.maxAllowedOverlapPercentage = 10 - this.wayHandling = LayerDefinition.WAYHANDLING_CENTER_AND_WAY - - this.minzoom = 13; - this.style = this.generateStyleFunction(); - this.title = new TagRenderingOptions({ - mappings: [ - {k: new And([new Tag("name", "*"), this.sellsBikes]), txt: Translations.t.cyclofix.shop.titleShopNamed}, - { - k: new And([new Tag("name", "*"), new Tag("service:bicycle:retail", "")]), - txt: Translations.t.cyclofix.shop.titleShop - }, - { - k: new And([new Tag("name", "*"), new Tag("service:bicycle:retail", "no")]), - txt: Translations.t.cyclofix.shop.titleRepairNamed - }, - {k: this.sellsBikes, txt: Translations.t.cyclofix.shop.titleShop}, - {k: new Tag("service:bicycle:retail", " "), txt: Translations.t.cyclofix.shop.title}, - {k: new Tag("service:bicycle:retail", "no"), txt: Translations.t.cyclofix.shop.titleRepair}, - ] - }) - - this.elementsToShow = [ - new ImageCarouselWithUploadConstructor(), - new ShopName(), - new Website("{name}"), - new PhoneNumberQuestion("{name}"), - new EmailQuestion("{name}"), - new ShopRetail(), - new ShopRental(), - new ShopRepair(), - new ShopPump(), - new ShopDiy(), - new ShopSecondHand() - ] - } - - private generateStyleFunction() { - const self = this; - return function (tags: any) { - let icon = "assets/bike/repair_shop.svg"; - - if (self.sellsBikes.matchesProperties(tags)) { - icon = "assets/bike/shop.svg"; - } - - return { - color: "#00bb00", - icon: { - iconUrl: icon, - iconSize: [50, 50], - iconAnchor: [25, 50] - } - } - } - } -} diff --git a/Customizations/Layouts/Cyclofix.ts b/Customizations/Layouts/Cyclofix.ts index 4206c9d..83c7a9a 100644 --- a/Customizations/Layouts/Cyclofix.ts +++ b/Customizations/Layouts/Cyclofix.ts @@ -1,5 +1,4 @@ import {Layout} from "../Layout"; -import BikeShops from "../Layers/BikeShops"; import Translations from "../../UI/i18n/Translations"; import Combine from "../../UI/Base/Combine"; import BikeOtherShops from "../Layers/BikeOtherShops"; @@ -20,7 +19,7 @@ export default class Cyclofix extends Layout { "cyclofix", ["en", "nl", "fr", "gl","de"], Translations.t.cyclofix.title, - ["bike_repair_station", "bike_cafes", new BikeShops(), "drinking_water", "bike_parking", new BikeOtherShops(),"bike_themed_object", + ["bike_repair_station", "bike_cafes", "bike_shops", "drinking_water", "bike_parking", new BikeOtherShops(),"bike_themed_object", // The first of november, halloween and the second of november, we remember our dead ...(Cyclofix.RememberTheDead() ? ["ghost_bike"] : [])], 16, diff --git a/Customizations/Questions/EmailQuestion.ts b/Customizations/Questions/EmailQuestion.ts deleted file mode 100644 index 6120ea8..0000000 --- a/Customizations/Questions/EmailQuestion.ts +++ /dev/null @@ -1,18 +0,0 @@ -import {UIElement} from "../../UI/UIElement"; -import Translations from "../../UI/i18n/Translations"; -import {TagRenderingOptions} from "../TagRenderingOptions"; - -export class EmailQuestion extends TagRenderingOptions { - - constructor(category: string | UIElement) { - super({ - question: Translations.t.general.questions.emailOf.Subs({category: category}), - freeform: { - renderTemplate: Translations.t.general.questions.emailIs.Subs({category: category}), - template: "$email$", - key: "email" - } - }); - } - -} \ No newline at end of file diff --git a/Customizations/Questions/PhoneNumberQuestion.ts b/Customizations/Questions/PhoneNumberQuestion.ts deleted file mode 100644 index 7033766..0000000 --- a/Customizations/Questions/PhoneNumberQuestion.ts +++ /dev/null @@ -1,18 +0,0 @@ -import {UIElement} from "../../UI/UIElement"; -import Translations from "../../UI/i18n/Translations"; -import {TagRenderingOptions} from "../TagRenderingOptions"; - -export class PhoneNumberQuestion extends TagRenderingOptions { - - constructor(category: string | UIElement) { - super({ - question: Translations.t.general.questions.phoneNumberOf.Subs({category: category}), - freeform: { - renderTemplate: Translations.t.general.questions.phoneNumberIs.Subs({category: category}), - template: "$phone$", - key: "phone" - } - }); - } - -} \ No newline at end of file diff --git a/Customizations/Questions/Website.ts b/Customizations/Questions/Website.ts deleted file mode 100644 index ce3f3ca..0000000 --- a/Customizations/Questions/Website.ts +++ /dev/null @@ -1,17 +0,0 @@ -import {UIElement} from "../../UI/UIElement"; -import Translations from "../../UI/i18n/Translations"; -import {TagRenderingOptions} from "../TagRenderingOptions"; - - -export default class Website extends TagRenderingOptions { - constructor(category: string | UIElement) { - super({ - question: Translations.t.general.questions.websiteOf.Subs({category: category}), - freeform: { - renderTemplate: Translations.t.general.questions.websiteIs, - template: "$$$", - key: "website" - } - }); - } -} diff --git a/Customizations/Questions/bike/ShopDiy.ts b/Customizations/Questions/bike/ShopDiy.ts deleted file mode 100644 index 2a643a7..0000000 --- a/Customizations/Questions/bike/ShopDiy.ts +++ /dev/null @@ -1,18 +0,0 @@ -import {Tag} from "../../../Logic/Tags"; -import Translations from "../../../UI/i18n/Translations"; -import {TagRenderingOptions} from "../../TagRenderingOptions"; - - -export default class ShopDiy extends TagRenderingOptions { - constructor() { - const key = 'service:bicycle:diy' - const to = Translations.t.cyclofix.shop.diy - super({ - question: to.question, - mappings: [ - {k: new Tag(key, "yes"), txt: to.yes}, - {k: new Tag(key, "no"), txt: to.no}, - ] - }); - } -} diff --git a/Customizations/Questions/bike/ShopName.ts b/Customizations/Questions/bike/ShopName.ts deleted file mode 100644 index 1dd1f48..0000000 --- a/Customizations/Questions/bike/ShopName.ts +++ /dev/null @@ -1,17 +0,0 @@ -import Translations from "../../../UI/i18n/Translations"; -import {TagRenderingOptions} from "../../TagRenderingOptions"; - - -export default class ShopPump extends TagRenderingOptions { - constructor() { - const to = Translations.t.cyclofix.shop.qName - super({ - question: to.question, - freeform: { - key: "name", - renderTemplate: to.render, - template: to.template - } - }) - } -} diff --git a/Customizations/Questions/bike/ShopPump.ts b/Customizations/Questions/bike/ShopPump.ts deleted file mode 100644 index efa2365..0000000 --- a/Customizations/Questions/bike/ShopPump.ts +++ /dev/null @@ -1,18 +0,0 @@ -import {Tag} from "../../../Logic/Tags"; -import Translations from "../../../UI/i18n/Translations"; -import {TagRenderingOptions} from "../../TagRenderingOptions"; - - -export default class ShopPump extends TagRenderingOptions { - constructor() { - const key = 'service:bicycle:pump' - const to = Translations.t.cyclofix.shop.pump - super({ - question: to.question, - mappings: [ - {k: new Tag(key, "yes"), txt: to.yes}, - {k: new Tag(key, "no"), txt: to.no}, - ] - }); - } -} diff --git a/Customizations/Questions/bike/ShopRental.ts b/Customizations/Questions/bike/ShopRental.ts deleted file mode 100644 index 412b923..0000000 --- a/Customizations/Questions/bike/ShopRental.ts +++ /dev/null @@ -1,18 +0,0 @@ -import {Tag} from "../../../Logic/Tags"; -import Translations from "../../../UI/i18n/Translations"; -import {TagRenderingOptions} from "../../TagRenderingOptions"; - - -export default class ShopRental extends TagRenderingOptions { - constructor() { - const key = 'service:bicycle:rental' - const to = Translations.t.cyclofix.shop.rental - super({ - question: to.question, - mappings: [ - {k: new Tag(key, "yes"), txt: to.yes}, - {k: new Tag(key, "no"), txt: to.no}, - ] - }); - } -} diff --git a/Customizations/Questions/bike/ShopRepair.ts b/Customizations/Questions/bike/ShopRepair.ts deleted file mode 100644 index 1196820..0000000 --- a/Customizations/Questions/bike/ShopRepair.ts +++ /dev/null @@ -1,20 +0,0 @@ -import {Tag} from "../../../Logic/Tags"; -import Translations from "../../../UI/i18n/Translations"; -import {TagRenderingOptions} from "../../TagRenderingOptions"; - - -export default class ShopRepair extends TagRenderingOptions { - constructor() { - const key = 'service:bicycle:repair' - const to = Translations.t.cyclofix.shop.repair - super({ - question: to.question, - mappings: [ - {k: new Tag(key, "yes"), txt: to.yes}, - {k: new Tag(key, "only_sold"), txt: to.sold}, - {k: new Tag(key, "brand"), txt: to.brand}, - {k: new Tag(key, "no"), txt: to.no}, - ] - }); - } -} diff --git a/Customizations/Questions/bike/ShopRetail.ts b/Customizations/Questions/bike/ShopRetail.ts deleted file mode 100644 index 9f268c1..0000000 --- a/Customizations/Questions/bike/ShopRetail.ts +++ /dev/null @@ -1,18 +0,0 @@ -import {Tag} from "../../../Logic/Tags"; -import Translations from "../../../UI/i18n/Translations"; -import {TagRenderingOptions} from "../../TagRenderingOptions"; - - -export default class ShopRetail extends TagRenderingOptions { - constructor() { - const key = 'service:bicycle:retail' - const to = Translations.t.cyclofix.shop.retail - super({ - question: to.question, - mappings: [ - {k: new Tag(key, "yes"), txt: to.yes}, - {k: new Tag(key, "no"), txt: to.no}, - ] - }); - } -} diff --git a/Customizations/Questions/bike/ShopSecondHand.ts b/Customizations/Questions/bike/ShopSecondHand.ts deleted file mode 100644 index c8f3379..0000000 --- a/Customizations/Questions/bike/ShopSecondHand.ts +++ /dev/null @@ -1,19 +0,0 @@ -import {Tag} from "../../../Logic/Tags"; -import Translations from "../../../UI/i18n/Translations"; -import {TagRenderingOptions} from "../../TagRenderingOptions"; - - -export default class ShopPump extends TagRenderingOptions { - constructor() { - const key = 'service:bicycle:second_hand' - const to = Translations.t.cyclofix.shop.secondHand - super({ - question: to.question, - mappings: [ - {k: new Tag(key, "yes"), txt: to.yes}, - {k: new Tag(key, "no"), txt: to.no}, - {k: new Tag(key, "only"), txt: to.only}, - ] - }); - } -} diff --git a/State.ts b/State.ts index 8ad6604..386879d 100644 --- a/State.ts +++ b/State.ts @@ -33,8 +33,6 @@ export class State { tagsVisibleAndWikiLinked: 150, themeGeneratorReadOnlyUnlock: 200, themeGeneratorFullUnlock: 500, - - }; public static runningFromConsole: boolean = false; @@ -118,7 +116,7 @@ export class State { str => isNaN(Number(str)) ? 0 : Number(str),[],n => ""+n ); - constructor(layoutToUse: Layout, useDevServer = false) { + constructor(layoutToUse: Layout) { const self = this; this.layoutToUse.setData(layoutToUse) this.locationControl = new UIEventSource<{ lat: number, lon: number, zoom: number }>({ diff --git a/UI/CustomGenerator/LayerPanel.ts b/UI/CustomGenerator/LayerPanel.ts index 97e3796..563d577 100644 --- a/UI/CustomGenerator/LayerPanel.ts +++ b/UI/CustomGenerator/LayerPanel.ts @@ -96,7 +96,7 @@ export default class LayerPanel extends UIElement { {value: 2, shown: "Show both the ways/areas and the centerpoints"}, {value: 1, shown: "Show everything as centerpoint"}]), "wayHandling", "Way handling", "Describes how ways and areas are represented on the map: areas can be represented as the area itself, or it can be converted into the centerpoint"), - setting(TextField.NumberInput("nat", n => n <= 100), "hideUnderlayingFeaturesMinPercentage", "Max allowed overlap percentage", + setting(TextField.NumberInput("int", n => n <= 100), "hideUnderlayingFeaturesMinPercentage", "Max allowed overlap percentage", "Consider that we want to show 'Nature Reserves' and 'Forests'. Now, ofter, there are pieces of forest mapped _in_ the nature reserve.
" + "Now, showing those pieces of forest overlapping with the nature reserve truly clutters the map and is very user-unfriendly.
" + "The features are placed layer by layer. If a feature below a feature on this layer overlaps for more then 'x'-percent, the underlying feature is hidden."), diff --git a/UI/i18n/Translations.ts b/UI/i18n/Translations.ts index 19f5a45..0f40083 100644 --- a/UI/i18n/Translations.ts +++ b/UI/i18n/Translations.ts @@ -48,289 +48,6 @@ export default class Translations { "Alle Änderungen, die Sie vornehmen, werden automatisch in der globalen Datenbank von OpenStreetMap gespeichert und können von anderen frei wiederverwendet werden.

" + "Weitere Informationen über das Projekt Cyclofix finden Sie unter cyclofix.osm.be." }), - - station: { - name: new T({ - en: 'bike station (repair, pump or both)', - nl: 'fietspunt (herstel, pomp of allebei)', - fr: 'station velo (réparation, pompe à vélo)', - gl: 'estación de bicicletas (arranxo, bomba de ar ou ambos)', - de: 'Fahrradstation (Reparatur, Pumpe oder beides)' - }), - // title: new T({en: 'Bike station', nl: 'Fietsstation', fr: 'Station vélo', gl: 'Estación de bicicletas'}), Old, non-dynamic title - titlePump: new T({ - - }), - titleRepair: new T({ - en: 'Bike repair station', - nl: 'Herstelpunt', - fr: 'TODO: fr', - gl: 'Estación de arranxo de bicicletas', - de: 'Fahrradwerkstatt' - }), - titlePumpAndRepair: new T({ - en: 'Bike station (pump & repair)', - nl: 'Herstelpunt met pomp', - fr: 'Point station velo avec pompe', - gl: 'Estación de bicicletas (arranxo e bomba de ar)', - de: 'Fahrradstation (Pumpe & Reparatur)' - }), - - valves: { - - default: new T({ - }), - dunlop: new T({}), - sclaverand: new T({ - - }), - - template: new T({ - en: 'Some other valve(s): $$$', - nl: 'Een ander type ventiel(en): $$$', - fr: 'Autre(s) type(s) de valve(s): $$$', - gl: 'Algunha outra válvula: $$$', - de: 'Andere(s) Ventil(e): $$$' - }) - }, - }, - shop: { - name: new T({ - en: "bike repair/shop", - nl: "fietszaak", - fr: "magasin ou réparateur de vélo", - gl: "tenda/arranxo de bicicletas", - de: "fahrradwerkstatt/geschäft" - }), - - title: new T({ - en: "Bike repair/shop", - nl: "Fietszaak", - fr: "Magasin et réparateur de vélo", - gl: "Tenda/arranxo de bicicletas", - de: "Fahrradwerkstatt/geschäft" - }), - titleRepair: new T({ - en: "Bike repair", - nl: "Fietsenmaker", - fr: "Réparateur de vélo", - gl: "Arranxo de bicicletas", - de: "Fahrradwerkstatt" - }), - titleShop: new T({ - en: "Bike shop", - nl: "Fietswinkel", - fr: "Magasin de vélo", - gl: "Tenda de bicicletas", - de: "Fahrradgeschäft" - }), - - titleNamed: new T({ - en: "Bike repair/shop {name}", - nl: "Fietszaak {name}", - fr: "Magasin et réparateur de vélo {name}", - gl: "Tenda/arranxo de bicicletas {name}", - de: "Fahrradwerkstatt/geschäft {name}" - }), - titleRepairNamed: new T({ - en: "Bike repair {name}", - nl: "Fietsenmaker {name}", - fr: "Réparateur de vélo {name}", - gl: "Arranxo de bicicletas {name}", - de: "Fahrradwerkstatt {name}" - }), - titleShopNamed: new T({ - en: "Bike shop {name}", - nl: "Fietswinkel {name}", - fr: "Magasin de vélo {name}", - gl: "Tenda de bicicletas {name}", - de: "Fahrradgeschäft {name}" - }), - - - retail: { - question: new T({ - en: "Does this shop sell bikes?", - nl: "Verkoopt deze winkel fietsen?", - fr: "Est-ce que ce magasin vend des vélos?", - gl: "Esta tenda vende bicicletas?", - de: "Verkauft dieser Laden Fahrräder?" - }), - yes: new T({ - en: "This shop sells bikes", - nl: "Deze winkel verkoopt fietsen", - fr: "Ce magasin vend des vélos", - gl: "Esta tenda vende bicicletas", - de: "Dieses Geschäft verkauft Fahrräder" - }), - no: new T({ - en: "This shop doesn't sell bikes", - nl: "Deze winkel verkoopt geen fietsen", - fr: "Ce magasin ne vend pas de vélo", - gl: "Esta tenda non vende bicicletas", - de: "Dieses Geschäft verkauft keine Fahrräder" - }), - }, - repair: { - question: new T({ - en: "Does this shop repair bikes?", - nl: "Herstelt deze winkel fietsen?", - fr: "Est-ce que ce magasin répare des vélos?", - gl: "Esta tenda arranxa bicicletas?", - de: "Repariert dieses Geschäft Fahrräder?" - }), - yes: new T({ - en: "This shop repairs bikes", - nl: "Deze winkel herstelt fietsen", - fr: "Ce magasin répare des vélos", - gl: "Esta tenda arranxa bicicletas", - de: "Dieses Geschäft repariert Fahrräder", - }), - no: new T({ - en: "This shop doesn't repair bikes", - nl: "Deze winkel herstelt geen fietsen", - fr: "Ce magasin ne répare pas les vélos", - gl: "Esta tenda non arranxa bicicletas", - de: "Dieses Geschäft repariert keine Fahrräder" - }), - sold: new T({ - en: "This shop only repairs bikes bought here", - nl: "Deze winkel herstelt enkel fietsen die hier werden gekocht", - fr: "Ce magasin ne répare seulement les vélos achetés là-bas", - gl: "Esta tenda só arranxa bicicletas mercadas aquí", - de: "Dieses Geschäft repariert nur hier gekaufte Fahrräder" - }), - brand: new T({ - en: "This shop only repairs bikes of a certain brand", - nl: "Deze winkel herstelt enkel fietsen van een bepaald merk", - fr: "Ce magasin ne répare seulement des marques spécifiques", - gl: "Esta tenda só arranxa bicicletas dunha certa marca", - de: "Dieses Geschäft repariert nur Fahrräder einer bestimmten Marke" - }), - }, - rental: { - question: new T({ - en: "Does this shop rent out bikes?", - nl: "Verhuurt deze winkel fietsen?", - fr: "Est-ce ce magasin loue des vélos?", - gl: "Esta tenda aluga bicicletas?", - de: "Vermietet dieser Laden Fahrräder?" - }), - yes: new T({ - en: "This shop rents out bikes", - nl: "Deze winkel verhuurt fietsen", - fr: "Ce magasin loue des vélos", - gl: "Esta tenda aluga bicicletas", - de: "Dieses Geschäft vermietet Fahrräder" - }), - no: new T({ - en: "This shop doesn't rent out bikes", - nl: "Deze winkel verhuurt geen fietsen", - fr: "Ce magasin ne loue pas de vélos", - gl: "Esta tenda non aluga bicicletas", - de: "Dieses Geschäft vermietet keine Fahrräder" - }), - }, - pump: { - question: new T({ - en: "Does this shop offer a bike pump for use by anyone?", - nl: "Biedt deze winkel een fietspomp aan voor iedereen?", - fr: "Est-ce que ce magasin offre une pompe en accès libre?", - gl: "Esta tenda ofrece unha bomba de ar para uso de calquera persoa?", - de: "Bietet dieses Geschäft eine Fahrradpumpe zur Benutzung für alle an?" - }), - yes: new T({ - en: "This shop offers a bike pump for anyone", - nl: "Deze winkel biedt geen fietspomp aan voor eender wie", - fr: "Ce magasin offre une pompe en acces libre", - gl: "Esta tenda ofrece unha bomba de ar para uso de calquera persoa", - de: "Dieses Geschäft bietet eine Fahrradpumpe für alle an" - }), - no: new T({ - en: "This shop doesn't offer a bike pump for anyone", - nl: "Deze winkel biedt een fietspomp aan voor iedereen", - fr: "Ce magasin n'offre pas de pompe en libre accès", - gl: "Esta tenda non ofrece unha bomba de ar para uso de calquera persoa", - de: "Dieses Geschäft bietet für niemanden eine Fahrradpumpe an" - }) - }, - qName: { - question: new T({ - en: "What is the name of this bicycle shop?", - nl: "Wat is de naam van deze fietszaak?", - fr: "Quel est le nom du magasin de vélo?", - gl: "Cal é o nome desta tenda de bicicletas?", - de: "Wie heißt dieser Fahrradladen?" - }), - render: new T({ - en: "This bicycle shop is called {name}", - nl: "Deze fietszaak heet {name}", - fr: "Ce magasin s'appelle {name}", - gl: "Esta tenda de bicicletas chámase {name}", - de: "Dieses Fahrradgeschäft heißt {name}", - }), - template: new T({ - en: "This bicycle shop is called: $$$", - nl: "Deze fietszaak heet: $$$", - fr: "Ce magasin s'appelle $$$", - gl: "Esta tenda de bicicletas chámase: $$$", - de: "Dieses Fahrradgeschäft heißt: $$$" - }) - }, - secondHand: { - question: new T({ - en: "Does this shop sell second-hand bikes?", - nl: "Verkoopt deze winkel tweedehands fietsen?", - fr: "Est-ce ce magasin vend des vélos d'occasion", - gl: "Esta tenda vende bicicletas de segunda man?", - de: "Verkauft dieses Geschäft gebrauchte Fahrräder?" - }), - yes: new T({ - en: "This shop sells second-hand bikes", - nl: "Deze winkel verkoopt tweedehands fietsen", - fr: "Ce magasin vend des vélos d'occasion", - gl: "Esta tenda vende bicicletas de segunda man", - de: "Dieses Geschäft verkauft gebrauchte Fahrräder" - }), - no: new T({ - en: "This shop doesn't sell second-hand bikes", - nl: "Deze winkel verkoopt geen tweedehands fietsen", - fr: "Ce magasin ne vend pas de vélos d'occasion", - gl: "Esta tenda non vende bicicletas de segunda man", - de: "Dieses Geschäft verkauft keine gebrauchten Fahrräder" - }), - only: new T({ - en: "This shop only sells second-hand bikes", - nl: "Deze winkel verkoopt enkel tweedehands fietsen", - fr: "Ce magasin vend seulement des vélos d'occasion", - gl: "Esta tenda só vende bicicletas de segunda man", - de: "Dieses Geschäft verkauft nur gebrauchte Fahrräder" - }), - }, - diy: { - question: new T({ - en: "Are there tools here to repair your own bike?", - nl: "Biedt deze winkel gereedschap aan om je fiets zelf te herstellen?", - fr: "Est-ce qu'il y a des outils pour réparer son vélo dans ce magasin?", - gl: "Hai ferramentas aquí para arranxar a túa propia bicicleta?", - de: "Gibt es hier Werkzeuge, um das eigene Fahrrad zu reparieren?" - }), - yes: new T({ - en: "This shop offers tools for DIY repair", - nl: "Deze winkel biedt gereedschap aan om je fiets zelf te herstellen", - fr: "Ce magasin offre des outils pour réparer son vélo soi-même", - gl: "Hai ferramentas aquí para arranxar a túa propia bicicleta", - de: "Dieses Geschäft bietet Werkzeuge für die Heimwerkerreparatur an" - }), - no: new T({ - en: "This shop doesn't offer tools for DIY repair", - nl: "Deze winkel biedt geen gereedschap aan om je fiets zelf te herstellen", - fr: "Ce magasin n'offre pas des outils pour réparer son vélo soi-même", - gl: "Non hai ferramentas aquí para arranxar a túa propia bicicleta", - de: "Dieses Geschäft bietet keine Werkzeuge für Heimwerkerreparaturen an" - }), - } - }, nonBikeShop: { name: new T({ en: "shop that sells/repairs bikes", diff --git a/assets/bike/other_services.svg b/assets/bike/other_services.svg deleted file mode 100644 index 2cec6d1..0000000 --- a/assets/bike/other_services.svg +++ /dev/null @@ -1,5 +0,0 @@ - - - - - diff --git a/assets/layers/bike_cafe/bike_cafes.json b/assets/layers/bike_cafe/bike_cafes.json index f0fb15f..2393114 100644 --- a/assets/layers/bike_cafe/bike_cafes.json +++ b/assets/layers/bike_cafe/bike_cafes.json @@ -174,7 +174,11 @@ "fr": "Quel est l'adresse email de {name}?", "gl": "Cal é o enderezo de correo electrónico de {name}?" }, - "render": "{email}" + "render": "{email}", + "freeform": { + "key": "email", + "type": "email" + } } ], "hideUnderlayingFeaturesMinPercentage": 0, diff --git a/assets/layers/bike_repair_station/bike_repair_station.json b/assets/layers/bike_repair_station/bike_repair_station.json index 21f8f7e..48b73c3 100644 --- a/assets/layers/bike_repair_station/bike_repair_station.json +++ b/assets/layers/bike_repair_station/bike_repair_station.json @@ -4,7 +4,8 @@ "en": "Bike stations (repair, pump or both)", "nl": "Fietspunten (herstel, pomp of allebei)", "fr": "Station velo (réparation, pompe à vélo)", - "gl": "Estación de bicicletas (arranxo, bomba de ar ou ambos)" + "gl": "Estación de bicicletas (arranxo, bomba de ar ou ambos)", + "de": "Fahrradstation (Reparatur, Pumpe oder beides)" }, "minzoom": 13, "overpassTags": { @@ -17,7 +18,8 @@ "en": "Bike station (pump & repair)", "nl": "Herstelpunt met pomp", "fr": "Point station velo avec pompe", - "gl": "Estación de bicicletas (arranxo e bomba de ar)" + "gl": "Estación de bicicletas (arranxo e bomba de ar)", + "de": "Fahrradstation (Pumpe & Reparatur)" }, "mappings": [ { @@ -31,7 +33,8 @@ "en": "Bike repair station", "nl": "Herstelpunt", "fr": "Point de réparation velo", - "gl": "Estación de arranxo de bicicletas" + "gl": "Estación de arranxo de bicicletas", + "de": "Fahrradwerkstatt" } }, { @@ -235,7 +238,7 @@ "en": "This pump supports the following valves: {valves}", "nl": "Deze pomp werkt met de volgende ventielen: {valves}", "fr": "Cette pompe est compatible avec les valves suivantes: {valves}", - "gl": "Esta bomba de ar admite as seguintes válvulas: {valves}" + "gl": "Esta bomba de ar admite as seguintes válvulas: {valves}", }, "freeform": { "#addExtraTags": [ diff --git a/assets/layers/bike_shop/bike_shop.json b/assets/layers/bike_shop/bike_shop.json new file mode 100644 index 0000000..90fa618 --- /dev/null +++ b/assets/layers/bike_shop/bike_shop.json @@ -0,0 +1,401 @@ +{ + "id": "bike_shops", + "name": { + "en": "Bike repair/shop", + "nl": "Fietszaak", + "fr": "Magasin ou réparateur de vélo", + "gl": "Tenda/arranxo de bicicletas", + "de": "Fahrradwerkstatt/geschäft" + }, + "minzoom": 13, + "overpassTags": { + "and": [ + "shop=bicycle" + ] + }, + "title": { + "render": { + "en": "Bike repair/shop", + "nl": "Fietszaak", + "fr": "Magasin ou réparateur de vélo", + "gl": "Tenda/arranxo de bicicletas", + "de": "Fahrradwerkstatt/geschäft" + }, + "mappings": [ + { + "if": { + "and": [ + "name~*", + "service:bicycle:retail!~yes" + ] + }, + "then": { + "en": "Bike repair {name}", + "nl": "Fietsenmaker {name}", + "fr": "Réparateur de vélo {name}", + "gl": "Arranxo de bicicletas {name}", + "de": "Fahrradwerkstatt {name}" + } + }, + { + "if": "service:bicycle:retail!~yes", + "then": { + "en": "Bike repair", + "nl": "Fietsenmaker", + "fr": "Réparateur de vélo", + "gl": "Arranxo de bicicletas", + "de": "Fahrradwerkstatt" + } + }, + { + "if": { + "and": [ + "name~*", + "service:bicycle:repair!~yes" + ] + }, + "then": { + "en": "Bike shop {name}", + "nl": "Fietswinkel {name}", + "fr": "Magasin de vélo {name}", + "gl": "Tenda de bicicletas {name}", + "de": "Fahrradgeschäft {name}" + } + }, + { + "if": "service:bicycle:repair!~yes", + "then": { + "en": "Bike shop", + "nl": "Fietswinkel", + "fr": "Magasin de vélo", + "gl": "Tenda de bicicletas", + "de": "Fahrradgeschäft" + } + }, + { + "if": "name~*", + "then": { + "en": "Bike repair/shop {name}", + "nl": "Fietszaak {name}", + "fr": "Magasin ou réparateur de vélo {name}", + "gl": "Tenda/arranxo de bicicletas {name}", + "de": "Fahrradwerkstatt/geschäft {name}" + } + } + ] + }, + "description": { + "en": "A shop specifically selling bicycles or related items", + "nl": "Een winkel die hoofdzakelijk fietsen en fietstoebehoren verkoopt" + }, + "tagRenderings": [ + "images", + { + "question": { + "en": "What is the name of this bicycle shop?", + "nl": "Wat is de naam van deze fietszaak?", + "fr": "Quel est le nom du magasin de vélo?", + "gl": "Cal é o nome desta tenda de bicicletas?", + "de": "Wie heißt dieser Fahrradladen?" + }, + "render": { + "en": "This bicycle shop is called {name}", + "nl": "Deze fietszaak heet {name}", + "fr": "Ce magasin s'appelle {name}", + "gl": "Esta tenda de bicicletas chámase {name}", + "de": "Dieses Fahrradgeschäft heißt {name}" + }, + "freeform": { + "key": "name" + } + }, + { + "question": { + "en": "What is the website of {name}?", + "nl": "Wat is de website van {name}?", + "fr": "Quel est le site internet de {name}?", + "gl": "Cal é a páxina web de {name}?" + }, + "render": "{website}", + "freeform": { + "key": "website" + } + }, + { + "question": { + "en": "What is the phone number of {name}?", + "nl": "Wat is het telefoonnummer van {name}?", + "fr": "Quel est le nom de {name}?", + "gl": "Cal é o número de teléfono de {name}?" + }, + "render": "{phone}", + "freeform": { + "key": "phone", + "type": "phone" + } + }, + { + "question": { + "en": "What is the email address of {name}?", + "nl": "Wat is het email-adres van {name}?", + "fr": "Quel est l'adresse email de {name}?", + "gl": "Cal é o enderezo de correo electrónico de {name}?" + }, + "render": "{email}", + "freeform": { + "key": "email", + "type": "email" + } + }, + { + "question": { + "en": "Does this shop sell bikes?", + "nl": "Verkoopt deze fietszaak fietsen?", + "fr": "Est-ce que ce magasin vend des vélos?", + "gl": "Esta tenda vende bicicletas?", + "de": "Verkauft dieser Laden Fahrräder?" + }, + "mappings": [ + { + "if": "service:bicycle:retail=yes", + "then": { + "en": "This shop sells bikes", + "nl": "Deze winkel verkoopt fietsen", + "fr": "Ce magasin vend des vélos", + "gl": "Esta tenda vende bicicletas", + "de": "Dieses Geschäft verkauft Fahrräder" + } + }, + { + "if": "service:bicycle:retail=no", + "then": { + "en": "This shop doesn't sell bikes", + "nl": "Deze winkel verkoopt geen fietsen", + "fr": "Ce magasin ne vend pas de vélo", + "gl": "Esta tenda non vende bicicletas", + "de": "Dieses Geschäft verkauft keine Fahrräder" + } + } + ] + }, + { + "question": { + "en": "Does this shop repair bikes?", + "nl": "Herstelt deze winkel fietsen?", + "fr": "Est-ce que ce magasin répare des vélos?", + "gl": "Esta tenda arranxa bicicletas?", + "de": "Repariert dieses Geschäft Fahrräder?" + }, + "mappings": [ + { + "if": "service:bicycle:repair=yes", + "then": { + "en": "This shop repairs bikes", + "nl": "Deze winkel herstelt fietsen", + "fr": "Ce magasin répare des vélos", + "gl": "Esta tenda arranxa bicicletas", + "de": "Dieses Geschäft repariert Fahrräder" + } + }, + { + "if": "service:bicycle:repair=no", + "then": { + "en": "This shop doesn't repair bikes", + "nl": "Deze winkel herstelt geen fietsen", + "fr": "Ce magasin ne répare pas les vélos", + "gl": "Esta tenda non arranxa bicicletas", + "de": "Dieses Geschäft repariert keine Fahrräder" + } + }, + { + "if": "service:bicycle:repair=only_sold", + "then": { + "en": "This shop only repairs bikes bought here", + "nl": "Deze winkel herstelt enkel fietsen die hier werden gekocht", + "fr": "Ce magasin ne répare seulement les vélos achetés là-bas", + "gl": "Esta tenda só arranxa bicicletas mercadas aquí", + "de": "Dieses Geschäft repariert nur hier gekaufte Fahrräder" + } + }, + { + "if": "service:bicycle:repair=brand", + "then": { + "en": "This shop only repairs bikes of a certain brand", + "nl": "Deze winkel herstelt enkel fietsen van een bepaald merk", + "fr": "Ce magasin ne répare seulement des marques spécifiques", + "gl": "Esta tenda só arranxa bicicletas dunha certa marca", + "de": "Dieses Geschäft repariert nur Fahrräder einer bestimmten Marke" + } + } + ] + }, + { + "question": { + "en": "Does this shop rent out bikes?", + "nl": "Verhuurt deze winkel fietsen?", + "fr": "Est-ce ce magasin loue des vélos?", + "gl": "Esta tenda aluga bicicletas?", + "de": "Vermietet dieser Laden Fahrräder?" + }, + "mappings": [ + { + "if": "service:bicycle:rental=yes", + "then": { + "en": "This shop rents out bikes", + "nl": "Deze winkel verhuurt fietsen", + "fr": "Ce magasin loue des vélos", + "gl": "Esta tenda aluga bicicletas", + "de": "Dieses Geschäft vermietet Fahrräder" + } + }, + { + "if": "service:bicycle:rental=no", + "then": { + "en": "This shop doesn't rent out bikes", + "nl": "Deze winkel verhuurt geen fietsen", + "fr": "Ce magasin ne loue pas de vélos", + "gl": "Esta tenda non aluga bicicletas", + "de": "Dieses Geschäft vermietet keine Fahrräder" + } + } + ] + }, + { + "question": { + "en": "Does this shop sell second-hand bikes?", + "nl": "Verkoopt deze winkel tweedehands fietsen?", + "fr": "Est-ce ce magasin vend des vélos d'occasion", + "gl": "Esta tenda vende bicicletas de segunda man?", + "de": "Verkauft dieses Geschäft gebrauchte Fahrräder?" + }, + "mappings": [ + { + "if": "service:bicycle:second_hand=yes", + "then": { + "en": "This shop sells second-hand bikes", + "nl": "Deze winkel verkoopt tweedehands fietsen", + "fr": "Ce magasin vend des vélos d'occasion", + "gl": "Esta tenda vende bicicletas de segunda man", + "de": "Dieses Geschäft verkauft gebrauchte Fahrräder" + } + }, + { + "if": "service:bicycle:second_hand=no", + "then": { + "en": "This shop doesn't sell second-hand bikes", + "nl": "Deze winkel verkoopt geen tweedehands fietsen", + "fr": "Ce magasin ne vend pas de vélos d'occasion", + "gl": "Esta tenda non vende bicicletas de segunda man", + "de": "Dieses Geschäft verkauft keine gebrauchten Fahrräder" + } + }, + { + "if": "service:bicycle:second_hand=only", + "then": { + "en": "This shop only sells second-hand bikes", + "nl": "Deze winkel verkoopt enkel tweedehands fietsen", + "fr": "Ce magasin vend seulement des vélos d'occasion", + "gl": "Esta tenda só vende bicicletas de segunda man", + "de": "Dieses Geschäft verkauft nur gebrauchte Fahrräder" + } + } + ] + }, + { + "question": { + "en": "Does this shop offer a bike pump for use by anyone?", + "nl": "Biedt deze winkel een fietspomp aan voor iedereen?", + "fr": "Est-ce que ce magasin offre une pompe en accès libre?", + "gl": "Esta tenda ofrece unha bomba de ar para uso de calquera persoa?", + "de": "Bietet dieses Geschäft eine Fahrradpumpe zur Benutzung für alle an?" + }, + "mappings": [ + { + "if": "service:bicycle:pump=yes", + "then": { + "en": "This shop offers a bike pump for anyone", + "nl": "Deze winkel biedt een fietspomp aan voor iedereen", + "fr": "Ce magasin offre une pompe en acces libre", + "gl": "Esta tenda ofrece unha bomba de ar para uso de calquera persoa", + "de": "Dieses Geschäft bietet eine Fahrradpumpe für alle an" + } + }, + { + "if": "service:bicycle:pump=no", + "then": { + "en": "This shop doesn't offer a bike pump for anyone", + "nl": "Deze winkel biedt geen fietspomp aan voor eender wie", + "fr": "Ce magasin n'offre pas de pompe en libre accès", + "gl": "Esta tenda non ofrece unha bomba de ar para uso de calquera persoa", + "de": "Dieses Geschäft bietet für niemanden eine Fahrradpumpe an" + } + } + ] + }, + { + "question": { + "en": "Are there tools here to repair your own bike?", + "nl": "Biedt deze winkel gereedschap aan om je fiets zelf te herstellen?", + "fr": "Est-ce qu'il y a des outils pour réparer son vélo dans ce magasin?", + "gl": "Hai ferramentas aquí para arranxar a túa propia bicicleta?", + "de": "Gibt es hier Werkzeuge, um das eigene Fahrrad zu reparieren?" + }, + "mappings": [ + { + "if": "service:bicycle:diy=yes", + "then": { + "en": "This shop offers tools for DIY repair", + "nl": "Deze winkel biedt gereedschap aan om je fiets zelf te herstellen", + "fr": "Ce magasin offre des outils pour réparer son vélo soi-même", + "gl": "Hai ferramentas aquí para arranxar a túa propia bicicleta", + "de": "Dieses Geschäft bietet Werkzeuge für die Heimwerkerreparatur an" + } + }, + { + "if": "service:bicycle:diy=no", + "then": { + "en": "This shop doesn't offer tools for DIY repair", + "nl": "Deze winkel biedt geen gereedschap aan om je fiets zelf te herstellen", + "fr": "Ce magasin n'offre pas des outils pour réparer son vélo soi-même", + "gl": "Non hai ferramentas aquí para arranxar a túa propia bicicleta", + "de": "Dieses Geschäft bietet keine Werkzeuge für Heimwerkerreparaturen an" + } + } + ] + } + ], + "hideUnderlayingFeaturesMinPercentage": 1, + "presets": [ + { + "title": { + "en": "Bike repair/shop", + "nl": "Fietszaak", + "fr": "Magasin et réparateur de vélo", + "gl": "Tenda/arranxo de bicicletas", + "de": "Fahrradwerkstatt/geschäft" + }, + "tags": [ + "shop=bicycle" + ] + } + ], + "icon": { + "render": "./assets/layers/bike_shop/repair_shop.svg", + "mappings": [ + { + "if": "service:bicycle:retail=yes", + "then": "./assets/layers/bike_shop/shop.svg" + } + ] + }, + "width": { + "render": "1" + }, + "iconSize": { + "render": "50,50,bottom" + }, + "color": { + "render": "#c00" + }, + "wayHandling": 2 +} \ No newline at end of file diff --git a/assets/bike/repair_shop.svg b/assets/layers/bike_shop/repair_shop.svg similarity index 100% rename from assets/bike/repair_shop.svg rename to assets/layers/bike_shop/repair_shop.svg diff --git a/assets/bike/shop.svg b/assets/layers/bike_shop/shop.svg similarity index 100% rename from assets/bike/shop.svg rename to assets/layers/bike_shop/shop.svg