Add cycling-themed layer

This commit is contained in:
Pieter Vander Vennet 2020-09-11 02:42:22 +02:00
parent 46287c86ae
commit f942be227a
4 changed files with 23 additions and 30 deletions

View file

@ -17,6 +17,7 @@ import * as bike_repair_station from "../../assets/layers/bike_repair_station/bi
import * as birdhides from "../../assets/layers/bird_hide/birdhides.json" import * as birdhides from "../../assets/layers/bird_hide/birdhides.json"
import * as nature_reserve from "../../assets/layers/nature_reserve/nature_reserve.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 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 {Utils} from "../../Utils"; import {Utils} from "../../Utils";
import ImageCarouselWithUploadConstructor from "../../UI/Image/ImageCarouselWithUpload"; import ImageCarouselWithUploadConstructor from "../../UI/Image/ImageCarouselWithUpload";
@ -43,6 +44,7 @@ export class FromJSON {
FromJSON.Layer(birdhides), FromJSON.Layer(birdhides),
FromJSON.Layer(nature_reserve), FromJSON.Layer(nature_reserve),
FromJSON.Layer(bike_cafes), FromJSON.Layer(bike_cafes),
FromJSON.Layer(cycling_themed_objects)
]; ];
for (const layer of sharedLayersList) { for (const layer of sharedLayersList) {

View file

@ -20,7 +20,7 @@ export default class Cyclofix extends Layout {
"cyclofix", "cyclofix",
["en", "nl", "fr", "gl"], ["en", "nl", "fr", "gl"],
Translations.t.cyclofix.title, Translations.t.cyclofix.title,
["bike_repair_station", "bike_cafes", new BikeShops(), "drinking_water", "bike_parking", new BikeOtherShops(), ["bike_repair_station", "bike_cafes", new BikeShops(), "drinking_water", "bike_parking", new BikeOtherShops(),"bike_themed_object",
// The first of november, halloween and the second of november, we remember our dead // The first of november, halloween and the second of november, we remember our dead
...(Cyclofix.RememberTheDead() ? ["ghost_bike"] : [])], ...(Cyclofix.RememberTheDead() ? ["ghost_bike"] : [])],
16, 16,

View file

@ -6,10 +6,10 @@
"fr": "Café vélo", "fr": "Café vélo",
"gl": "Café de ciclistas" "gl": "Café de ciclistas"
}, },
"minzoom": 12, "minzoom": 14,
"overpassTags": { "overpassTags": {
"and": [ "and": [
"amenity~pub|bar|cafe", "amenity~pub|bar|cafe|restaurant",
{ {
"#": "Note the double tilde in 'service:bicycle' which interprets the key as regex too", "#": "Note the double tilde in 'service:bicycle' which interprets the key as regex too",
"or": [ "or": [
@ -149,12 +149,7 @@
"fr": "Quel est le site internet de {name}?", "fr": "Quel est le site internet de {name}?",
"gl": "Cal é a páxina web de {name}?" "gl": "Cal é a páxina web de {name}?"
}, },
"render": { "render": "<a href='{website}' target='_blank'>{website}</a>",
"en": "<a href='{website}' target='_blank'>{website}</a>",
"nl": "<a href='{website}' target='_blank'>{website}</a>",
"fr": "<a href='{website}' target='_blank'>{website}</a>",
"gl": "<a href='{website}' target='_blank'>{website}</a>"
},
"freeform": { "freeform": {
"key": "website" "key": "website"
} }

View file

@ -1,11 +1,11 @@
{ {
"id": "bike_cafes", "id": "bike_themed_object",
"name": { "name": {
"en": "Bike related object", "en": "Bike related object",
"nl": "Fietsgerelateerd object", "nl": "Fietsgerelateerd object",
"fr": "Objet cycliste" "fr": "Objet cycliste"
}, },
"minzoom": 12, "minzoom": 16,
"overpassTags": "theme~cycling|bicycle", "overpassTags": "theme~cycling|bicycle",
"title": { "title": {
"render": { "render": {
@ -28,18 +28,27 @@
"description": {}, "description": {},
"tagRenderings": [ "tagRenderings": [
{ {
"render": "<a href='{website}' target='_blank'>{website}</a>" "render": "<a href='{website}' target='_blank'>{website}</a>",
"freeform": {
"key": "website"
}
}, },
{ {
"render": "<a href='tel:{phone}'>{phone}</a>" "render": "<a href='tel:{phone}'>{phone}</a>",
"freeform": {
"key": "phone"
}
}, },
{ {
"render": "<a href='mailto:{email}' target='_blank'>{email}</a>" "render": "<a href='mailto:{email}' target='_blank'>{email}</a>",
"freeform": {
"key": "email"
}
} }
], ],
"hideUnderlayingFeaturesMinPercentage": 0, "hideUnderlayingFeaturesMinPercentage": 0,
"icon": { "icon": {
"render": "./assets/layers/bike_cafe/bike_cafe.svg" "render": "./assets/layers/cycling_themed_object/other_services.svg"
}, },
"width": { "width": {
"render": "2" "render": "2"
@ -48,21 +57,8 @@
"render": "50,50,bottom" "render": "50,50,bottom"
}, },
"color": { "color": {
"render": "#694E2D" "render": "#00f"
}, },
"presets": [ "presets": [],
{
"title": {
"en": "Bike cafe",
"nl": "Fietscafé",
"fr": "Café Vélo",
"gl": "Café de ciclistas"
},
"tags": [
"amenity=pub",
"pub=cycling"
]
}
],
"wayHandling": 2 "wayHandling": 2
} }