| | 1 | [[TranslatedPages(revision=4)]] |
| | 2 | |
| | 3 | = [[Image(wiki:Styles/hazmat:Zeichen_261.svg,36,middle,inline)]] hazmat = |
| | 4 | [[PageOutline(2-9)]] |
| | 5 | |
| | 6 | == Описание == |
| | 7 | |
| | 8 | Стиль отрисовки карты "hazmat" показывает цветом значения [osmwiki:Key:hazmat hazmat =*] и hazmat:water=* (классификация разрешения на транспортировку опасных материалов). |
| | 9 | |
| | 10 | Дополнительно он сообщает о необычных значениях тега hazmat. |
| | 11 | |
| | 12 | Цвета можно изменить в окне настроек JOSM. |
| | 13 | |
| | 14 | Стиль отрисовки hazmat можно использовать совместно со стандартным встроенным стилем отрисовки JOSM. Названия дорог, если они вам мешают, можно отключить в [wikitr:/Help/Dialog/MapPaint/StyleSettings настройках] встроенного стиля. |
| | 15 | |
| | 16 | Об идеях, вопросах, ошибках, предложениях и т.п. пишите [osmwww:user/Klumbumbus Klumbumbus]. |
| | 17 | |
| | 18 | Переводите эту wiki-страницу на другие языки. Языки, на которые она уже переведена, можно увидеть наверху справа. |
| | 19 | |
| | 20 | [[Image(wiki:Styles/hazmat:legend.png)]] |
| | 21 | |
| | 22 | [[Image(wiki:Styles/hazmat:example.png)]] |
| | 23 | |
| | 24 | ^(data used for image [osmwww:copyright ©OpenStreetMap contributors] ODbL)^ |
| | 25 | |
| | 26 | == Код == |
| | 27 | {{{ |
| | 28 | #!style type="mapcss" |
| | 29 | |
| | 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: "http://josm.openstreetmap.de/wiki/Styles/hazmat"; |
| | 38 | watch-modified: true; |
| | 39 | /* min-josm-version: "????"; not sure if there is one */ |
| | 40 | } |
| | 41 | |
| | 42 | meta[lang=de] |
| | 43 | { |
| | 44 | title: "Gefahrgut (hazmat)"; |
| | 45 | description: "Zeigt hazmat=* und hazmat:water=* farbig an."; |
| | 46 | link: "http://josm.openstreetmap.de/wiki/De:Styles/hazmat"; |
| | 47 | } |
| | 48 | |
| | 49 | /* disable tiger layer from default internal mappaint style */ |
| | 50 | way["tiger:reviewed"=no]::core_tiger { |
| | 51 | opacity: 0; |
| | 52 | } |
| | 53 | |
| | 54 | /* display hazmat on ways */ |
| | 55 | way["hazmat"="yes"]::hazmat, |
| | 56 | way["hazmat"="no"]::hazmat, |
| | 57 | way["hazmat"="designated"]::hazmat, |
| | 58 | way["hazmat"="destination"]::hazmat { |
| | 59 | set correct_hazmat_value; |
| | 60 | width: 14; |
| | 61 | z-index: -1.1; |
| | 62 | } |
| | 63 | way["hazmat:water"="yes"]::hazmatwater, |
| | 64 | way["hazmat:water"="no"]::hazmatwater, |
| | 65 | way["hazmat:water"="permissive"]::hazmatwater, |
| | 66 | way["hazmat:water"="destination"]::hazmatwater { |
| | 67 | set correct_hazmatwater_value; |
| | 68 | width: 14; |
| | 69 | z-index: -1; |
| | 70 | } |
| | 71 | way|z12-16.correct_hazmat_value::hazmat, |
| | 72 | way|z12-16.correct_hazmatwater_value::hazmatwater { |
| | 73 | width: 12; |
| | 74 | } |
| | 75 | way|z-11.correct_hazmat_value::hazmat, |
| | 76 | way|z-11.correct_hazmatwater_value::hazmatwater { |
| | 77 | width: 10; |
| | 78 | } |
| | 79 | /* dashed if both keys are present */ |
| | 80 | way.correct_hazmatwater_value[is_prop_set(correct_hazmat_value, hazmat)]::hazmatwater { |
| | 81 | dashes: 20,20; |
| | 82 | } |
| | 83 | /* the colors can be adjusted within JOSM color preferences */ |
| | 84 | way["hazmat"="yes"]::hazmat { |
| | 85 | color: hazmat_yes#FFEE00; /* yellow */ |
| | 86 | } |
| | 87 | way["hazmat"="no"]::hazmat { |
| | 88 | color: hazmat_no#FF0000; /* red */ |
| | 89 | } |
| | 90 | way["hazmat"="designated"]::hazmat { |
| | 91 | color: hazmat_designated#00FF00; /* green */ |
| | 92 | } |
| | 93 | way["hazmat"="destination"]::hazmat { |
| | 94 | color: hazmat_destination#FF9714; /* orange */ |
| | 95 | } |
| | 96 | way["hazmat:water"="yes"]::hazmatwater { |
| | 97 | color: hazmat_water_yes#6FEDFB; /* light blue */ |
| | 98 | } |
| | 99 | way["hazmat:water"="no"]::hazmatwater { |
| | 100 | color: hazmat_water_no#6B4EB1; /* purple */ |
| | 101 | } |
| | 102 | way["hazmat:water"="permissive"]::hazmatwater { |
| | 103 | color: hazmat_water_permissive#2437FF; /* blue */ |
| | 104 | } |
| | 105 | way["hazmat:water"="destination"]::hazmatwater { |
| | 106 | color: hazmat_water_destination#000C8B; /* dark blue */ |
| | 107 | } |
| | 108 | |
| | 109 | /* display german traffic signs */ |
| | 110 | node["traffic_sign"^="DE:261"] { |
| | 111 | icon-image: "Zeichen_261.svg"; |
| | 112 | } |
| | 113 | node["traffic_sign"^="DE:269"] { |
| | 114 | icon-image: "Zeichen_269.svg"; |
| | 115 | } |
| | 116 | node["traffic_sign"^="DE:354"] { |
| | 117 | icon-image: "Zeichen_354_-_Wasserschutzgebiet,_StVO_1992.svg"; |
| | 118 | } |
| | 119 | |
| | 120 | /* report wrong value of hazmat and hazmat:water */ |
| | 121 | way["hazmat"]!.correct_hazmat_value::hazmat { |
| | 122 | color: yellow; |
| | 123 | dashes-background-color: red; |
| | 124 | dashes: 4,24; |
| | 125 | opacity: 1; |
| | 126 | width: 5; |
| | 127 | text: tr("unusual value for hazmat!"); |
| | 128 | text-color: black; |
| | 129 | font-size: 11; |
| | 130 | text-halo-color: red; |
| | 131 | text-halo-radius: 2; |
| | 132 | casing-width: 1; |
| | 133 | casing-color: yellow; |
| | 134 | } |
| | 135 | way["hazmat:water"]!.correct_hazmatwater_value::hazmatwater { |
| | 136 | color: yellow; |
| | 137 | dashes-background-color: red; |
| | 138 | dashes: 4,24; |
| | 139 | opacity: 1; |
| | 140 | width: 5; |
| | 141 | text: tr("unusual value for hazmat:water!"); |
| | 142 | text-color: black; |
| | 143 | font-size: 11; |
| | 144 | text-halo-color: red; |
| | 145 | text-halo-radius: 2; |
| | 146 | casing-width: 1; |
| | 147 | casing-color: yellow; |
| | 148 | } |
| | 149 | }}} |