From 9716bc5425967aa81b4885bff4063d8c0eebfd18 Mon Sep 17 00:00:00 2001 From: Pieter Vander Vennet Date: Tue, 23 Apr 2024 01:23:50 +0200 Subject: [PATCH] Themes: add speed_camera to surveillance theme, see #1913 --- assets/layers/speed_camera/speed_camera.json | 44 +++++++++++++++++--- assets/themes/surveillance/surveillance.json | 13 ++++-- 2 files changed, 47 insertions(+), 10 deletions(-) diff --git a/assets/layers/speed_camera/speed_camera.json b/assets/layers/speed_camera/speed_camera.json index 219d95ae1..bfc2414c4 100644 --- a/assets/layers/speed_camera/speed_camera.json +++ b/assets/layers/speed_camera/speed_camera.json @@ -63,14 +63,11 @@ "ca": "una càmera de velocitat", "cs": "rychlostní radar", "sl": "hitrostna kamera" - }, - "snapToLayer": [ - "maxspeed" - ], - "maxSnapDistance": 10 + } } ], "tagRenderings": [ + "images", { "id": "maxspeed", "question": { @@ -115,6 +112,37 @@ "cs": "Referenční číslo tohoto rychlostního radaru je {ref}" }, "condition": "ref~*" + }, + { + "question": { + "en": "In which geographical direction does this camera film?", + "nl": "In welke geografische richting filmt deze camera?", + "fr": "Dans quelle direction géographique cette caméra filme-t-elle ?", + "it": "In quale direzione geografica punta questa videocamera?", + "de": "In welche Himmelsrichtung filmt diese Kamera?", + "da": "I hvilken geografisk retning filmer dette kamera?", + "ca": "En quina direcció geogràfica apunta aquesta càmera?", + "es": "¿A qué dirección geográfica apunta esta cámara?", + "cs": "Ve kterém geografickém směru tato kamera snímá?", + "sl": "V katero geografsko smer snema ta kamera?" + }, + "render": { + "en": "Films to a compass heading of {direction}", + "nl": "Filmt in kompasrichting {direction}", + "fr": "Filme dans une direction {direction}", + "it": "Punta in direzione {direction}", + "de": "filmt in Himmelsrichtung {direction}", + "da": "Filmer til en kompasretning af {direction}", + "ca": "Grava en direcció {direction}", + "es": "Graba en dirección a {direction}", + "cs": "Snímané oblasti podle směru kompasu {direction}", + "sl": "Snema v smeri kompasa {direction}" + }, + "freeform": { + "key": "direction", + "type": "direction" + }, + "id": "camera_direction" } ], "units": [ @@ -127,5 +155,9 @@ ] } } - ] + ], + "allowMove": { + "enableImproveAccuracy": true, + "enableRelocation": false + } } diff --git a/assets/themes/surveillance/surveillance.json b/assets/themes/surveillance/surveillance.json index 92f65b23c..16ea327c6 100644 --- a/assets/themes/surveillance/surveillance.json +++ b/assets/themes/surveillance/surveillance.json @@ -53,7 +53,12 @@ "icon": "./assets/themes/surveillance/logo.svg", "defaultBackgroundId": "maptiler.carto", "layers": [ - "surveillance_camera" - ], - "widenFactor": 2 -} \ No newline at end of file + "surveillance_camera", + { + "builtin": "speed_camera", + "override": { + "minzoom": 12 + } + } + ] +}