Ticket #22695: maxspeed_as_text.mapcss

File maxspeed_as_text.mapcss, 1.3 KB (added by mikeho, 2 years ago)
Line 
1/*
2OpenRailwayMap Style File for JOSM
3OpenRailwayMap - Copyright (C) 2023 user: mikeho
4This program comes with ABSOLUTELY NO WARRANTY.
5This is free software, and you are welcome to redistribute it under certain conditions.
6See https://wiki.openstreetmap.org/wiki/OpenRailwayMap for details.
7
8Format details: https://josm.openstreetmap.de/wiki/Help/Styles/MapCSSImplementation
9 https://wiki.openstreetmap.org/wiki/MapCSS/0.2
10*/
11
12meta {
13 title: "JOSM - Maxspeed as Text - 19.02.2023 - Version 1.0";
14 version: "1.0";
15 description: "Style to display the maxspeed as Text on a OSM-Way.";
16 author: "mikeho";
17 watch-modified: true;
18}
19
20canvas {
21 default-points: true;
22 default-lines: true;
23}
24
25way|z17-["railway"="rail"] { set is_rail; }
26
27way[ is_prop_set("is_rail", "default") ]::layer_speed_for {
28 text-offset-y: 6;
29 font-size: 18;
30
31 text: concat("Vmax",
32 has_tag_key("maxspeed") ? concat(": " , tag("maxspeed") , " ") : "",
33 has_tag_key("maxspeed:forward") ? concat("-forw: ", tag("maxspeed:forward" ), " ") : "",
34 has_tag_key("maxspeed:backward") ? concat("-back: ", tag("maxspeed:backward")) : ""
35 );
36
37 text-position: line;
38 text-color: #F44; text-halo-opacity: 1;
39 text-halo-color: #202020; text-halo-radius: 4;
40 text-allow-overlap: true;
41}