Add bicycle tube vending machines

This commit is contained in:
pietervdvn 2021-01-09 02:11:43 +01:00
parent b9bcf801ef
commit 303485df7e
7 changed files with 50 additions and 13 deletions

View file

@ -11,7 +11,17 @@ export class FromJSON {
}
public static Tag(json: AndOrTagConfigJson | string, context: string = ""): TagsFilter {
if (json === undefined) {
try{
return this.TagUnsafe(json, context);
}catch(e){
console.error("Could not parse tag", json,"in context",context,"due to ", e)
throw e;
}
}
private static TagUnsafe(json: AndOrTagConfigJson | string, context: string = ""): TagsFilter {
if (json === undefined) {
throw `Error while parsing a tag: 'json' is undefined in ${context}. Make sure all the tags are defined and at least one tag is present in a complex expression`
}
if (typeof (json) == "string") {

View file

@ -11,7 +11,7 @@ import * as cycling_themed_objects from "../assets/layers/cycling_themed_object/
import * as bike_shops from "../assets/layers/bike_shop/bike_shop.json"
import * as bike_cleaning from "../assets/layers/bike_cleaning/bike_cleaning.json"
import * as bicycle_library from "../assets/layers/bicycle_library/bicycle_library.json"
import * as bicycle_tube_vending_machine from "../assets/layers/bicycle_tube_vending_machine/bicycle_tube_vending_machine.json"
import * as maps from "../assets/layers/maps/maps.json"
import * as information_boards from "../assets/layers/information_board/information_board.json"
import * as direction from "../assets/layers/direction/direction.json"
@ -39,6 +39,7 @@ export default class SharedLayers {
cycling_themed_objects,
bike_shops,
bike_cleaning,
bicycle_tube_vending_machine,
maps,
direction,
information_boards,

View file

@ -292,7 +292,10 @@ export class InitUiElements {
const fullOptions2 = new FullWelcomePaneWithTabs();
State.state.fullScreenMessage.setData({content: fullOptions2, hashText: "welcome"})
if (Hash.hash.data === undefined) {
State.state.fullScreenMessage.setData({content: fullOptions2, hashText: "welcome"})
}
Svg.help_svg()
.SetClass("open-welcome-button")

View file

@ -12,7 +12,7 @@ import ScrollableFullScreen from "../Base/ScrollableFullScreen";
export default class FeatureInfoBox extends UIElement {
private _component: UIElement;
public title: UIEventSource<string> ;
public title: UIElement ;
constructor(
tags: UIEventSource<any>,

View file

@ -107,7 +107,8 @@
"titleIcons": [
{
"render": "<a href='https://fietsambassade.gent.be/' target='_blank'><img src='./assets/themes/cyclofix/fietsambassade_gent_logo_small.svg'/></a>",
"condition": "operator=De Fietsambassade Gent"
"condition": "operator=De Fietsambassade Gent",
"roaming": true
},
"defaults"
],

View file

@ -13,22 +13,38 @@
"fr": "Le but de cette carte est de présenter aux cyclistes une solution facile à utiliser pour trouver l'infrastructure appropriée à leurs besoins.<br><br>Vous pouvez suivre votre localisation précise (mobile uniquement) et sélectionner les couches qui vous concernent dans le coin inférieur gauche. Vous pouvez également utiliser cet outil pour ajouter ou modifier des épingles (points d'intérêt) sur la carte et fournir plus de données en répondant aux questions.<br><br>Toutes les modifications que vous apportez seront automatiquement enregistrées dans la base de données mondiale d'OpenStreetMap et peuvent être librement réutilisées par d'autres.<br><br>Pour plus d'informations sur le projet cyclofix, rendez-vous sur <a href='https://cyclofix.osm.be/'>cyclofix.osm.be</a>.",
"gl": "O obxectivo deste mapa é amosar ós ciclistas unha solución doada de empregar para atopar a infraestrutura axeitada para as súas necesidades.<br><br>Podes obter a túa localización precisa (só para dispositivos móbiles) e escoller as capas que sexan relevantes para ti na esquina inferior esquerda. Tamén podes empregar esta ferramenta para engadir ou editar puntos de interese ó mapa e fornecer máis datos respondendo as cuestións.<br><br>Todas as modificacións que fagas serán gardadas de xeito automático na base de datos global do OpenStreetMap e outros poderán reutilizalos libremente.<br><br>Para máis información sobre o proxecto cyclofix, vai a <a href='https://cyclofix.osm.be/'>cyclofix.osm.be</a>.",
"de": "Das Ziel dieser Karte ist es, den Radfahrern eine einfach zu benutzende Lösung zu präsentieren, um die geeignete Infrastruktur für ihre Bedürfnisse zu finden.<br><br>Sie können Ihren genauen Standort verfolgen (nur mobil) und in der linken unteren Ecke die für Sie relevanten Ebenen auswählen. Sie können dieses Tool auch verwenden, um Pins (Points of Interest/Interessante Orte) zur Karte hinzuzufügen oder zu bearbeiten und mehr Daten durch Beantwortung der Fragen bereitstellen.<br><br>Alle Änderungen, die Sie vornehmen, werden automatisch in der globalen Datenbank von OpenStreetMap gespeichert und können von anderen frei wiederverwendet werden.<br><br>Weitere Informationen über das Projekt Cyclofix finden Sie unter <a href='https://cyclofix.osm.be/'>cyclofix.osm.be</a>."
},
"language": ["en", "nl", "fr", "gl","de"],
"language": [
"en",
"nl",
"fr",
"gl",
"de"
],
"maintainer": "MapComplete",
"icon": "./assets/themes/cyclofix/logo.svg",
"version": "0",
"startLat": 50.8465573,
"defaultBackgroundId": "CartoDB.Voyager",
"startLon": 4.3516970,
"startLon": 4.3516970,
"startZoom": 16,
"widenFactor": 0.05,
"socialImage": "./assets/themes/cyclofix/logo.svg",
"layers": ["bike_cafes", "bike_shops", {"builtin": "bicycle_library",
"override": {
"minzoom": 13
}
},"bike_repair_station", "drinking_water", "bike_themed_object","bike_cleaning","bike_parking"],
"layers": [
"bike_cafes",
"bike_shops",
{
"builtin": "bicycle_library",
"override": {
"minzoom": 13
}
},
"bike_repair_station",
"bicycle_tube_vending_machine",
"drinking_water",
"bike_themed_object",
"bike_cleaning",
"bike_parking"
],
"roamingRenderings": []
}

View file

@ -47,6 +47,12 @@ new T([
equal(noMatch.matches([{k:"key",v:""}]), true)
equal(noMatch.matches([{k:"otherKey",v:""}]), true)
const multiMatch = FromJSON.Tag("vending~.*bicycle_tube.*") as Tag;
equal(multiMatch.matches([{k:"vending",v:"bicycle_tube"}]), true)
equal(multiMatch.matches([{k:"vending",v:"something;bicycle_tube"}]), true)
equal(multiMatch.matches([{k:"vending",v:"bicycle_tube;something"}]), true)
equal(multiMatch.matches([{k:"vending",v:"xyz;bicycle_tube;something"}]), true)
})],
["Is equivalent test", (() => {