meta { title: "Health Boundaries"; version: "1.7_2021-05-27"; description: "Colors Health Boundary Polygons and nodes. It Helps monitor and edit Boundaries. Parameter options let select Health levels to show."; icon: "health_boundaries_icon.svg"; author: "pierzen"; link: "https://josm.openstreetmap.de/wiki/Styles/HealthBoundary"; } canvas { fill-color: #ffffea; } /* Setting Options - Select Territory layers (boolean value yes/no) */ setting::allow_health_level_4 { type: boolean; label: tr("allow health_level=4"); default: false; } setting::allow_health_level_5 { type: boolean; label: tr("allow health_level=5"); default: true; } setting::allow_health_level_6 { type: boolean; label: tr("allow health_level=6"); default: false; } setting::allow_health_level_8 { type: boolean; label: tr("allow health_level=8"); default: true; } setting::allow_health_level_10 { type: boolean; label: tr("allow health_level=10"); default: false; } /*------------------------------------------------------------------------ First: minimize appearance for areas, ways and nodes ------------------------------------------------------------------------*/ area { z-index: -1; linecap: none; width: 0; fill-opacity: 0; text-opacity:0; color: #FFFFAA; casing-opacity:0; } way { z-index: -1; width: 0.1; casing-width:0; casing-opacity: 0; color: #FFFFAA; opacity:0; } node { z-index: -1; symbol-shape: square; symbol-size: 0; symbol-stroke-width:0.1 ; symbol-stroke-color: #FFFFAA; symbol-stroke-opacity:0; symbol-fill-opacity:0; icon-opacity: 0; } /*------------------------------------------------------------------------ defines health boundaries pseudo-layer ::layer + distinct colors for each health_level ------------------------------------------------------------------------*/ area[boundary][setting("allow_health_level_10")][health_level=10]::health_level, area[boundary][setting("allow_health_level_10")][health_level=10] >way::health_level { set .health_level; z-index: 11; fill-color:green; fill-opacity:0.2; font-size: 1; text-color: white; text: name; text-position: center; width:2; color:green; opacity: 1; } area|z12-[health_level_10]::health_level { font-size: 14;} area[boundary][setting("allow_health_level_8")][health_level=8]::health_level, area[boundary][setting("allow_health_level_8")][health_level=8] > way::health_level {set .health_level; z-index: 13; fill-color:blue; fill-opacity:0.2; font-size: 1; text-color: navy; text: name; text-position: center; width:3; color:navy; opacity: 1; } area|z10-.health_level[8]::health_level { font-size: 14;} area[boundary][setting("allow_health_level_6")][health_level=6]::health_level, area[boundary][setting("allow_health_level_6")][health_level=6] > way::health_level {set .health_level; z-index: 15; fill-color:darkcyan; fill-opacity:0.2; font-size: 15; text-color: blue; text: name; text-position: center; width: 3; color:blue; opacity: 1; } area[boundary][setting("allow_health_level_5")][health_level=5]::health_level, area[boundary][setting("allow_health_level_5")][health_level=5] > way::health_level {set .health_level; z-index: 16; fill-color:lightcoral; fill-opacity:0.2; font-size: 18; text-color: brown; text: name; text-position: center; width: 4; color: brown; opacity:1; } area[boundary][setting("allow_health_level_4")][health_level=4]::health_level, area[boundary][setting("allow_health_level_4")][health_level=4]> way::health_level {set .health_level; z-index: 20; fill-color:crimson; fill-opacity:0.2; font-size: 20; text-color: rose; text: name; text-position: center; width: 5; color: crimson; opacity: 1; } /*------------------------------------------------------------------------ ways - defines health boundaries pseudo-layer ::layer + distinct colors for each health_level ------------------------------------------------------------------------*/ way[boundary][setting("allow_health_level_10")][health_level=10]::health_level { set .health_level; /*z-index: 11;*/ width:2; color:green; opacity: 1; casing-color: yellow; casing-width: 3; casing-opacity: 0.7; } way[boundary][setting("allow_health_level_8")][health_level=8]::health_level { set .health_level; /*z-index: 13;*/ width:3; color:navy; opacity: 1; casing-color: yellow; casing-width: 3; casing-opacity: 0.7; } way[boundary][setting("allow_health_level_6")][health_level=6]::health_level {set .health_level; /*z-index: 15;*/ text-position: center; width: 3; color:blue; opacity: 1; casing-color: yellow; casing-width: 3; casing-opacity: 0.7; } way[boundary][setting("allow_health_level_5")][health_level=5]::health_level { set .health_level; /*z-index: 16;*/ width: 4; color: brown; opacity: 1; opacity:0.3; casing-color: yellow; casing-width: 3; casing-opacity: 0.7; } way[boundary][setting("allow_health_level_4")][health_level=4]::health_level { set .health_level; /*z-index: 20;*/ width: 5; color: crimson; opacity: 1; casing-color: yellow; casing-width: 3; casing-opacity: 0.7; } /*------------------------------------------------------------------------ health boundaries pseudo-layer ::layer areas - ways ------------------------------------------------------------------------*/ area[boundary=health][!name]:closed::health_level { text-color:yellow; text: eval("name ?"); text-opacity: 1; font-opacity: 1; fill-opacity: 0.4; } area[boundary=health]:selected::health_level { casing-width: 6; casing-color:red; casing-opacity:0.8; } relation[boundary=health]:unclosed_multipolygon::health_level > way { linecap: round; text:""; casing-width:6; casing-dashes: 10,10; casing-color:yellow; casing-opacity:1; z-index: -3; symbol-stroke-width: 24; symbol-stroke-color: red; symbol-stroke-opacity: 0.8; symbol-shape: circle; symbol-size: 12; } area[boundary=health]:unclosed_multipolygon::health_level > node { text:""; casing-width:6; casing-dashes: 10,10; casing-color:yellow; casing-opacity:1; z-index: 100; symbol-stroke-width: 24; symbol-stroke-color: red; symbol-stroke-opacity: 0.8; symbol-fill-opacity: 1; symbol-shape: circle; symbol-size: 12; } /*------------------------------------------------------------------------ health boundaries pseudo-layer ::layer nodes ------------------------------------------------------------------------*/ area|z1-15[boundary=health]::health_layer > node, way|z1-15[boundary=health]::health_layer > node { symbol-size:0.01; symbol-shape: square; symbol-stroke-color: #00ffff; symbol-stroke-width: 0.01; symbol-fill-color: #00FFFF; symbol-fill-opacity:0; symbol-stroke-opacity: 0; } area|z16-[boundary=health]::health_layer > node, way|z16-[boundary=health]::health_layer > node { symbol-size:2; symbol-shape: square; symbol-stroke-color: navy; symbol-stroke-width: 2; symbol-stroke-opacity: 1; symbol-fill-color: #FFFFBB; symbol-fill-opacity:1; } /* connection nodes - closed areas */ area|z13-[boundary=health]::health_layer node:connection, way|z13-[boundary=health]::health_layer node:connection { symbol-size:10; symbol-shape: circle; symbol-stroke-color: #00ffff; symbol-stroke-width: 2; symbol-stroke-opacity: 1; symbol-fill-color: crimson; symbol-fill-opacity:1; opacity: 1; } /* connection nodes - unclosed areas */ area|z11-[boundary=health]::health_level >[index=1] node!:connection, area|z11-[boundary=health]::health_level >[index=-1] node!:connection, way|z11-[boundary=health]::health_level >[index=1] node!:connection, way|z11-[boundary=health]::health_level >[index=-1] node!:connection { symbol-fill-color: yellow; symbol-stroke-color: crimson; symbol-stroke-width: 2; symbol-shape: triangle; symbol-size: 24; symbol-stroke-opacity:1; symbol-fill-opacity:1; }