| 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 | |
| | 46 | area { |
| | 47 | z-index: -1; |
| | 48 | linecap: none; |
| | 49 | width: 0; fill-opacity: 0; |
| | 50 | text-opacity:0; |
| | 51 | color: #FFFFAA; casing-opacity:0; |
| | 52 | } |
| | 53 | way { |
| | 54 | z-index: -1; |
| | 55 | width: 0.1; casing-width:0; casing-opacity: 0; |
| | 56 | color: #FFFFAA; opacity:0; |
| | 57 | } |
| | 58 | node { |
| | 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 | |
| | 70 | area[boundary][setting("allow_health_level_10")][health_level=10]::health_level, |
| | 71 | area[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 | } |
| | 83 | area|z12-[health_level_10]::health_level { font-size: 14;} |
| | 84 | |
| | 85 | area[boundary][setting("allow_health_level_8")][health_level=8]::health_level, |
| | 86 | area[boundary][setting("allow_health_level_8")][health_level=8] > way::health_level |
| | 87 | {set .health_level; |
| | 88 | z-index: 13; |
| 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 | } |
| | 98 | area|z10-.health_level[8]::health_level { font-size: 14;} |
| | 99 | |
| | 100 | area[boundary][setting("allow_health_level_6")][health_level=6]::health_level, |
| | 101 | area[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; |
| | 122 | width: 4; |
| | 123 | color: brown; |
| | 124 | opacity:1; |
| | 125 | } |
| | 126 | |
| | 127 | area[boundary][setting("allow_health_level_4")][health_level=4]::health_level, |
| | 128 | area[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 | |
| | 146 | way[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 | |
| | 157 | way[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 | |
| | 169 | way[boundary][setting("allow_health_level_6")][health_level=6]::health_level |
| | 170 | {set .health_level; |
| | 171 | /*z-index: 15;*/ |
| | 172 | text-position: center; |
| 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 | |
| | 194 | way[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 ------------------------------------------------------------------------*/ |
| 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 | |
| | 260 | area|z1-15[boundary=health]::health_layer > node, |
| | 261 | way|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 | |
| | 271 | area|z16-[boundary=health]::health_layer > node, |
| | 272 | way|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 | |
| | 284 | area|z13-[boundary=health]::health_layer node:connection, |
| | 285 | way|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 | |
| | 298 | area|z11-[boundary=health]::health_level >[index=1] node!:connection, |
| | 299 | area|z11-[boundary=health]::health_level >[index=-1] node!:connection, |
| | 300 | way|z11-[boundary=health]::health_level >[index=1] node!:connection, |
| | 301 | way|z11-[boundary=health]::health_level >[index=-1] node!:connection { |
| | 302 | symbol-fill-color: yellow; |
| 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 | } |