From 0452beb162a8ef1579b95b25e1cab9d262e42d20 Mon Sep 17 00:00:00 2001 From: Andrew Harvey Date: Tue, 6 Aug 2024 16:29:44 +1000 Subject: [PATCH] update default style to show conditional turn restrictions https://wiki.openstreetmap.org/wiki/Key:restriction defines the restriction:conditional tag. This change ensures that restrictions tagged this way show up with an icon. --- resources/styles/standard/elemstyles.mapcss | 70 +++++++++++++++++++++ 1 file changed, 70 insertions(+) diff --git a/resources/styles/standard/elemstyles.mapcss b/resources/styles/standard/elemstyles.mapcss index 9e4ba2e7e7c..17a2808470e 100644 --- a/resources/styles/standard/elemstyles.mapcss +++ b/resources/styles/standard/elemstyles.mapcss @@ -131,6 +131,76 @@ node[restriction] { text: auto; } +/*********************************/ +/* conditional turn restrictions */ +/*********************************/ + +relation["restriction:conditional" ^= "no_left_turn @ "][!setting("alt_turn_icons")] { + icon-image: "presets/vehicle/restriction/turn_restrictions/no_left_turn_red.svg"; + icon-opacity: 0.5; + set icon_z17; + text: auto; +} +relation["restriction:conditional" ^= "no_left_turn @ "][setting("alt_turn_icons")] { + icon-image: "presets/vehicle/restriction/turn_restrictions/no_left_turn.svg"; + icon-opacity: 0.5; + set icon_z17; + text: auto; +} +relation["restriction:conditional" ^= "no_right_turn @ "][!setting("alt_turn_icons")] { + icon-image: "presets/vehicle/restriction/turn_restrictions/no_right_turn_red.svg"; + icon-opacity: 0.6; + set icon_z17; + text: auto; +} +relation["restriction:conditional" ^= "no_right_turn @ "][setting("alt_turn_icons")] { + icon-image: "presets/vehicle/restriction/turn_restrictions/no_right_turn.svg"; + icon-opacity: 0.5; + set icon_z17; + text: auto; +} +relation["restriction:conditional" ^= "no_straight_on @ "][!setting("alt_turn_icons")] { + icon-image: "presets/vehicle/restriction/turn_restrictions/no_straight_on_red.svg"; + icon-opacity: 0.5; + set icon_z17; + text: auto; +} +relation["restriction:conditional" ^= "no_straight_on @ "][setting("alt_turn_icons")] { + icon-image: "presets/vehicle/restriction/turn_restrictions/no_straight_on.svg"; + icon-opacity: 0.5; + set icon_z17; + text: auto; +} +relation["restriction:conditional" ^= "no_u_turn @ "] { + icon-image: "presets/vehicle/restriction/turn_restrictions/no_u_turn.svg"; + icon-opacity: 0.5; + set icon_z17; + text: auto; +} +relation["restriction:conditional" ^= "only_left_turn @ "] { + icon-image: "presets/vehicle/restriction/turn_restrictions/only_left_turn.svg"; + icon-opacity: 0.5; + set icon_z17; + text: auto; +} +relation["restriction:conditional" ^= "only_right_turn @ "] { + icon-image: "presets/vehicle/restriction/turn_restrictions/only_right_turn.svg"; + icon-opacity: 0.5; + set icon_z17; + text: auto; +} +relation["restriction:conditional" ^= "only_straight_on @ "] { + icon-image: "presets/vehicle/restriction/turn_restrictions/only_straight_on.svg"; + icon-opacity: 0.5; + set icon_z17; + text: auto; +} +node["restriction:conditional"] { + icon-image: "presets/misc/deprecated.svg"; + set icon_z17; + text: auto; +} + /******************/ /* bridge, tunnel */ /******************/