Changes between Initial Version and Version 1 of Ru:Styles/hazmat


Ignore:
Timestamp:
2018-03-13T10:46:48+01:00 (8 years ago)
Author:
ak099
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • Ru:Styles/hazmat

    v1 v1  
     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
     30meta
     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
     42meta[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 */
     50way["tiger:reviewed"=no]::core_tiger {
     51    opacity: 0;
     52}
     53
     54/* display hazmat on ways */
     55way["hazmat"="yes"]::hazmat,
     56way["hazmat"="no"]::hazmat,
     57way["hazmat"="designated"]::hazmat,
     58way["hazmat"="destination"]::hazmat {
     59    set correct_hazmat_value;
     60    width: 14;
     61    z-index: -1.1;
     62}
     63way["hazmat:water"="yes"]::hazmatwater,
     64way["hazmat:water"="no"]::hazmatwater,
     65way["hazmat:water"="permissive"]::hazmatwater,
     66way["hazmat:water"="destination"]::hazmatwater {
     67    set correct_hazmatwater_value;
     68    width: 14;
     69    z-index: -1;
     70}
     71way|z12-16.correct_hazmat_value::hazmat,
     72way|z12-16.correct_hazmatwater_value::hazmatwater {
     73    width: 12;
     74}
     75way|z-11.correct_hazmat_value::hazmat,
     76way|z-11.correct_hazmatwater_value::hazmatwater {
     77    width: 10;
     78}
     79    /* dashed if both keys are present */
     80way.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 */
     84way["hazmat"="yes"]::hazmat {
     85    color: hazmat_yes#FFEE00; /* yellow */
     86}
     87way["hazmat"="no"]::hazmat {
     88    color: hazmat_no#FF0000; /* red */
     89}
     90way["hazmat"="designated"]::hazmat {
     91    color: hazmat_designated#00FF00; /* green */
     92}
     93way["hazmat"="destination"]::hazmat {
     94    color: hazmat_destination#FF9714; /* orange */
     95}
     96way["hazmat:water"="yes"]::hazmatwater {
     97    color: hazmat_water_yes#6FEDFB; /* light blue */
     98}
     99way["hazmat:water"="no"]::hazmatwater {
     100    color: hazmat_water_no#6B4EB1; /* purple */
     101}
     102way["hazmat:water"="permissive"]::hazmatwater {
     103    color: hazmat_water_permissive#2437FF; /* blue */
     104}
     105way["hazmat:water"="destination"]::hazmatwater {
     106    color: hazmat_water_destination#000C8B; /* dark blue */
     107}
     108
     109/* display german traffic signs */
     110node["traffic_sign"^="DE:261"] {
     111    icon-image: "Zeichen_261.svg";
     112}
     113node["traffic_sign"^="DE:269"] {
     114    icon-image: "Zeichen_269.svg";
     115}
     116node["traffic_sign"^="DE:354"] {
     117    icon-image: "Zeichen_354_-_Wasserschutzgebiet,_StVO_1992.svg";
     118}
     119
     120/* report wrong value of hazmat and hazmat:water */
     121way["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}
     135way["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}}}