Speed camera layer

This commit is contained in:
Robin van der Linde 2022-10-12 21:09:45 +02:00
parent 9b21318c49
commit 610159ca43
Signed by untrusted user: Robin-van-der-Linde
GPG key ID: 53956B3252478F0D
4 changed files with 156 additions and 2 deletions

View file

@ -0,0 +1,13 @@
[
{
"path": "speed_camera.svg",
"license": "CC0",
"authors": [
"Earlyswerver",
"OpenClipArt"
],
"sources": [
"https://en.wikipedia.org/wiki/File:Earlyswerver_UK_Speed_Camera_Sign.svg"
]
}
]

View file

@ -0,0 +1,120 @@
{
"id": "speed_camera",
"name": {
"en": "Speed Camera"
},
"description": {
"en": "Layer showing speed cameras"
},
"title": {
"render": {
"en": "Speed Camera"
}
},
"minzoom": 12,
"source": {
"osmTags": "highway=speed_camera"
},
"tagRenderings": [
{
"id": "maxspeed",
"question": {
"en": "What is the maximum speed allowed at this speed camera?"
},
"freeform": {
"key": "maxspeed",
"type": "pnat",
"placeholder": {
"en": "Maximum speed allowed"
}
},
"render": {
"en": "The maximum speed allowed is {canonical(maxspeed)}"
}
}
],
"presets": [
{
"tags": [
"highway=speed_camera"
],
"title": {
"en": "a speed Camera"
},
"preciseInput": {
"preferredBackground": "photo",
"maxSnapDistance": 10,
"snapToLayer": [
"maxspeed"
]
}
}
],
"mapRendering": [
{
"icon": "square:white;./assets/layers/speed_camera/speed_camera.svg",
"location": [
"point",
"centroid"
]
}
],
"units": [
{
"appliesToKey": [
"maxspeed"
],
"applicableUnits": [
{
"#": "km/h is the default for a maxspeed; should be empty string",
"canonicalDenomination": "",
"alternativeDenomination": [
"km/u",
"kmh",
"kph"
],
"human": {
"en": "kilometers/hour",
"ca": "quilòmetres/hora",
"es": "kilómetros/hora",
"nl": "kilometers/uur",
"de": "Kilometer/Stunde"
},
"humanShort": {
"en": "km/h",
"ca": "km/h",
"es": "km/h",
"nl": "km/u",
"de": "km/h"
}
},
{
"canonicalDenomination": "mph",
"useIfNoUnitGiven": [
"gb",
"us"
],
"alternativeDenomination": [
"m/u",
"mh",
"m/ph"
],
"human": {
"en": "miles/hour",
"ca": "milles/hora",
"es": "millas/hora",
"nl": "miles/uur",
"de": "Meilen/Stunde"
},
"humanShort": {
"en": "mph",
"ca": "mph",
"es": "mph",
"nl": "mph",
"de": "mph"
}
}
]
}
]
}

View file

@ -0,0 +1,20 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<svg
xmlns:svg="http://www.w3.org/2000/svg"
xmlns="http://www.w3.org/2000/svg"
version="1.0"
width="236.196"
height="194.823"
viewBox="0 0 236.196 194.823"
xml:space="preserve"
>
<g>
<path fill="none" stroke="#000000" stroke-width="7.5222" d="M 232.436,182.036 C 232.436,187.021 228.395,191.062 223.41,191.062 L 12.788,191.062 C 7.803,191.062 3.761,187.021 3.761,182.036 L 3.761,12.787 C 3.761,7.801 7.803,3.761 12.788,3.761 L 223.409,3.761 C 228.394,3.761 232.435,7.801 232.435,12.787 L 232.435,182.036 L 232.436,182.036 z "/>
<path d="M 120.43,24.971 L 42.857,24.971 C 30.902,24.971 21.21,34.582 21.21,46.436 L 21.21,148.389 C 21.21,160.243 30.902,169.852 42.857,169.852 L 120.43,169.852 C 132.386,169.852 142.078,160.243 142.078,148.389 L 142.078,46.436 C 142.078,34.582 132.386,24.971 120.43,24.971 z M 69.535,154.813 C 52.736,154.813 39.118,141.197 39.118,124.401 C 39.118,107.599 52.736,93.984 69.535,93.984 C 86.332,93.984 99.95,107.599 99.95,124.401 C 99.949,141.196 86.332,154.813 69.535,154.813 z M 107.645,68.695 C 98.335,68.695 90.788,61.148 90.788,51.839 C 90.788,42.528 98.335,34.983 107.645,34.983 C 116.955,34.983 124.502,42.529 124.502,51.839 C 124.501,61.148 116.955,68.695 107.645,68.695 z "/>
<circle cx="107.645" cy="51.839001" r="9.5279999"/>
<circle cx="69.492" cy="124.31" r="20.978"/>
<rect width="8.9469995" height="82.337997" x="148.371" y="50.320999"/>
<rect width="8.9469995" height="78.117996" x="164.03999" y="54.541"/>
<polygon points="214.988,79.89 188.554,79.89 188.554,66.341 179.604,66.341 179.604,138.997 148.358,138.997 148.358,148.058 179.604,148.058 188.299,148.058 188.554,148.058 188.554,126.068 214.988,126.068 214.988,79.89 "/>
</g>
</svg>

After

Width:  |  Height:  |  Size: 1.7 KiB

View file

@ -28,6 +28,7 @@
"startZoom": 1,
"widenFactor": 0.01,
"layers": [
"maxspeed"
"maxspeed",
"speed_camera"
]
}