| | 1 | [[TranslatedPages]] |
| | 2 | |
| | 3 | = [[Image(admin_boundaries_icon.svg,36,middle,inline)]] Admin Boundaries = |
| | 4 | [[PageOutline(2-9)]] |
| | 5 | |
| | 6 | == Description == |
| | 7 | |
| | 8 | The Admin Boundaries style colors the boundary polygons and nodes. One or more Admin level can be selected simultaneously. Zooming out, nodes are shrinked to see rapidly areas already covered. Editing is easier with highlighting connection nodes and places. Area names are also highlighted. |
| | 9 | |
| | 10 | === Style setting === |
| | 11 | There are '''8 style settings''' to Select which Admin layers to display. You can change the options in the [wiki:Help/Dialog/MapPaint/StyleSettings Map Paint Styles dialog] in the sidebar on the right side. If the dialog is not displayed you can activate it in the menu ''Windows''. In the ''Map Paint Styles'' dialog right click on ''Admin Boundaries'' and then point on ''Style Settings''. After you changed a setting the mappaint style updates automatically. |
| | 12 | |
| | 13 | {{{ |
| | 14 | #!style type="mapcss" |
| | 15 | |
| | 16 | meta { |
| | 17 | title: "Admin Boundaries"; |
| | 18 | version: "1.0_2018-04-07"; |
| | 19 | description: "Colors Admin Boundary Polygons and nodes. It Helps monitor and edit Boundaries. Parameter options let select Admin levels to show."; |
| | 20 | icon: "admin_boundaries_icon.svg"; |
| | 21 | author: "pierzen"; |
| | 22 | watch-modified: true; |
| | 23 | } |
| | 24 | |
| | 25 | /* Setting Options - Select Territory layers (boolean value yes/no) */ |
| | 26 | |
| | 27 | setting::admin_level_4 { |
| | 28 | type: boolean; |
| | 29 | label: tr("Admin_level=4"); |
| | 30 | default: false; |
| | 31 | } |
| | 32 | setting::admin_level_5 { |
| | 33 | type: boolean; |
| | 34 | label: tr("Admin_level=5"); |
| | 35 | default: true; |
| | 36 | } |
| | 37 | setting::admin_level_6 { |
| | 38 | type: boolean; |
| | 39 | label: tr("Admin_level=6"); |
| | 40 | default: false; |
| | 41 | } |
| | 42 | setting::admin_level_7 { |
| | 43 | type: boolean; |
| | 44 | label: tr("Admin_level=7"); |
| | 45 | default: false; |
| | 46 | } |
| | 47 | setting::admin_level_8 { |
| | 48 | type: boolean; |
| | 49 | label: tr("Admin_level=8"); |
| | 50 | default: true; |
| | 51 | } |
| | 52 | setting::admin_level_9 { |
| | 53 | type: boolean; |
| | 54 | label: tr("Admin_level=9"); |
| | 55 | default: false; |
| | 56 | } |
| | 57 | setting::admin_level_10 { |
| | 58 | type: boolean; |
| | 59 | label: tr("Admin_level=10"); |
| | 60 | default: false; |
| | 61 | } |
| | 62 | setting::protected_area { |
| | 63 | type: boolean; |
| | 64 | label: tr("Protected_area & National_park"); |
| | 65 | default: true; |
| | 66 | } |
| | 67 | |
| | 68 | /* Pseudo Classes + distinct colors by territory */ |
| | 69 | |
| | 70 | area[boundary][setting("protected_area")][boundary=~/(protected_area|national_park)/] |
| | 71 | {set t_protected; |
| | 72 | width: 4; |
| | 73 | fill-color:forestgreen; fill-extent:10; font-size:10; |
| | 74 | color:forestgreen; |
| | 75 | casing-width:0; |
| | 76 | } |
| | 77 | area[boundary][setting("admin_level_10")][admin_level=10] |
| | 78 | { set t_10; |
| | 79 | object-z-index: 11; |
| | 80 | fill-color:blue; fill-opacity:0.2; |
| | 81 | font-size: 9; |
| | 82 | text-color: blue; |
| | 83 | text: name; |
| | 84 | text-position: center; |
| | 85 | color:blue; |
| | 86 | casing-width:9; casing-color: blue; |
| | 87 | } |
| | 88 | area[boundary][setting("admin_level_9")][admin_level=9] |
| | 89 | {set t_9; |
| | 90 | object-z-index: 12; |
| | 91 | fill-color:cyan; fill-opacity:0.2; |
| | 92 | font-size: 10; |
| | 93 | text-color: cyan; |
| | 94 | text: name; |
| | 95 | text-position: center; |
| | 96 | color:cyan; |
| | 97 | casing-width:9; casing-color: cyan; |
| | 98 | } |
| | 99 | area[setting("admin_level_8")][boundary][admin_level=8] |
| | 100 | {set t_8; |
| | 101 | object-z-index: 13; |
| | 102 | fill-color:green; fill-opacity:0.2; |
| | 103 | font-size: 10; |
| | 104 | text-color: green; |
| | 105 | text: name; |
| | 106 | text-position: center; |
| | 107 | width:2; |
| | 108 | color:red; |
| | 109 | casing-width:0; |
| | 110 | } |
| | 111 | area|z11-.t_8 |
| | 112 | { |
| | 113 | font-size: 16; |
| | 114 | } |
| | 115 | area[boundary][setting("admin_level_7")][admin_level=7] |
| | 116 | {set t_7; |
| | 117 | object-z-index: 14; |
| | 118 | fill-color:blue; fill-opacity:0.3; |
| | 119 | font-size: 12; |
| | 120 | text-color: red; |
| | 121 | text: name; |
| | 122 | text-position: center; |
| | 123 | color:red; |
| | 124 | casing-width:9; casing-color: red; |
| | 125 | } |
| | 126 | area[boundary][setting("admin_level_6")][admin_level=6] |
| | 127 | {set t_6; |
| | 128 | object-z-index: 15; |
| | 129 | fill-color:blue; fill-opacity:0.3; |
| | 130 | font-size: 14; |
| | 131 | text-color: blue; |
| | 132 | text: name; |
| | 133 | text-position: center; |
| | 134 | width: 3; |
| | 135 | color:blue; |
| | 136 | casing-width:1; casing-color: blue; |
| | 137 | } |
| | 138 | area[boundary][setting("admin_level_5")][admin_level=5] |
| | 139 | {set t_5; |
| | 140 | object-z-index: 16; |
| | 141 | fill-color:#FFCC00; fill-opacity:0.2; |
| | 142 | font-size: 18; |
| | 143 | text-color: brown; |
| | 144 | text: name; |
| | 145 | text-position: center; |
| | 146 | width: 3; |
| | 147 | color: #FFCC00; |
| | 148 | casing-width:3; casing-color: orange; |
| | 149 | } |
| | 150 | area[boundary][setting("admin_level_4")][admin_level=4] |
| | 151 | {set t_4; |
| | 152 | object-z-index: 20; |
| | 153 | fill-color:crimson; fill-opacity:0.2; |
| | 154 | font-size: 16; |
| | 155 | text-color: crimson; |
| | 156 | text: name; |
| | 157 | text-position: center; |
| | 158 | width: 3; |
| | 159 | color: crimson; |
| | 160 | casing-width:3; casing-color: crimson; |
| | 161 | } |
| | 162 | |
| | 163 | canvas { |
| | 164 | fill-color: #ffffea; |
| | 165 | } |
| | 166 | |
| | 167 | /* all Nodes - low zoom */ |
| | 168 | |
| | 169 | node|z1-8 { |
| | 170 | symbol-shape: square; symbol-size: 0; symbol-stroke-width:0.1 ; |
| | 171 | } |
| | 172 | |
| | 173 | /* Untagged nodes - ways child nodes - same color */ |
| | 174 | area.t_protected > node!:tagged { |
| | 175 | symbol-stroke-color: green; |
| | 176 | symbol-fill-color: white; |
| | 177 | } |
| | 178 | area.t_10 > node!:tagged { |
| | 179 | symbol-stroke-color: blue; |
| | 180 | symbol-fill-color: white; |
| | 181 | } |
| | 182 | area.t_9 > node!:tagged { |
| | 183 | symbol-stroke-color: cyan; |
| | 184 | symbol-fill-color: white; |
| | 185 | } |
| | 186 | area.t_8 > node!:tagged { |
| | 187 | symbol-stroke-color: red; |
| | 188 | symbol-fill-color: white; |
| | 189 | } |
| | 190 | area.t_7 > node!:tagged { |
| | 191 | symbol-stroke-color: red; |
| | 192 | symbol-fill-color: white; |
| | 193 | } |
| | 194 | area.t_6 > node!:tagged { |
| | 195 | symbol-stroke-color: blue; |
| | 196 | symbol-fill-color: white; |
| | 197 | } |
| | 198 | area.t_5 > node!:tagged { |
| | 199 | symbol-stroke-color: #FFCC00; |
| | 200 | symbol-fill-color: white; |
| | 201 | } |
| | 202 | area.t_4 > node!:tagged { |
| | 203 | symbol-stroke-color: rose; |
| | 204 | symbol-fill-color: white; |
| | 205 | } |
| | 206 | |
| | 207 | way|z1-8 > node { |
| | 208 | symbol-shape: square; symbol-size: 0.1; symbol-stroke-width:0.1 ; |
| | 209 | } |
| | 210 | way|z9- > node!:tagged { |
| | 211 | symbol-shape: square; |
| | 212 | symbol-stroke-color: gray; |
| | 213 | symbol-fill-color: white; |
| | 214 | symbol-stroke-width: 2; |
| | 215 | symbol-stroke-opacity:0.8; |
| | 216 | } |
| | 217 | way > node|z9-11!:tagged { |
| | 218 | symbol-size: 0.02; |
| | 219 | } |
| | 220 | way > node|z12-13!:tagged { |
| | 221 | symbol-size: 1.8; |
| | 222 | } |
| | 223 | way > node|z14-!:tagged { |
| | 224 | symbol-size: 7; |
| | 225 | } |
| | 226 | |
| | 227 | /* Place nodes */ |
| | 228 | node|z9-11[place] { symbol-shape:pentagon; symbol-size: 9; |
| | 229 | symbol-fill-color:white; symbol-stroke-width:3; symbol-stroke-color:gray; |
| | 230 | } |
| | 231 | node|z12-[place] { symbol-shape:pentagon; symbol-size: 14; |
| | 232 | symbol-fill-color:white; symbol-stroke-width:3; symbol-stroke-color:black; |
| | 233 | } |
| | 234 | |
| | 235 | |
| | 236 | /* Single unclosed ways end nodes */ |
| | 237 | way!:closed >[index=1] node!:connection, |
| | 238 | way!:closed >[index=-1] node!:connection { |
| | 239 | symbol-fill-color: yellow; |
| | 240 | symbol-stroke-color: red; |
| | 241 | symbol-stroke-width: 3; |
| | 242 | symbol-size: 14; |
| | 243 | } |
| | 244 | |
| | 245 | relation[boundary]:unclosed_multipolygon > way |
| | 246 | { |
| | 247 | casing-width:6; |
| | 248 | casing-dashes: 10,10; |
| | 249 | casing-color:yellow; |
| | 250 | casing-opacity:1; |
| | 251 | z-index: -3; |
| | 252 | symbol-stroke-width: 24; |
| | 253 | symbol-stroke-color: red; |
| | 254 | symbol-stroke-opacity: 0.8; |
| | 255 | symbol-shape: circle; |
| | 256 | symbol-size: 12; |
| | 257 | } |
| | 258 | |
| | 259 | relation[boundary=administrative][!name]:closed |
| | 260 | { |
| | 261 | casing-width:5; |
| | 262 | casing-color:red; |
| | 263 | casing-opacity:1; |
| | 264 | z-index: -3; |
| | 265 | symbol-stroke-width: 24; |
| | 266 | symbol-stroke-color: purple; |
| | 267 | symbol-stroke-opacity: 0.8; |
| | 268 | symbol-shape: circle; |
| | 269 | symbol-size: 12; |
| | 270 | } |
| | 271 | way:selected |
| | 272 | { |
| | 273 | casing-width: 6; casing-color:red; casing-opacity:0.8; |
| | 274 | } |
| | 275 | |
| | 276 | relation[boundary]:selected |
| | 277 | { |
| | 278 | fill-opacity:0.3; |
| | 279 | fill-color:red; |
| | 280 | text-color: red; |
| | 281 | } |
| | 282 | |
| | 283 | relation[boundary]:selected > way |
| | 284 | { |
| | 285 | casing-width:+6; |
| | 286 | casing-color:red; |
| | 287 | } |
| | 288 | |
| | 289 | |
| | 290 | /* Connection nodes */ |
| | 291 | |
| | 292 | node|z11-:connection { |
| | 293 | symbol-size:12; |
| | 294 | symbol-shape: circle; |
| | 295 | symbol-stroke-color: #00ffff; |
| | 296 | symbol-stroke-width: 1; |
| | 297 | symbol-fill-color: crimson; |
| | 298 | } |
| | 299 | |
| | 300 | /* node selected */ |
| | 301 | |
| | 302 | node|z10-:selected |
| | 303 | { |
| | 304 | symbol-size:14; |
| | 305 | symbol-stroke-width:3; |
| | 306 | symbol-stroke-color: crimson; |
| | 307 | symbol-fill-color: yellow; |
| | 308 | } |
| | 309 | |
| | 310 | node|z11-:connection:selected { |
| | 311 | symbol-stroke-color: crimson; |
| | 312 | symbol-stroke-width: 5; |
| | 313 | symbol-fill-color: yellow; |
| | 314 | } |
| | 315 | /* Tagged nodes */ |
| | 316 | |
| | 317 | node|z9-12[!place]:tagged!:connection { |
| | 318 | symbol-shape: triangle; symbol-size: 4; |
| | 319 | symbol-stroke-color: cyan; |
| | 320 | text-color:yellow; |
| | 321 | } |
| | 322 | node|z13-[!place]:tagged!:connection { |
| | 323 | symbol-shape: triangle; symbol-size: 14; |
| | 324 | symbol-stroke-color: cyan; |
| | 325 | symbol-fill-color: blue; |
| | 326 | text-color:yellow; |
| | 327 | } |
| | 328 | |
| | 329 | |
| | 330 | }}} |