Changes between Initial Version and Version 1 of Styles/PublicTransportV2


Ignore:
Timestamp:
2017-11-01T19:20:38+01:00 (8 years ago)
Author:
Ialokim <ialokim@…>
Comment:

initial commit

Legend:

Unmodified
Added
Removed
Modified
  • Styles/PublicTransportV2

    v1 v1  
     1
     2
     3{{{
     4#!style type="mapcss"
     5
     6meta
     7{
     8    title: "Public Transport v2";
     9    description: "Highlight important information regarding public transport according to public transport version 2.";
     10    version: "1.[[revision]]_[[date]]";
     11    author: "Ialokim";
     12    link: "https://josm.openstreetmap.de/wiki/Styles/PublicTransportV2";
     13    watch-modified: true;
     14}
     15
     16meta[lang=de]
     17{
     18    title: "Öffentlicher Verkehr v2";
     19    description: "Hebt wichtige Informationen des öffentlichen Verkehrs nach Public Transport Version 2 hervor.";
     20}
     21
     22meta[lang=es]
     23{
     24    title: "Transporte Público v2";
     25    description: "Resalta informaciones importantes del transporte público acorde a Public Tranport Version 2.";
     26}
     27
     28
     29/*** Initial text properties ***/
     30way|z16-[public_transport=platform],
     31node|z16-[public_transport=platform],
     32node|z16-[public_transport=stop_position] {
     33        text-color: white;
     34        text-opacity: 1.0;
     35        font-size: 12;
     36        text-halo-radius: 3;
     37        text-halo-color: #000000;
     38        text-halo-opacity: 0.8;
     39        font-weight: bold;
     40}
     41
     42
     43/*** public_transport=platform ***/
     44/* unclosed way design > tagging error! */
     45way|z16-[public_transport=platform]!:closed{
     46        width: 10;
     47        dashes: none;
     48        color: #ffffff;
     49        opacity: 1.0;
     50        text-position: line
     51}
     52
     53/* area design */
     54area|z16-[public_transport=platform]{
     55        width: 3;
     56        color: #ffffff;
     57        fill-color: #ffffff;
     58        fill-opacity: 0.3;
     59        text-position: center;
     60        font-weight: bold;
     61}
     62
     63/* node design */
     64node|z16-[public_transport=platform] {
     65        icon-image: "warning-small.png";
     66        text-anchor-horizontal: right;
     67        text-anchor-vertical: center;
     68        text-offset-x: 5;
     69        text: "";
     70        object-z-index: 1.0;
     71}
     72
     73/* node halo design */
     74node|z16-[public_transport=platform]::halo {
     75        icon-image: none;
     76        symbol-shape: square;
     77        symbol-fill-color: white;
     78        symbol-size: 18;
     79}
     80node|z19-[public_transport=platform]::halo {
     81        object-z-index:-1.0;
     82}
     83
     84
     85
     86/*** public_transport=stop_position ***/
     87/* node design */
     88node|z16-[public_transport=stop_position] {
     89        icon-image: "warning-small.png";
     90        text-anchor-horizontal: center;
     91        text-anchor-vertical: center;
     92        text: "";
     93        object-z-index: 1.0;
     94}
     95node|z19-[public_transport=stop_position] {
     96        text-anchor-horizontal: right;
     97        text-offset-x: 5;
     98}
     99
     100/* node halo design */
     101node|z16-[public_transport=stop_position]::halo {
     102        icon-image: none;
     103        symbol-shape: square;
     104        symbol-fill-color: white;
     105        symbol-size: 18;
     106}
     107node|z19-[public_transport=stop_position]::halo {
     108        object-z-index:-1.0;
     109}
     110
     111
     112
     113
     114/*** public_transport=stop_area ***/
     115/* unclosed way design > tagging error! */
     116relation|z16-[public_transport=stop_area] > way!:closed {
     117        dashes: 10,10;
     118        dashes-background-color: hsb_color(CRC32_checksum(parent_tag("name"))/4294967296.0, 0.9, 0.7);
     119}
     120relation|z16-[public_transport=stop_area] > way!:closed:selected {
     121        dashes-background-color: hsb_color(CRC32_checksum(parent_tag("name"))/4294967296.0, 0.9, 0.5);
     122}
     123
     124/* area design */
     125relation|z16-[public_transport=stop_area] > area {
     126        color: hsb_color(CRC32_checksum(parent_tag("name"))/4294967296.0, 0.9, 0.7);
     127}
     128relation|z16-[public_transport=stop_area] > area:selected {
     129        color: hsb_color(CRC32_checksum(parent_tag("name"))/4294967296.0, 0.9, 0.5);
     130}
     131
     132/* node design */
     133relation[public_transport=stop_area] >[index!=1] node|z16-18 {
     134        text: "";
     135}
     136relation[public_transport=stop_area] >[index=1] node|z16-18 {
     137        text: parent_tag(name);
     138}
     139relation[public_transport=stop_area] > node|z19-20[public_transport=stop_position] {
     140        text: "";
     141}
     142relation[public_transport=stop_area] > node|z19-[public_transport=platform],
     143relation[public_transport=stop_area] > node|z21-[public_transport=stop_position],
     144relation[public_transport=stop_area] > area|z16- {
     145        text: cond(tag(name)==parent_tag(name),tag(name),concat(tag(name), " | ", parent_tag(name)));
     146}
     147relation[public_transport=stop_area] >[index=1] node|z16-18,
     148relation[public_transport=stop_area] > node|z19-[public_transport=platform],
     149relation[public_transport=stop_area] > node|z21-[public_transport=stop_position],
     150relation[public_transport=stop_area] > area|z16- {
     151        text-halo-color: hsb_color(CRC32_checksum(parent_tag("name"))/4294967296.0, 0.9, 0.7);
     152}
     153relation[public_transport=stop_area] >[index=1] node|z16-18,
     154relation[public_transport=stop_area] > node|z19-[public_transport=platform]:selected,
     155relation[public_transport=stop_area] > node|z21-[public_transport=stop_position]:selected,
     156relation[public_transport=stop_area] > area|z16-:selected {
     157        text-halo-color: hsb_color(CRC32_checksum(parent_tag("name"))/4294967296.0, 0.9, 0.5);
     158}
     159
     160/* node halo design */
     161relation[public_transport=stop_area] > node|z16-::halo {
     162        symbol-fill-color: hsb_color(CRC32_checksum(parent_tag("name"))/4294967296.0, 0.9, 0.7);
     163}
     164relation[public_transport=stop_area] > node|z16-:selected::halo {
     165        symbol-fill-color: hsb_color(CRC32_checksum(parent_tag("name"))/4294967296.0, 0.9, 0.5);
     166}
     167
     168/* node design for transport vehicles (only if has relation) */
     169relation[public_transport=stop_area] > node|z16-[public_transport=stop_position][bus=yes] {
     170        icon-image: "presets/transport/bus.svg";
     171}
     172relation[public_transport=stop_area] > node|z16-[public_transport=stop_position][tram=yes] {
     173        icon-image: "presets/transport/tram.svg";
     174}
     175relation[public_transport=stop_area] > node|z16-[public_transport=stop_position][light_rail=yes] {
     176        icon-image: "presets/transport/railway/light_rail.svg";
     177}
     178relation[public_transport=stop_area] > node|z16-[public_transport=stop_position][subway=yes] {
     179        icon-image: "presets/transport/railway/subway.svg";
     180}
     181relation[public_transport=stop_area] > node|z16-[public_transport=stop_position][train=yes] {
     182        icon-image: "presets/transport/train.svg";
     183}
     184relation[public_transport=stop_area] > node|z16-[public_transport=platform] {
     185        icon-image: "presets/transport/platform.svg";
     186}
     187
     188
     189/*** Route relations ***/
     190relation[type=route][route=bus] > way::halo,
     191relation[type=route][route=tram] > way::halo,
     192relation[type=route][route=light_rail] > way::halo,
     193relation[type=route][route=subway] > way::halo,
     194relation[type=route][route=train] > way::halo {
     195        object-z-index: -1.0;
     196        color: hsb_color(CRC32_checksum(parent_tag("name"))/4294967296.0, 0.9, 0.7);
     197        width: 16;
     198        opacity: 0.5;
     199        linecap: round;
     200        linejoin: round;
     201        text-color: hsb_color(CRC32_checksum(parent_tag("name"))/4294967296.0, 0.9, 0.7);
     202        font-size: 18;
     203        text: parent_tag(ref);
     204        text-position: line;
     205        text-offset-y: 20;
     206}
     207relation[type=route] > way:selected::halo,
     208relation[type=route][route=tram] > way:selected::halo,
     209relation[type=route][route=light_rail] > way:selected::halo,
     210relation[type=route][route=subway] > way:selected::halo,
     211relation[type=route][route=train] > way:selected::halo {
     212        color: hsb_color(CRC32_checksum(parent_tag("name"))/4294967296.0, 0.9, 0.5);
     213        text-color: hsb_color(CRC32_checksum(parent_tag("name"))/4294967296.0, 0.9, 0.5);
     214}
     215
     216}}}