| 30 | | meta |
| 31 | | { |
| 32 | | title: "hazmat"; |
| 33 | | version: "1.0[[revision]]_[[date]]"; |
| 34 | | description: "Displays hazmat=* and hazmat:water=* coloured."; |
| 35 | | icon: "Zeichen_261.svg"; |
| 36 | | author: "Klumbumbus"; |
| 37 | | link: "https://josm.openstreetmap.de/wiki/Styles/hazmat"; |
| 38 | | /* min-josm-version: "????"; not sure if there is one */ |
| 39 | | } |
| 40 | | |
| 41 | | meta[lang=de] |
| 42 | | { |
| 43 | | title: "Gefahrgut (hazmat)"; |
| 44 | | description: "Zeigt hazmat=* und hazmat:water=* farbig an."; |
| 45 | | link: "https://josm.openstreetmap.de/wiki/De:Styles/hazmat"; |
| 46 | | } |
| 47 | | |
| 48 | | /* disable tiger layer from default internal mappaint style */ |
| 49 | | way["tiger:reviewed"=no]::core_tiger { |
| 50 | | opacity: 0; |
| 51 | | } |
| 52 | | |
| 53 | | /* display hazmat on ways */ |
| 54 | | way["hazmat"="yes"]::hazmat, |
| 55 | | way["hazmat"="no"]::hazmat, |
| 56 | | way["hazmat"="designated"]::hazmat, |
| 57 | | way["hazmat"="destination"]::hazmat { |
| 58 | | set correct_hazmat_value; |
| 59 | | width: 14; |
| 60 | | z-index: -1.1; |
| 61 | | } |
| 62 | | way["hazmat:water"="yes"]::hazmatwater, |
| 63 | | way["hazmat:water"="no"]::hazmatwater, |
| 64 | | way["hazmat:water"="permissive"]::hazmatwater, |
| 65 | | way["hazmat:water"="destination"]::hazmatwater { |
| 66 | | set correct_hazmatwater_value; |
| 67 | | width: 14; |
| 68 | | z-index: -1; |
| 69 | | } |
| 70 | | way|z12-16.correct_hazmat_value::hazmat, |
| 71 | | way|z12-16.correct_hazmatwater_value::hazmatwater { |
| 72 | | width: 12; |
| 73 | | } |
| 74 | | way|z-11.correct_hazmat_value::hazmat, |
| 75 | | way|z-11.correct_hazmatwater_value::hazmatwater { |
| 76 | | width: 10; |
| 77 | | } |
| 78 | | /* dashed if both keys are present */ |
| 79 | | way.correct_hazmatwater_value[is_prop_set(correct_hazmat_value, hazmat)]::hazmatwater { |
| 80 | | dashes: 20,20; |
| 81 | | } |
| 82 | | /* the colors can be adjusted within JOSM color preferences */ |
| 83 | | way["hazmat"="yes"]::hazmat { |
| 84 | | color: hazmat_yes#FFEE00; /* yellow */ |
| 85 | | } |
| 86 | | way["hazmat"="no"]::hazmat { |
| 87 | | color: hazmat_no#FF0000; /* red */ |
| 88 | | } |
| 89 | | way["hazmat"="designated"]::hazmat { |
| 90 | | color: hazmat_designated#00FF00; /* green */ |
| 91 | | } |
| 92 | | way["hazmat"="destination"]::hazmat { |
| 93 | | color: hazmat_destination#FF9714; /* orange */ |
| 94 | | } |
| 95 | | way["hazmat:water"="yes"]::hazmatwater { |
| 96 | | color: hazmat_water_yes#6FEDFB; /* light blue */ |
| 97 | | } |
| 98 | | way["hazmat:water"="no"]::hazmatwater { |
| 99 | | color: hazmat_water_no#6B4EB1; /* purple */ |
| 100 | | } |
| 101 | | way["hazmat:water"="permissive"]::hazmatwater { |
| 102 | | color: hazmat_water_permissive#2437FF; /* blue */ |
| 103 | | } |
| 104 | | way["hazmat:water"="destination"]::hazmatwater { |
| 105 | | color: hazmat_water_destination#000C8B; /* dark blue */ |
| 106 | | } |
| 107 | | |
| 108 | | /* display german traffic signs */ |
| 109 | | node["traffic_sign"^="DE:261"] { |
| 110 | | icon-image: "Zeichen_261.svg"; |
| 111 | | } |
| 112 | | node["traffic_sign"^="DE:269"] { |
| 113 | | icon-image: "Zeichen_269.svg"; |
| 114 | | } |
| 115 | | node["traffic_sign"^="DE:354"] { |
| 116 | | icon-image: "Zeichen_354_-_Wasserschutzgebiet,_StVO_1992.svg"; |
| 117 | | } |
| 118 | | |
| 119 | | /* report wrong value of hazmat and hazmat:water */ |
| 120 | | way["hazmat"]!.correct_hazmat_value::hazmat { |
| 121 | | color: yellow; |
| 122 | | dashes-background-color: red; |
| 123 | | dashes: 4,24; |
| 124 | | opacity: 1; |
| 125 | | width: 5; |
| 126 | | text: tr("unusual value for hazmat!"); |
| 127 | | text-color: black; |
| 128 | | font-size: 11; |
| 129 | | text-halo-color: red; |
| 130 | | text-halo-radius: 2; |
| 131 | | casing-width: 1; |
| 132 | | casing-color: yellow; |
| 133 | | } |
| 134 | | way["hazmat:water"]!.correct_hazmatwater_value::hazmatwater { |
| 135 | | color: yellow; |
| 136 | | dashes-background-color: red; |
| 137 | | dashes: 4,24; |
| 138 | | opacity: 1; |
| 139 | | width: 5; |
| 140 | | text: tr("unusual value for hazmat:water!"); |
| 141 | | text-color: black; |
| 142 | | font-size: 11; |
| 143 | | text-halo-color: red; |
| 144 | | text-halo-radius: 2; |
| 145 | | casing-width: 1; |
| 146 | | casing-color: yellow; |
| 147 | | } |
| 148 | | }}} |
| | 28 | [[wiki:Styles/hazmat]] |