Changes between Version 6 and Version 7 of Styles/HealthBoundary


Ignore:
Timestamp:
2021-05-27T04:35:17+02:00 (5 years ago)
Author:
anonymous
Comment:

revision identifcation of layers + color ways

Legend:

Unmodified
Added
Removed
Modified
  • Styles/HealthBoundary

    v6 v7  
    1 = Health Boundaries
    2 
    3 [[Image(health_boundaries_icon.svg,link=)]]
    4 
    5 Colors Health Boundary Polygons and nodes. It Helps monitor and edit Boundaries. Parameter options let select Health levels to show
    6 
    7 == Code
    8 {{{
    9 #!style type="mapcss"
    101meta {
    112  title: "Health Boundaries";
    12   version: "1.[[revision]]_[[date]]";
     3  version: "1.7_2021-05-27";
    134  description: "Colors Health Boundary Polygons and nodes. It Helps monitor and edit Boundaries. Parameter options let select Health levels to show.";
    145  icon: "health_boundaries_icon.svg";
     
    178}
    189
     10canvas {
     11    fill-color: #ffffea;
     12}
     13
    1914/* Setting Options - Select Territory layers (boolean value yes/no) */
    2015
    21 setting::health_level_4 {
    22   type: boolean;
    23   label: tr("health_level=4");
     16setting::allow_health_level_4 {
     17  type: boolean;
     18  label: tr("allow health_level=4");
    2419  default: false;
    2520}
    26 setting::health_level_5 {
    27   type: boolean;
    28   label: tr("health_level=5");
     21setting::allow_health_level_5 {
     22  type: boolean;
     23  label: tr("allow health_level=5");
    2924  default: true;
    3025}
    31 setting::health_level_6 {
    32   type: boolean;
    33   label: tr("health_level=6");
     26setting::allow_health_level_6 {
     27  type: boolean;
     28  label: tr("allow health_level=6");
    3429  default: false;
    3530}
    36 setting::health_level_8 {
    37   type: boolean;
    38   label: tr("health_level=8");
     31setting::allow_health_level_8 {
     32  type: boolean;
     33  label: tr("allow health_level=8");
    3934  default: true;
    4035}
    41 setting::health_level_10 {
    42   type: boolean;
    43   label: tr("health_level=10");
     36setting::allow_health_level_10 {
     37  type: boolean;
     38  label: tr("allow health_level=10");
    4439  default: false;
    4540}
    4641
    47 /* Pseudo Classes + distinct colors by territory */
    48 
    49 area[boundary][setting("health_level_10")][health_level=10]
    50 {       set t_10;
    51         object-z-index: 11;
     42/*------------------------------------------------------------------------
     43 First: minimize appearance for areas, ways and nodes
     44 ------------------------------------------------------------------------*/
     45
     46area {
     47        z-index: -1;
     48        linecap: none;
     49    width: 0; fill-opacity: 0;
     50        text-opacity:0;
     51        color: #FFFFAA; casing-opacity:0;
     52}
     53way {
     54        z-index: -1;
     55    width: 0.1; casing-width:0; casing-opacity: 0;
     56        color: #FFFFAA; opacity:0;
     57}
     58node {
     59        z-index: -1;
     60    symbol-shape: square; symbol-size: 0; symbol-stroke-width:0.1 ;
     61        symbol-stroke-color: #FFFFAA; symbol-stroke-opacity:0;
     62        symbol-fill-opacity:0; icon-opacity: 0;
     63}
     64
     65/*------------------------------------------------------------------------
     66 defines health boundaries pseudo-layer ::layer
     67 + distinct colors for each health_level
     68 ------------------------------------------------------------------------*/
     69
     70area[boundary][setting("allow_health_level_10")][health_level=10]::health_level,
     71area[boundary][setting("allow_health_level_10")][health_level=10] >way::health_level
     72{       set .health_level;
     73        z-index: 11;
     74  fill-color:green; fill-opacity:0.2;
     75   font-size: 1;
     76   text-color: white;
     77   text: name;
     78   text-position: center;
     79   width:2;
     80   color:green;
     81   opacity: 1;
     82  } 
     83area|z12-[health_level_10]::health_level {      font-size: 14;}
     84
     85area[boundary][setting("allow_health_level_8")][health_level=8]::health_level,
     86area[boundary][setting("allow_health_level_8")][health_level=8] > way::health_level
     87{set .health_level;
     88        z-index: 13;
    5289  fill-color:blue; fill-opacity:0.2;
    53    font-size: 9;
    54    text-color: blue;
    55    text: name;
    56    text-position: center;
    57    color:blue;
    58    casing-width:9; casing-color: blue;
    59   } 
    60 area[setting("health_level_8")][boundary][health_level=8]
    61 {set t_8;
    62         object-z-index: 13;
    63   fill-color:green; fill-opacity:0.2;
    64    font-size: 10;
    65    text-color: green;
    66    text: name;
    67    text-position: center;
    68    width:2;
    69    color:red;
    70    casing-width:0;
    71   } 
    72 area|z11-.t_8
    73 {
    74         font-size: 16;
    75 }   
    76 area[boundary][setting("health_level_6")][health_level=6]
    77 {set t_6;
    78         object-z-index: 15;
    79   fill-color:blue; fill-opacity:0.3;
    80    font-size: 14;
     90   font-size: 1;
     91   text-color: navy;
     92   text: name;
     93   text-position: center;
     94   width:3;
     95   color:navy;
     96    opacity: 1;
     97 } 
     98area|z10-.health_level[8]::health_level {       font-size: 14;}
     99 
     100area[boundary][setting("allow_health_level_6")][health_level=6]::health_level,
     101area[boundary][setting("allow_health_level_6")][health_level=6] > way::health_level
     102{set .health_level;
     103        z-index: 15;
     104  fill-color:darkcyan; fill-opacity:0.2;
     105   font-size: 15;
    81106   text-color: blue;
    82107   text: name;
     
    84109   width: 3;
    85110   color:blue;
    86    casing-width:1; casing-color: blue;
     111   opacity: 1;
    87112   }
    88 area[boundary][setting("health_level_5")][health_level=5]
    89 {set t_5;
    90   object-z-index: 16;
    91   fill-color:#FFCC00; fill-opacity:0.2;
     113area[boundary][setting("allow_health_level_5")][health_level=5]::health_level,
     114area[boundary][setting("allow_health_level_5")][health_level=5] > way::health_level
     115{set .health_level;
     116  z-index: 16;
     117  fill-color:lightcoral; fill-opacity:0.2;
    92118   font-size: 18;
    93119   text-color: brown;
    94120   text: name;
    95121   text-position: center;
     122   width: 4;
     123   color: brown;
     124   opacity:1;
     125  }
     126
     127area[boundary][setting("allow_health_level_4")][health_level=4]::health_level,
     128area[boundary][setting("allow_health_level_4")][health_level=4]> way::health_level
     129{set .health_level;
     130   z-index: 20;
     131   fill-color:crimson; fill-opacity:0.2;
     132   font-size: 20;
     133   text-color: rose;
     134   text: name;
     135   text-position: center;
     136   width:  5;
     137   color: crimson;
     138   opacity: 1;
     139}
     140
     141/*------------------------------------------------------------------------
     142 ways - defines health boundaries pseudo-layer ::layer
     143 + distinct colors for each health_level
     144 ------------------------------------------------------------------------*/
     145
     146way[boundary][setting("allow_health_level_10")][health_level=10]::health_level {       
     147        set .health_level;
     148        /*z-index: 11;*/
     149        width:2;
     150        color:green;
     151        opacity: 1;
     152        casing-color: yellow;
     153        casing-width: 3;
     154        casing-opacity: 0.7;
     155  } 
     156
     157way[boundary][setting("allow_health_level_8")][health_level=8]::health_level
     158{
     159        set .health_level;
     160        /*z-index: 13;*/
     161        width:3;
     162        color:navy;
     163        opacity: 1;
     164        casing-color: yellow;
     165        casing-width: 3;
     166        casing-opacity: 0.7;
     167  } 
     168 
     169way[boundary][setting("allow_health_level_6")][health_level=6]::health_level
     170{set .health_level;
     171        /*z-index: 15;*/
     172   text-position: center;
    96173   width: 3;
    97    color: #FFCC00;
    98    casing-width:3; casing-color: orange;
     174   color:blue;
     175        opacity: 1;
     176   casing-color: yellow;
     177   casing-width: 3;
     178   casing-opacity: 0.7;
     179   }
     180
     181way[boundary][setting("allow_health_level_5")][health_level=5]::health_level
     182{
     183        set .health_level;
     184        /*z-index: 16;*/
     185        width: 4;
     186        color: brown;
     187        opacity: 1;
     188        opacity:0.3;
     189        casing-color: yellow;
     190        casing-width: 3;
     191        casing-opacity: 0.7;
    99192  }
    100 area[boundary][setting("health_level_4")][health_level=4]
    101 {set t_4;
    102   object-z-index: 20;
    103   fill-color:crimson; fill-opacity:0.2;
    104    font-size: 16;
    105    text-color: crimson;
    106    text: name;
    107    text-position: center;
    108    width: 3;
    109    color: crimson;
    110    casing-width:3; casing-color: crimson;
    111 }
    112 
    113 canvas {
    114     fill-color: #ffffea;
    115 }
    116 
    117 /* all Nodes - low zoom */
    118 
    119 node|z1-8 {
    120     symbol-shape: square; symbol-size: 0; symbol-stroke-width:0.1 ;
    121 }
    122 
    123 /* Untagged nodes - ways child nodes - same color */
    124 area.t_10 > node!:tagged {
    125   symbol-stroke-color: blue;
    126   symbol-fill-color: white;
    127 }
    128 area.t_8 > node!:tagged {
    129   symbol-stroke-color: red;
    130   symbol-fill-color: white;
    131 }
    132 area.t_6 > node!:tagged {
    133   symbol-stroke-color: blue;
    134   symbol-fill-color: white;
    135 }
    136 area.t_5 > node!:tagged {
    137   symbol-stroke-color: #FFCC00;
    138   symbol-fill-color: white;
    139 }
    140 area.t_4 > node!:tagged {
    141   symbol-stroke-color: rose;
    142   symbol-fill-color: white;
    143 }
    144 
    145 way|z1-8 > node {
    146     symbol-shape: square; symbol-size: 0.1; symbol-stroke-width:0.1 ;
    147 }
    148 way|z9- > node!:tagged {
    149         symbol-shape: square; 
    150         symbol-stroke-color: gray;
    151         symbol-fill-color: white;
    152         symbol-stroke-width: 2;
    153         symbol-stroke-opacity:0.8;
    154 }
    155 way > node|z9-11!:tagged {
    156     symbol-size: 0.02; 
    157 }
    158 way > node|z12-13!:tagged {
    159     symbol-size: 1.8;
    160 }
    161 way > node|z14-!:tagged {
    162     symbol-size: 7;
    163 }
    164 
    165 /* Place nodes */
    166 node|z9-11[place] { symbol-shape:pentagon; symbol-size: 9;
    167         symbol-fill-color:white; symbol-stroke-width:3; symbol-stroke-color:gray;
    168 }
    169 node|z12-[place] { symbol-shape:pentagon; symbol-size: 14;
    170         symbol-fill-color:white; symbol-stroke-width:3; symbol-stroke-color:black;
    171 }
    172 
    173 
    174 /* Single unclosed ways end nodes */
    175 way!:closed >[index=1] node!:connection,
    176 way!:closed >[index=-1] node!:connection {
    177   symbol-fill-color: yellow;
    178    symbol-stroke-color: red;
    179    symbol-stroke-width: 3;
    180    symbol-size: 14;
    181 }
     193
     194way[boundary][setting("allow_health_level_4")][health_level=4]::health_level
     195{
     196        set .health_level;
     197        /*z-index: 20;*/
     198        width:  5;
     199        color: crimson;
     200        opacity: 1;
     201        casing-color: yellow;
     202        casing-width: 3;
     203        casing-opacity: 0.7;
     204}
     205
     206/*------------------------------------------------------------------------
     207 health boundaries pseudo-layer ::layer
     208 areas - ways   ------------------------------------------------------------------------*/
    182209       
    183 relation[boundary]:unclosed_multipolygon > way 
    184 {
     210area[boundary=health][!name]:closed::health_level
     211{
     212        text-color:yellow;
     213        text: eval("name ?");
     214        text-opacity: 1;
     215        font-opacity: 1;
     216        fill-opacity: 0.4;
     217        }
     218
     219area[boundary=health]:selected::health_level
     220{
     221  casing-width: 6; casing-color:red; casing-opacity:0.8;
     222}       
     223
     224relation[boundary=health]:unclosed_multipolygon::health_level > way     
     225{
     226  linecap: round;
     227  text:"";
    185228  casing-width:6;
    186229  casing-dashes: 10,10;
     
    195238        }
    196239       
    197 relation[boundary=administrative][!name]:closed
    198 {
    199   casing-width:5;
    200   casing-color:red;
     240area[boundary=health]:unclosed_multipolygon::health_level > node       
     241{
     242  text:"";
     243  casing-width:6;
     244  casing-dashes: 10,10;
     245  casing-color:yellow;
    201246  casing-opacity:1;
    202   z-index: -3;
     247  z-index: 100;
    203248        symbol-stroke-width: 24;
    204         symbol-stroke-color: purple;
     249        symbol-stroke-color: red;
    205250        symbol-stroke-opacity: 0.8;
     251        symbol-fill-opacity: 1;
    206252        symbol-shape: circle;
    207253        symbol-size: 12;
    208254        }
    209 way:selected
    210 {
    211   casing-width: 6; casing-color:red; casing-opacity:0.8;
    212 }       
    213 
    214 relation[boundary]:selected
    215 {
    216    fill-opacity:0.3;
    217    fill-color:red;
    218    text-color: red;
    219   }
    220 
    221  relation[boundary]:selected > way
    222 {
    223    casing-width:+6;
    224    casing-color:red;
    225   }
    226 
    227 
    228 /* Connection nodes */
    229 
    230 node|z11-:connection {
    231    symbol-size:12;
    232   symbol-shape: circle;
    233   symbol-stroke-color: #00ffff;
    234   symbol-stroke-width: 1;
    235   symbol-fill-color: crimson;
    236 }
    237 
    238 /* node selected */
    239 
    240 node|z10-:selected
    241 {
    242         symbol-size:14;
    243         symbol-stroke-width:3;
     255
     256/*------------------------------------------------------------------------
     257 health boundaries pseudo-layer ::layer
     258 nodes  ------------------------------------------------------------------------*/
     259
     260area|z1-15[boundary=health]::health_layer > node,
     261way|z1-15[boundary=health]::health_layer > node {
     262        symbol-size:0.01;
     263        symbol-shape: square;
     264        symbol-stroke-color: #00ffff;
     265        symbol-stroke-width: 0.01;
     266        symbol-fill-color: #00FFFF;
     267        symbol-fill-opacity:0;
     268        symbol-stroke-opacity: 0;
     269}
     270
     271area|z16-[boundary=health]::health_layer > node,
     272way|z16-[boundary=health]::health_layer > node {
     273        symbol-size:2;
     274        symbol-shape: square;
     275        symbol-stroke-color: navy;
     276        symbol-stroke-width: 2;
     277        symbol-stroke-opacity: 1;
     278        symbol-fill-color: #FFFFBB;
     279        symbol-fill-opacity:1;
     280}
     281
     282/* connection nodes - closed areas */
     283
     284area|z13-[boundary=health]::health_layer  node:connection,
     285way|z13-[boundary=health]::health_layer  node:connection {
     286        symbol-size:10;
     287        symbol-shape: circle;
     288        symbol-stroke-color: #00ffff;
     289        symbol-stroke-width: 2;
     290        symbol-stroke-opacity: 1;
     291        symbol-fill-color: crimson;
     292        symbol-fill-opacity:1;
     293        opacity: 1;
     294}
     295
     296/* connection nodes - unclosed areas */
     297
     298area|z11-[boundary=health]::health_level >[index=1] node!:connection,
     299area|z11-[boundary=health]::health_level >[index=-1] node!:connection,
     300way|z11-[boundary=health]::health_level >[index=1] node!:connection,
     301way|z11-[boundary=health]::health_level >[index=-1] node!:connection {
     302        symbol-fill-color: yellow;
    244303        symbol-stroke-color: crimson;
    245         symbol-fill-color: yellow;
    246 }
    247  
    248 node|z11-:connection:selected {
    249   symbol-stroke-color: crimson;
    250   symbol-stroke-width: 5;
    251   symbol-fill-color: yellow;
    252 }
    253 /* Tagged nodes */
    254 
    255 node|z9-12[!place]:tagged!:connection {
    256     symbol-shape: triangle; symbol-size: 4;
    257   symbol-stroke-color: cyan;
    258   text-color:yellow;
    259 }
    260 node|z13-[!place]:tagged!:connection {
    261     symbol-shape: triangle; symbol-size: 14;
    262   symbol-stroke-color: cyan;
    263   symbol-fill-color: blue;
    264   text-color:yellow;
    265 }
    266 }}}
     304        symbol-stroke-width: 2;
     305        symbol-shape: triangle;
     306        symbol-size: 24;
     307        symbol-stroke-opacity:1;
     308        symbol-fill-opacity:1;
     309}