wiki:Nb:Styles/HealthBoundary

Version 1 (modified by paleid, 6 months ago) ( diff )

--

Andre språk:

icon Helse Grenser

Beskrivelse

Stilen "Helse Grenser" hjelper til med å overvåke og redigere grensepolygoner. Ved å zoome ut er det enkelt å overvåke områder som allerede er dekket, med skjulte noder og tynne linjer. Redigering er forenklet med fremhevede tilkoblingsnoder, uåpnede polygoner, osv. Områdenavn er også fremhevet.

Stilinnstillinger

Det finnes 5 stilinnstillinger for å velge hvilke Helsenivåer som skal vises. En eller flere Helsenivåer kan velges samtidig. Du kan endre alternativene i Kartstil-dialogvinduet i sidepanelet til høyre. Hvis dialogvinduet ikke vises, kan du aktivere det i menyen Vinduer. I Kartstil-dialogvinduet, høyreklikk på Helse Grenser og pek deretter på Stilinnstillinger. Etter at du har endret en innstilling, oppdateres kartstilen automatisk.

meta {
  title: "Helse Grenser";
  version: "1.2_2025-04-10";
  description: "Farger Helse Grense Polygoner og noder. Den hjelper til med å overvåke og redigere Grenser. Parameteralternativer lar deg velge Helsenivåer som skal vises.";
  icon: "health_boundaries_icon.svg";
  author: "pierzen";
  link: "https://josm.openstreetmap.de/wiki/Styles/HealthBoundary";
}

canvas {
    fill-color: #ffffea;
        default-points: false;
        default-lines: false;
}

/* Innstillingsalternativer - Velg Territorielag (ja/nei) */

setting::allow_health_level_4 {
  type: boolean;
  label: tr("tillat health_level=4");
  default: false;
}
setting::allow_health_level_5 {
  type: boolean;
  label: tr("tillat health_level=5");
  default: true;
}
setting::allow_health_level_6 {
  type: boolean;
  label: tr("tillat health_level=6");
  default: false;
}
setting::allow_health_level_8 {
  type: boolean;
  label: tr("tillat health_level=8");
  default: true;
}
setting::allow_health_level_10 {
  type: boolean;
  label: tr("tillat health_level=10");
  default: false;
}

/*------------------------------------------------------------------------
 Først: minimaliser utseende for områder, veier og noder
 ------------------------------------------------------------------------*/

area {
        z-index: -1;
        fill-color: #FFFFAA; fill-opacity:0;
        text-color: #FFBBAA; opacity: 0; text-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;
}

/*------------------------------------------------------------------------
 definerer helse grenser pseudo-lag ::layer
 + forskjellige farger for hvert health_level 
 + sett health_way_selected
 ------------------------------------------------------------------------*/

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_area_selected;
   z-index: 11;
   fill-color:green; fill-opacity:0.2;
   font-size: 1;
   text-color: white;
   text: name;
   text-position: center;
   font-size:1;
   width:2;
   color:green;
   opacity: 1; text-opacity: 1;
  }  
area|z12-[health_level=10]::health_level {      font-size: 14; opacity: 1;} 

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_area_selected;
   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; text-opacity: 1;
 }  
area|z10-[health_layer=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_area_selected;
        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; text-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_area_selected;
   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; text-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_area_selected;
   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; text-opacity: 1;
}

/*------------------------------------------------------------------------
 veier - definerer helse grenser pseudo-lag ::layer
 + forskjellige farger for hvert health_level 
 + sett health_way_selected
 ------------------------------------------------------------------------*/

way[boundary][setting("allow_health_level_10")][health_level=10]::health_level {        
   set health_way_selected;
        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_way_selected;
        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_way_selected;
   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_way_selected;
        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_way_selected;
        width:  5;
        color: crimson;
        opacity: 1;
        casing-color: yellow;
        casing-width: 3;
        casing-opacity: 0.7;
}

/*------------------------------------------------------------------------
 noder - legg til helse grenser pseudo-lag ::layer
 + sett health_nodes_selected 
 ------------------------------------------------------------------------*/

area[boundary][setting("allow_health_level_10")][health_level=10] > node::health_level, 
area[boundary][setting("allow_health_level_8")][health_level=8] > node::health_level, 
area[boundary][setting("allow_health_level_6")][health_level=6] > node::health_level, 
area[boundary][setting("allow_health_level_5")][health_level=5] > node::health_level, 
area[boundary][setting("allow_health_level_4")][health_level=4] > node::health_level {  
   set health_nodes_selected;
  }  

/*------------------------------------------------------------------------
 helse grenser pseudo-lag ::layer
 områder - veier   ------------------------------------------------------------------------*/
        
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;
}       


area|z12-[boundary=health]:unclosed_multipolygon::health_level
{
  text: name;
  text-halo-radius: 10;
  text-halo-color: yellow;
  text-halo-opacity: 0.3;
  font-size: 14;
  text-opacity: 1;
        }

area[boundary=health]:unclosed_multipolygon::health_level > way 
{
  text:"";
  casing-width:6;
  casing-dashes: 10,10;
  casing-color:yellow;
  casing-opacity:1;  
        }
        
/*------------------------------------------------------------------------
 helse grenser 
 fargelegg
 ------------------------------------------------------------------------*/

area::health_layer > node|z1-13 {
        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;
}

node|z14-[(parent_tag(health_level))]::health_level
{
        symbol-size:4;
        symbol-shape: square;
        symbol-stroke-color: #00ffff;
        symbol-stroke-width: 1;
        symbol-fill-color: #FFAAFF;
        symbol-fill-opacity:0.8;
        symbol-stroke-opacity: 0.8;
}


node|z12-[(parent_tag(health_level))]:connection::health_level {
        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;
}

/* tilkoblingsnoder - uåpnede områder */

area|z11-!:closed[boundary=health]::health_level >[index=1] node!:connection,
area|z11-!:closed[boundary=health]::health_level >[index=-1] node!:connection 
{ 
        symbol-fill-color: yellow;
        symbol-stroke-color: crimson;
        symbol-stroke-width: 4;
        symbol-shape: triangle;
        symbol-size: 30;
        symbol-stroke-opacity:1; 
        symbol-fill-opacity:1;
}

Nb:Styles_HealthBoundary-style.mapcss, Nb:Styles_HealthBoundary.zip

Note: See TracWiki for help on using the wiki.