Changes between Initial Version and Version 1 of Ticket #22539


Ignore:
Timestamp:
2022-11-29T21:04:19+01:00 (3 years ago)
Author:
taylor.smock
Comment:

A couple of notes:

  1. You didn't need to add yourself to cc -- the reporter will get replies sent to them.
  2. You can format the mapcss code by wrapping it in {{{#!mapcss }}}. Example:
    {{{#!mapcss
    [mapcss here]
    }}}
    
  3. You shouldn't have to add .png to the icon-image paths -- JOSM will automatically try .png and .svg.
  4. You are doing a set operation in (1) on the "default" layer. So you want to use prop(p_name, layer_name) or the equivalent for is_prop_set in (2), depending upon what you are trying to do. Example:
    node[is_prop_set("sg_hp0", "default")]::layer_signal_611 {
        z-index: 611;
        icon-image: "icons/light_rr.png";
        icon-offset-x: 0;
        icon-offset-y: -20;
        allow-overlap: true;
    }
    

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #22539

    • Property Cc mikeho removed
    • Property Component CoreCore mappaint
    • Property Resolutionworksforme
    • Property Status newclosed
  • Ticket #22539 – Description

    initial v1  
    44
    55The following works:
     6{{{#!mapcss
    67node z17-["railway:signal:combined:states" *= "DE-ESO:hp0"]::layer_signal_611,
    7 node z17-["railway:signal:main:states" *= "DE-ESO:hp0"]::layer_signal_611 { z-index: 611; icon-image: "icons/light_rr.png"; icon-offset-x: 0; icon-offset-y: -20; allow-overlap: true; }
     8node z17-["railway:signal:main:states" *= "DE-ESO:hp0"]::layer_signal_611 {
     9    z-index: 611;
     10    icon-image: "icons/light_rr.png";
     11    icon-offset-x: 0;
     12    icon-offset-y: -20;
     13    allow-overlap: true;
     14}
    815node z17-["railway:signal:combined:states" *= "DE-ESO:ks1"]::layer_signal_612,
    9 node z17-["railway:signal:main:states" *= "DE-ESO:ks1"]::layer_signal_612 { z-index: 612; icon-image: "icons/light_gr.png"; icon-offset-x: -5; icon-offset-y: -10; allow-overlap: true; }
     16node z17-["railway:signal:main:states" *= "DE-ESO:ks1"]::layer_signal_612 {
     17    z-index: 612;
     18    icon-image: "icons/light_gr.png";
     19    icon-offset-x: -5;
     20    icon-offset-y: -10;
     21    allow-overlap: true;
     22}
    1023node z17-["railway:signal:combined:states" *= "DE-ESO:ks2"]::layer_signal_613,
    11 node z17-["railway:signal:main:states" *= "DE-ESO:ks2"]::layer_signal_613 { z-index: 613; icon-image: "icons/light_or.png"; icon-offset-x: 5; icon-offset-y: -10; allow-overlap: true; }
     24node z17-["railway:signal:main:states" *= "DE-ESO:ks2"]::layer_signal_613 {
     25    z-index: 613;
     26    icon-image: "icons/light_or.png";
     27    icon-offset-x: 5;
     28    icon-offset-y: -10;
     29    allow-overlap: true;
     30}
     31}}}
    1232
    13 My idea to first remember the states via Set (classes) does not work regarding the display in connection with the layers (without ::layer___ it works))
     33My idea to first remember the states via Set (classes) does not work regarding the display in connection with the layers (without `::layer___` it works))
    1434
    15351) get status
    16 
     36{{{#!mapcss
    1737node["railway:signal:combined:states" *= "DE-ESO:hp0"], node["railway:signal:main:states" *= "DE-ESO:hp0"] { set .sg_hp0; }
    1838
     
    2040
    2141node["railway:signal:combined:states" *= "DE-ESO:ks2"], node["railway:signal:main:states" *= "DE-ESO:ks2"] { set .sg_ks2; }
    22 
     42}}}
    23432) display
    24 
    25 node.sg_hp0::layer_signal_611 { z-index: 611; icon-image: "icons/light_rr.png"; icon-offset-x: 0; icon-offset-y: -20; allow-overlap: true; } node.sg_ks1::layer_signal_612 { z-index: 612; icon-image: "icons/light_gr.png"; icon-offset-x: -5; icon-offset-y: -10; allow-overlap: true; } node.sg_ks2::layer_signal_613 { z-index: 613; icon-image: "icons/light_or.png"; icon-offset-x: 5; icon-offset-y: -10; allow-overlap: true; }
    26 
    27 Unfortunately I didn't find anything useful at https://josm.openstreetmap.de/wiki/Help/Styles/MapCSSImplementation. Can't JOSM do the combo of layer and sets or am I thinking wrong?
     44{{{#!mapcss
     45node.sg_hp0::layer_signal_611 {
     46    z-index: 611;
     47    icon-image: "icons/light_rr.png";
     48    icon-offset-x: 0;
     49    icon-offset-y: -20;
     50    allow-overlap: true;
     51}
     52node.sg_ks1::layer_signal_612 {
     53    z-index: 612;
     54    icon-image: "icons/light_gr.png";
     55    icon-offset-x: -5;
     56    icon-offset-y: -10;
     57    allow-overlap: true;
     58}
     59node.sg_ks2::layer_signal_613 {
     60    z-index: 613;
     61    icon-image: "icons/light_or.png";
     62    icon-offset-x: 5;
     63    icon-offset-y: -10;
     64    allow-overlap: true;
     65}
     66}}}
     67Unfortunately I didn't find anything useful at wiki:Help/Styles/MapCSSImplementation. Can't JOSM do the combo of layer and sets or am I thinking wrong?
    2868
    2969Many greetings