Changes between Initial Version and Version 1 of Styles/HealthBoundary


Ignore:
Timestamp:
2021-05-14T00:31:51+02:00 (5 years ago)
Author:
skyper
Comment:

copy code from zip file

Legend:

Unmodified
Added
Removed
Modified
  • Styles/HealthBoundary

    v1 v1  
     1{{{
     2#!style type="mapcss"
     3
     4meta {
     5  title: "Health Boundaries";
     6  version: "1.[[revision]]_[[date]]";
     7  description: "Colors Health Boundary Polygons and nodes. It Helps monitor and edit Boundaries. Parameter options let select Health levels to show.";
     8  icon: "admin_boundaries_icon.svg";
     9  author: "pierzen";
     10  link: "https://josm.openstreetmap.de/wiki/StylesHealthBoundary";
     11}
     12
     13/* Setting Options - Select Territory layers (boolean value yes/no) */
     14
     15setting::health_level_4 {
     16  type: boolean;
     17  label: tr("health_level=4");
     18  default: false;
     19}
     20setting::health_level_5 {
     21  type: boolean;
     22  label: tr("health_level=5");
     23  default: true;
     24}
     25setting::health_level_6 {
     26  type: boolean;
     27  label: tr("health_level=6");
     28  default: false;
     29}
     30setting::health_level_8 {
     31  type: boolean;
     32  label: tr("health_level=8");
     33  default: true;
     34}
     35setting::health_level_10 {
     36  type: boolean;
     37  label: tr("health_level=10");
     38  default: false;
     39}
     40
     41/* Pseudo Classes + distinct colors by territory */
     42
     43area[boundary][setting("health_level_10")][health_level=10]
     44{       set t_10;
     45        object-z-index: 11;
     46  fill-color:blue; fill-opacity:0.2;
     47   font-size: 9;
     48   text-color: blue;
     49   text: name;
     50   text-position: center;
     51   color:blue;
     52   casing-width:9; casing-color: blue;
     53  } 
     54area[setting("health_level_8")][boundary][health_level=8]
     55{set t_8;
     56        object-z-index: 13;
     57  fill-color:green; fill-opacity:0.2;
     58   font-size: 10;
     59   text-color: green;
     60   text: name;
     61   text-position: center;
     62   width:2;
     63   color:red;
     64   casing-width:0;
     65  } 
     66area|z11-.t_8
     67{
     68        font-size: 16;
     69}   
     70area[boundary][setting("health_level_6")][health_level=6]
     71{set t_6;
     72        object-z-index: 15;
     73  fill-color:blue; fill-opacity:0.3;
     74   font-size: 14;
     75   text-color: blue;
     76   text: name;
     77   text-position: center;
     78   width: 3;
     79   color:blue;
     80   casing-width:1; casing-color: blue;
     81   }
     82area[boundary][setting("health_level_5")][health_level=5]
     83{set t_5;
     84  object-z-index: 16;
     85  fill-color:#FFCC00; fill-opacity:0.2;
     86   font-size: 18;
     87   text-color: brown;
     88   text: name;
     89   text-position: center;
     90   width: 3;
     91   color: #FFCC00;
     92   casing-width:3; casing-color: orange;
     93  }
     94area[boundary][setting("health_level_4")][health_level=4]
     95{set t_4;
     96  object-z-index: 20;
     97  fill-color:crimson; fill-opacity:0.2;
     98   font-size: 16;
     99   text-color: crimson;
     100   text: name;
     101   text-position: center;
     102   width: 3;
     103   color: crimson;
     104   casing-width:3; casing-color: crimson;
     105}
     106
     107canvas {
     108    fill-color: #ffffea;
     109}
     110
     111/* all Nodes - low zoom */
     112
     113node|z1-8 {
     114    symbol-shape: square; symbol-size: 0; symbol-stroke-width:0.1 ;
     115}
     116
     117/* Untagged nodes - ways child nodes - same color */
     118area.t_10 > node!:tagged {
     119  symbol-stroke-color: blue;
     120  symbol-fill-color: white;
     121}
     122area.t_8 > node!:tagged {
     123  symbol-stroke-color: red;
     124  symbol-fill-color: white;
     125}
     126area.t_6 > node!:tagged {
     127  symbol-stroke-color: blue;
     128  symbol-fill-color: white;
     129}
     130area.t_5 > node!:tagged {
     131  symbol-stroke-color: #FFCC00;
     132  symbol-fill-color: white;
     133}
     134area.t_4 > node!:tagged {
     135  symbol-stroke-color: rose;
     136  symbol-fill-color: white;
     137}
     138
     139way|z1-8 > node {
     140    symbol-shape: square; symbol-size: 0.1; symbol-stroke-width:0.1 ;
     141}
     142way|z9- > node!:tagged {
     143        symbol-shape: square; 
     144        symbol-stroke-color: gray;
     145        symbol-fill-color: white;
     146        symbol-stroke-width: 2;
     147        symbol-stroke-opacity:0.8;
     148}
     149way > node|z9-11!:tagged {
     150    symbol-size: 0.02; 
     151}
     152way > node|z12-13!:tagged {
     153    symbol-size: 1.8;
     154}
     155way > node|z14-!:tagged {
     156    symbol-size: 7;
     157}
     158
     159/* Place nodes */
     160node|z9-11[place] { symbol-shape:pentagon; symbol-size: 9;
     161        symbol-fill-color:white; symbol-stroke-width:3; symbol-stroke-color:gray;
     162}
     163node|z12-[place] { symbol-shape:pentagon; symbol-size: 14;
     164        symbol-fill-color:white; symbol-stroke-width:3; symbol-stroke-color:black;
     165}
     166
     167
     168/* Single unclosed ways end nodes */
     169way!:closed >[index=1] node!:connection,
     170way!:closed >[index=-1] node!:connection {
     171  symbol-fill-color: yellow;
     172   symbol-stroke-color: red;
     173   symbol-stroke-width: 3;
     174   symbol-size: 14;
     175}
     176       
     177relation[boundary]:unclosed_multipolygon > way 
     178{
     179  casing-width:6;
     180  casing-dashes: 10,10;
     181  casing-color:yellow;
     182  casing-opacity:1;
     183  z-index: -3;
     184        symbol-stroke-width: 24;
     185        symbol-stroke-color: red;
     186        symbol-stroke-opacity: 0.8;
     187        symbol-shape: circle;
     188        symbol-size: 12;
     189        }
     190       
     191relation[boundary=administrative][!name]:closed
     192{
     193  casing-width:5;
     194  casing-color:red;
     195  casing-opacity:1;
     196  z-index: -3;
     197        symbol-stroke-width: 24;
     198        symbol-stroke-color: purple;
     199        symbol-stroke-opacity: 0.8;
     200        symbol-shape: circle;
     201        symbol-size: 12;
     202        }
     203way:selected
     204{
     205  casing-width: 6; casing-color:red; casing-opacity:0.8;
     206}       
     207
     208relation[boundary]:selected
     209{
     210   fill-opacity:0.3;
     211   fill-color:red;
     212   text-color: red;
     213  }
     214
     215 relation[boundary]:selected > way
     216{
     217   casing-width:+6;
     218   casing-color:red;
     219  }
     220
     221
     222/* Connection nodes */
     223
     224node|z11-:connection {
     225   symbol-size:12;
     226  symbol-shape: circle;
     227  symbol-stroke-color: #00ffff;
     228  symbol-stroke-width: 1;
     229  symbol-fill-color: crimson;
     230}
     231
     232/* node selected */
     233
     234node|z10-:selected
     235{
     236        symbol-size:14;
     237        symbol-stroke-width:3;
     238        symbol-stroke-color: crimson;
     239        symbol-fill-color: yellow;
     240}
     241 
     242node|z11-:connection:selected {
     243  symbol-stroke-color: crimson;
     244  symbol-stroke-width: 5;
     245  symbol-fill-color: yellow;
     246}
     247/* Tagged nodes */
     248
     249node|z9-12[!place]:tagged!:connection {
     250    symbol-shape: triangle; symbol-size: 4;
     251  symbol-stroke-color: cyan;
     252  text-color:yellow;
     253}
     254node|z13-[!place]:tagged!:connection {
     255    symbol-shape: triangle; symbol-size: 14;
     256  symbol-stroke-color: cyan;
     257  symbol-fill-color: blue;
     258  text-color:yellow;
     259}
     260
     261}}}