Add minimal charging_stations theme
This commit is contained in:
parent
9c474dfb06
commit
80a5e8d342
6 changed files with 192 additions and 1 deletions
|
@ -15,6 +15,8 @@ import * as shops from "../assets/themes/shops/shops.json"
|
|||
import * as bike_monitoring_stations from "../assets/themes/bike_monitoring_station/bike_monitoring_stations.json"
|
||||
import * as fritures from "../assets/themes/fritures/fritures.json"
|
||||
import * as benches from "../assets/themes/benches/benches.json";
|
||||
import * as charging_stations from "../assets/themes/charging_stations/charging_stations.json"
|
||||
|
||||
import {PersonalLayout} from "../Logic/PersonalLayout";
|
||||
import {StreetWidth} from "./StreetWidth/StreetWidth";
|
||||
|
||||
|
@ -70,6 +72,7 @@ export class AllKnownLayouts {
|
|||
FromJSON.LayoutFromJSON(maps),
|
||||
FromJSON.LayoutFromJSON(fritures),
|
||||
FromJSON.LayoutFromJSON(benches),
|
||||
FromJSON.LayoutFromJSON(charging_stations),
|
||||
AllKnownLayouts.GenerateBuurtNatuur(),
|
||||
AllKnownLayouts.GenerateBikeMonitoringStations(),
|
||||
|
||||
|
|
|
@ -24,6 +24,7 @@ export class QueryParameters {
|
|||
this.initialized = true;
|
||||
|
||||
if (window?.location?.search) {
|
||||
console.log("Window.location.search is",window.location.search)
|
||||
const params = window.location.search.substr(1).split("&");
|
||||
for (const param of params) {
|
||||
const kv = param.split("=");
|
||||
|
|
|
@ -524,6 +524,9 @@ export class TagRendering extends UIElement implements TagDependantUIElement {
|
|||
|
||||
private ApplyTemplate(template: string | Translation): UIElement {
|
||||
const tr = Translations.WT(template);
|
||||
if(tr === undefined){
|
||||
return undefined;
|
||||
}
|
||||
if (this.answerCache[tr.id]) {
|
||||
return this.answerCache[tr.id];
|
||||
}
|
||||
|
|
60
assets/themes/charging_stations/charging_station.svg
Normal file
60
assets/themes/charging_stations/charging_station.svg
Normal file
|
@ -0,0 +1,60 @@
|
|||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<svg
|
||||
xmlns:dc="http://purl.org/dc/elements/1.1/"
|
||||
xmlns:cc="http://creativecommons.org/ns#"
|
||||
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
|
||||
xmlns:svg="http://www.w3.org/2000/svg"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
|
||||
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
|
||||
width="2.533375in"
|
||||
height="2.5232947in"
|
||||
viewBox="0 0 228.00356 227.09669"
|
||||
version="1.1"
|
||||
id="svg4"
|
||||
sodipodi:docname="Charging_station.svg"
|
||||
inkscape:version="0.92.4 (5da689c313, 2019-01-14)">
|
||||
<metadata
|
||||
id="metadata10">
|
||||
<rdf:RDF>
|
||||
<cc:Work
|
||||
rdf:about="">
|
||||
<dc:format>image/svg+xml</dc:format>
|
||||
<dc:type
|
||||
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
|
||||
</cc:Work>
|
||||
</rdf:RDF>
|
||||
</metadata>
|
||||
<defs
|
||||
id="defs8" />
|
||||
<sodipodi:namedview
|
||||
pagecolor="#ffffff"
|
||||
bordercolor="#666666"
|
||||
borderopacity="1"
|
||||
objecttolerance="10"
|
||||
gridtolerance="10"
|
||||
guidetolerance="10"
|
||||
inkscape:pageopacity="0"
|
||||
inkscape:pageshadow="2"
|
||||
inkscape:window-width="1680"
|
||||
inkscape:window-height="1013"
|
||||
id="namedview6"
|
||||
showgrid="false"
|
||||
inkscape:zoom="0.43553183"
|
||||
inkscape:cx="-194.63523"
|
||||
inkscape:cy="121.06786"
|
||||
inkscape:window-x="0"
|
||||
inkscape:window-y="0"
|
||||
inkscape:window-maximized="1"
|
||||
inkscape:current-layer="svg4" />
|
||||
<path
|
||||
id="bg"
|
||||
d="m 30.503636,0.59549459 c 0,0 36,0 36,0 0,0 112.000004,0 112.000004,0 0,0 32,0 32,0 5.2,0.03 8.87,0.24 12.78,4.21000001 4.27,4.34 4.21,9.1600004 4.22,14.7900004 0,0 0,158.999995 0,158.999995 0,0 0,31 0,31 -0.08,6.67 -1.61,12.02 -8.01,15.31 -3.62,1.86 -7.06,1.68 -10.99,1.69 0,0 -160.000004,0 -160.000004,0 0,0 -31,0 -31,0 -6.7,-0.08 -12.2400004,-1.49 -15.5500004,-8 -1.63999999,-3.24 -1.43999999,-6.49 -1.44999999,-10 0,0 0,-155.999995 0,-155.999995 0,0 0,-34 0,-34 0.01,-8.7100004 0.96999999,-13.8900004 10.00000039,-17.4300004 5.53,-1.00000001 14.12,-0.57000001 20,-0.57000001 z M 186.50364,60.595495 c 0,0 0,-31 0,-31 0,0 -1.02,-11.4 -1.02,-11.4 0,0 -7.98,-1.6 -7.98,-1.6 0,0 -69,0 -69,0 0,0 -15.000004,0 -15.000004,0 0,0 -5.98,1.6 -5.98,1.6 0,0 -1.02,7.4 -1.02,7.4 0,0 0,76.999995 0,76.999995 -11.8,0.54 -17.34,3.3 -28,7 0,0 0,-19.999995 0,-19.999995 2.73,-0.01 6.32,0.33 8.49,-1.6 2.08,-1.84 3.9,-8.56 4.84,-11.4 5.31,-15.91 5.67,-13.21 5.67,-30 0,0 -7,0 -7,0 0,0 0,-19 0,-19 -0.01,-3.03 0.45,-10.21 -4.87,-8.34 -3.65,1.28 -3.12,6.26 -3.13,9.34 0,0 0,18 0,18 0,0 -19,0 -19,0 0,0 0,-21 0,-21 -0.05,-2.48 0.13,-5.95 -3.11,-6.42 -4.5,-0.66 -4.83,4.3 -4.89,7.42 0,0 0,20 0,20 0,0 -7,0 -7,0 0,14.73 1.38,17.01 6,31 0.84,2.55 2.72,9.52 4.7,11.01 1.76,1.31 6.11,0.99 8.3,0.99 0,0 0,18.999995 0,18.999995 -0.03,13.87 -5.49,8.96 -17.64,27 -8.66,12.86 -12.45,26.73 -13.65,42 0.02,2.8 -0.4,4.03 0,7 1.25,21.17 19.36,30.73 32.25,20.47 8.21,-6.54 10.02,-16.6 10.04,-26.47 0,0 0,-48 0,-48 0.02,-2.26 -0.1,-4.87 1.02,-6.9 3.46,-6.23 20.19,-9.79 26.98,-10.1 0,0 0,71 0,71 0,4.15 -1.03,18.69 1.6,21.26 2.11,2.06 6.63,1.74 9.4,1.74 0,0 56.000004,0 56.000004,0 10.14,0 23.3,0.74 33,-1 0,0 0,-145.999995 0,-145.999995 z m -65,-19 c 0,0 43,0 43,0 8.64,0.02 8.98,0.36 9,9 0,0 0,34 0,34 0,2.77 0.5,11.48 -1.02,13.4 -1.57,1.98 -5.68,1.6 -7.98,1.6 0,0 -55,0 -55,0 -8.64,-0.02 -8.98,-0.36 -9,-9 0,0 0,-25 0,-25 0,-5.44 -1.280004,-18.97 1.6,-22.98 4.36,-1.85 14.28,-1.02 19.4,-1.02 z M 47.503636,147.59549 c 0,0 0,31 0,31 -0.01,6.38 -1.24,19.35 -10,19.56 -9.06,0.23 -11.25,-11.77 -10.96,-18.56 0.81,-19.23 8.06,-33.34 19.96,-48 1.69,4.25 1,11.29 1,16 z"
|
||||
inkscape:connector-curvature="0"
|
||||
style="fill:#0000ff;stroke:#000000;stroke-width:1" />
|
||||
<path
|
||||
id="itm"
|
||||
d="m 86.503636,37.595495 c 0,-3.68 -0.95,-17.96 1.6,-19.98 1.59,-1.25 5.41,-1.02 7.4,-1.02 0,0 69.000004,0 69.000004,0 0,0 15,0 15,0 1.95,0.04 4.63,-0.1 5.98,1.6 1.25,1.59 1.02,5.41 1.02,7.4 0,0 0,180.999995 0,180.999995 0,0 -76,0 -76,0 0,0 -17.000004,0 -17.000004,0 0,0 -5.98,-1.6 -5.98,-1.6 0,0 -1.02,-7.4 -1.02,-7.4 0,0 0,-84 0,-84 -6.85,0.32 -22.23,3.61 -26.4,9.21 -1.59,2.13 -1.55,4.28 -1.6,6.79 0,0 0,51 0,51 -0.16,13.5 -6.97,29.52 -23,28.22 -13.37,-1.1 -20.26,-15.03 -19.49,-27.22 1.32,-20.83 5.19,-35.3 18.49,-52 10.46,-13.13 12.98,-8.75 13,-21 0,0 0,-18.999995 0,-18.999995 -2.19,0 -6.54,0.32 -8.3,-0.99 -1.96,-1.47 -3.89,-8.49 -4.68,-11.01 -4.66,-15.01 -6.02,-15.17 -6.02,-31 0,0 7,0 7,0 0,0 0,-19 0,-19 0.02,-3.22 -0.04,-9.15 4.89,-8.42 3.77,0.55 3.11,5.66 3.11,8.42 0,0 0,19 0,19 0,0 19,0 19,0 0,0 0,-20 0,-20 0.06,-3.11 0.86,-9.21 5.69,-7.34 2.82,1.08 2.31,5.89 2.31,8.34 0,0 0,19 0,19 0,0 7,0 7,0 0,16.42 -0.13,13.38 -5.33,29 -3.22,9.66 -2.28,13.74 -13.67,14 0,0 0,19.999995 0,19.999995 11.48,-3.25 14.31,-6.37 28,-7 0,0 0,-64.999995 0,-64.999995 z m 69.000004,62 c 3.39,0 15,0.899995 16.98,-1.6 1.25,-1.59 1.02,-5.41 1.02,-7.4 0,0 0,-34 0,-34 0,-2.77 0.5,-11.48 -1.02,-13.4 -1.57,-1.98 -5.68,-1.6 -7.98,-1.6 0,0 -55,0 -55,0 -8.64,0.02 -8.98,0.36 -9,9 0,0 0,49 0,49 0,0 55,0 55,0 z M 26.543636,179.59549 c -0.29,6.89 2.22,20.2 11.95,18.47 8.01,-1.43 9,-13.12 9.01,-19.47 0,0 0,-47 0,-47 -12.67,10.48 -20.28,31.82 -20.96,48 z"
|
||||
inkscape:connector-curvature="0"
|
||||
style="fill:#ffffff;stroke:#000000;stroke-width:1" />
|
||||
</svg>
|
After Width: | Height: | Size: 5.2 KiB |
124
assets/themes/charging_stations/charging_stations.json
Normal file
124
assets/themes/charging_stations/charging_stations.json
Normal file
|
@ -0,0 +1,124 @@
|
|||
{
|
||||
"id": "charging_stations",
|
||||
"title": {
|
||||
"en": "Charging stations"
|
||||
},
|
||||
"shortDescription": {
|
||||
"en": "A worldwide map of charging stations"
|
||||
},
|
||||
"description": {
|
||||
"en": "On this open map, one can find and mark information about charging stations"
|
||||
},
|
||||
"language": [
|
||||
"en"
|
||||
],
|
||||
"maintainer": "",
|
||||
"icon": "./assets/themes/charging_stations/charging_station.svg",
|
||||
"version": "0",
|
||||
"startLat": 0,
|
||||
"startLon": 0,
|
||||
"startZoom": 1,
|
||||
"widenFactor": 0.05,
|
||||
"socialImage": "",
|
||||
"layers": [
|
||||
{
|
||||
"id": "charging_stations",
|
||||
"name": {
|
||||
"en": "Charging stations"
|
||||
},
|
||||
"minzoom": 10,
|
||||
"overpassTags": {
|
||||
"and": [
|
||||
"amenity=charging_station"
|
||||
]
|
||||
},
|
||||
"title": {
|
||||
"render": {
|
||||
"en": "Charging station"
|
||||
}
|
||||
},
|
||||
"description": {
|
||||
"en": "A charging station"
|
||||
},
|
||||
"tagRenderings": [
|
||||
{
|
||||
"#": "Network",
|
||||
"render": {
|
||||
"en": "{network}"
|
||||
},
|
||||
"question": {
|
||||
"en": "Which is the network of this charging stationg?"
|
||||
},
|
||||
"freeform": {
|
||||
"key": "network"
|
||||
},
|
||||
"mappings": [
|
||||
{
|
||||
"if": {
|
||||
"and": [
|
||||
"network=AeroVironment"
|
||||
]
|
||||
},
|
||||
"then": {
|
||||
"en": "AeroVironment"
|
||||
}
|
||||
},
|
||||
{
|
||||
"if": {
|
||||
"and": [
|
||||
"network=Blink"
|
||||
]
|
||||
},
|
||||
"then": {
|
||||
"en": "Blink"
|
||||
}
|
||||
},
|
||||
{
|
||||
"if": {
|
||||
"and": [
|
||||
"network=eVgo"
|
||||
]
|
||||
},
|
||||
"then": {
|
||||
"en": "eVgo"
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"#": "OH",
|
||||
"render": "{opening_hours_table(opening_hours)}",
|
||||
"freeform": {
|
||||
"key": "opening_hours",
|
||||
"type": "opening_hours"
|
||||
},
|
||||
"question": {
|
||||
"en": "When is this charging station opened?"
|
||||
},
|
||||
"mappings": [
|
||||
{
|
||||
"if": "opening_hours=24/7",
|
||||
"then": "24/7 opened (including holidays)"
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
"hideUnderlayingFeaturesMinPercentage": 0,
|
||||
"icon": {
|
||||
"render": "./assets/themes/charging_stations/charging_station.svg"
|
||||
},
|
||||
"width": {
|
||||
"render": "8"
|
||||
},
|
||||
"iconSize": {
|
||||
"render": "40,40,center"
|
||||
},
|
||||
"color": {
|
||||
"render": "#00f"
|
||||
},
|
||||
"presets": [],
|
||||
"wayHandling": 1
|
||||
}
|
||||
],
|
||||
"roamingRenderings": []
|
||||
}
|
2
test.ts
2
test.ts
|
@ -1,4 +1,4 @@
|
|||
//*
|
||||
/*
|
||||
|
||||
|
||||
|
||||
|
|
Loading…
Reference in a new issue