13 | | {{{ |
14 | | #!style type="mapcss" |
15 | | |
16 | | meta { |
17 | | title: "Admin Boundaries"; |
18 | | version: "1.[[revision]]_[[date]]"; |
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 | | } |
23 | | |
24 | | /* Setting Options - Select Territory layers (boolean value yes/no) */ |
25 | | setting::admin_level_1 { |
26 | | type: boolean; |
27 | | label: tr("Admin_level=1"); |
28 | | default: false; |
29 | | } |
30 | | setting::admin_level_2 { |
31 | | type: boolean; |
32 | | label: tr("Admin_level=2"); |
33 | | default: false; |
34 | | } |
35 | | setting::admin_level_3 { |
36 | | type: boolean; |
37 | | label: tr("Admin_level=3"); |
38 | | default: false; |
39 | | } |
40 | | setting::admin_level_4 { |
41 | | type: boolean; |
42 | | label: tr("Admin_level=4"); |
43 | | default: false; |
44 | | } |
45 | | setting::admin_level_5 { |
46 | | type: boolean; |
47 | | label: tr("Admin_level=5"); |
48 | | default: true; |
49 | | } |
50 | | setting::admin_level_6 { |
51 | | type: boolean; |
52 | | label: tr("Admin_level=6"); |
53 | | default: false; |
54 | | } |
55 | | setting::admin_level_7 { |
56 | | type: boolean; |
57 | | label: tr("Admin_level=7"); |
58 | | default: false; |
59 | | } |
60 | | setting::admin_level_8 { |
61 | | type: boolean; |
62 | | label: tr("Admin_level=8"); |
63 | | default: true; |
64 | | } |
65 | | setting::admin_level_9 { |
66 | | type: boolean; |
67 | | label: tr("Admin_level=9"); |
68 | | default: false; |
69 | | } |
70 | | setting::admin_level_10 { |
71 | | type: boolean; |
72 | | label: tr("Admin_level=10"); |
73 | | default: false; |
74 | | } |
75 | | setting::protected_area { |
76 | | type: boolean; |
77 | | label: tr("Protected_area, National_park & Regional_park"); |
78 | | default: true; |
79 | | } |
80 | | |
81 | | /* Pseudo Classes + distinct colors by territory */ |
82 | | |
83 | | area[boundary][setting("protected_area")][boundary=~/(protected_area|national_park|regional_park)/] |
84 | | {set t_protected; |
85 | | width: 4; |
86 | | fill-color:forestgreen; fill-extent:10; font-size:10; |
87 | | color:forestgreen; |
88 | | casing-width:0; |
89 | | } |
90 | | area[boundary][setting("admin_level_10")][admin_level=10] |
91 | | { set t_10; |
92 | | object-z-index: 11; |
93 | | fill-color:blue; fill-opacity:0.2; |
94 | | font-size: 9; |
95 | | text-color: #1DCFFF; |
96 | | text: name; |
97 | | text-position: center; |
98 | | color:#1DCFFF; |
99 | | casing-width:9; casing-color: #1DCFFF; |
100 | | } |
101 | | area[boundary][setting("admin_level_9")][admin_level=9] |
102 | | {set t_9; |
103 | | object-z-index: 12; |
104 | | fill-color:cyan; fill-opacity:0.2; |
105 | | font-size: 10; |
106 | | text-color: #FFD798; |
107 | | text: name; |
108 | | text-position: center; |
109 | | color:cyan; |
110 | | casing-width:9; casing-color: #FFD798; |
111 | | } |
112 | | area[setting("admin_level_8")][boundary][admin_level=8] |
113 | | {set t_8; |
114 | | object-z-index: 13; |
115 | | fill-color:green; fill-opacity:0.2; |
116 | | font-size: 10; |
117 | | text-color: green; |
118 | | text: name; |
119 | | text-position: center; |
120 | | width:2; |
121 | | color:red; |
122 | | casing-width:0; |
123 | | } |
124 | | area|z11-.t_8 |
125 | | { |
126 | | font-size: 16; |
127 | | } |
128 | | area[boundary][setting("admin_level_7")][admin_level=7] |
129 | | {set t_7; |
130 | | object-z-index: 14; |
131 | | fill-color:blue; fill-opacity:0.3; |
132 | | font-size: 12; |
133 | | text-color: red; |
134 | | text: name; |
135 | | text-position: center; |
136 | | color:red; |
137 | | casing-width:9; casing-color: red; |
138 | | } |
139 | | area[boundary][setting("admin_level_6")][admin_level=6] |
140 | | {set t_6; |
141 | | object-z-index: 15; |
142 | | fill-color:blue; fill-opacity:0.3; |
143 | | font-size: 14; |
144 | | text-color: blue; |
145 | | text: name; |
146 | | text-position: center; |
147 | | width: 3; |
148 | | color:blue; |
149 | | casing-width:1; casing-color: blue; |
150 | | } |
151 | | area[boundary][setting("admin_level_5")][admin_level=5] |
152 | | {set t_5; |
153 | | object-z-index: 16; |
154 | | fill-color:#FFCC00; fill-opacity:0.2; |
155 | | font-size: 18; |
156 | | text-color: brown; |
157 | | text: name; |
158 | | text-position: center; |
159 | | width: 3; |
160 | | color: #FFCC00; |
161 | | casing-width:3; casing-color: orange; |
162 | | } |
163 | | area[boundary][setting("admin_level_4")][admin_level=4] |
164 | | {set t_4; |
165 | | object-z-index: 20; |
166 | | fill-color:crimson; fill-opacity:0.2; |
167 | | font-size: 16; |
168 | | text-color: crimson; |
169 | | text: name; |
170 | | text-position: center; |
171 | | width: 3; |
172 | | color: crimson; |
173 | | casing-width:3; casing-color: crimson; |
174 | | } |
175 | | area[boundary][setting("admin_level_3")][admin_level=3] |
176 | | {set t_3; |
177 | | object-z-index: 20; |
178 | | fill-color:crimson; fill-opacity:0.2; |
179 | | font-size: 16; |
180 | | text-color: #E100FF; |
181 | | text: name; |
182 | | text-position: center; |
183 | | width: 3; |
184 | | color: crimson; |
185 | | casing-width:3; casing-color: #E100FF; |
186 | | } |
187 | | area[boundary][setting("admin_level_2")][admin_level=2] |
188 | | {set t_2; |
189 | | object-z-index: 20; |
190 | | fill-color:crimson; fill-opacity:0.2; |
191 | | font-size: 16; |
192 | | text-color: #FFC6E2; |
193 | | text: name; |
194 | | text-position: center; |
195 | | width: 3; |
196 | | color: crimson; |
197 | | casing-width:3; casing-color: #FFC6E2; |
198 | | } |
199 | | area[boundary][setting("admin_level_1")][admin_level=1] |
200 | | {set t_1; |
201 | | object-z-index: 20; |
202 | | fill-color:crimson; fill-opacity:0.2; |
203 | | font-size: 16; |
204 | | text-color: #A2DAFF; |
205 | | text: name; |
206 | | text-position: center; |
207 | | width: 3; |
208 | | color: crimson; |
209 | | casing-width:3; casing-color: #A2DAFF; |
210 | | } |
211 | | canvas { |
212 | | fill-color: #ffffea; |
213 | | } |
214 | | |
215 | | /* all Nodes - low zoom */ |
216 | | |
217 | | node|z1-8 { |
218 | | symbol-shape: square; symbol-size: 0; symbol-stroke-width:0.1 ; |
219 | | } |
220 | | |
221 | | /* Untagged nodes - ways child nodes - same color */ |
222 | | area.t_protected > node!:tagged { |
223 | | symbol-stroke-color: green; |
224 | | symbol-fill-color: white; |
225 | | } |
226 | | area.t_10 > node!:tagged { |
227 | | symbol-stroke-color: blue; |
228 | | symbol-fill-color: white; |
229 | | } |
230 | | area.t_9 > node!:tagged { |
231 | | symbol-stroke-color: cyan; |
232 | | symbol-fill-color: white; |
233 | | } |
234 | | area.t_8 > node!:tagged { |
235 | | symbol-stroke-color: red; |
236 | | symbol-fill-color: white; |
237 | | } |
238 | | area.t_7 > node!:tagged { |
239 | | symbol-stroke-color: red; |
240 | | symbol-fill-color: white; |
241 | | } |
242 | | area.t_6 > node!:tagged { |
243 | | symbol-stroke-color: blue; |
244 | | symbol-fill-color: white; |
245 | | } |
246 | | area.t_5 > node!:tagged { |
247 | | symbol-stroke-color: #FFCC00; |
248 | | symbol-fill-color: white; |
249 | | } |
250 | | area.t_4 > node!:tagged { |
251 | | symbol-stroke-color: rose; |
252 | | symbol-fill-color: white; |
253 | | } |
254 | | |
255 | | way|z1-8 > node { |
256 | | symbol-shape: square; symbol-size: 0.1; symbol-stroke-width:0.1 ; |
257 | | } |
258 | | way|z9- > node!:tagged { |
259 | | symbol-shape: square; |
260 | | symbol-stroke-color: gray; |
261 | | symbol-fill-color: white; |
262 | | symbol-stroke-width: 2; |
263 | | symbol-stroke-opacity:0.8; |
264 | | } |
265 | | way > node|z9-11!:tagged { |
266 | | symbol-size: 0.02; |
267 | | } |
268 | | way > node|z12-13!:tagged { |
269 | | symbol-size: 1.8; |
270 | | } |
271 | | way > node|z14-!:tagged { |
272 | | symbol-size: 7; |
273 | | } |
274 | | |
275 | | /* Place nodes */ |
276 | | node|z9-11[place] { symbol-shape:pentagon; symbol-size: 9; |
277 | | symbol-fill-color:white; symbol-stroke-width:3; symbol-stroke-color:gray; |
278 | | } |
279 | | node|z12-[place] { symbol-shape:pentagon; symbol-size: 14; |
280 | | symbol-fill-color:white; symbol-stroke-width:3; symbol-stroke-color:black; |
281 | | } |
282 | | |
283 | | |
284 | | /* Single unclosed ways end nodes */ |
285 | | way!:closed >[index=1] node!:connection, |
286 | | way!:closed >[index=-1] node!:connection { |
287 | | symbol-fill-color: yellow; |
288 | | symbol-stroke-color: red; |
289 | | symbol-stroke-width: 3; |
290 | | symbol-size: 14; |
291 | | } |
292 | | |
293 | | relation[boundary]:unclosed_multipolygon > way |
294 | | { |
295 | | casing-width:6; |
296 | | casing-dashes: 10,10; |
297 | | casing-color:yellow; |
298 | | casing-opacity:1; |
299 | | z-index: -3; |
300 | | symbol-stroke-width: 24; |
301 | | symbol-stroke-color: red; |
302 | | symbol-stroke-opacity: 0.8; |
303 | | symbol-shape: circle; |
304 | | symbol-size: 12; |
305 | | } |
306 | | |
307 | | relation[boundary=administrative][!name]:closed |
308 | | { |
309 | | casing-width:5; |
310 | | casing-color:red; |
311 | | casing-opacity:1; |
312 | | z-index: -3; |
313 | | symbol-stroke-width: 24; |
314 | | symbol-stroke-color: purple; |
315 | | symbol-stroke-opacity: 0.8; |
316 | | symbol-shape: circle; |
317 | | symbol-size: 12; |
318 | | } |
319 | | way:selected |
320 | | { |
321 | | casing-width: 6; casing-color:red; casing-opacity:0.8; |
322 | | } |
323 | | |
324 | | relation[boundary]:selected |
325 | | { |
326 | | fill-opacity:0.3; |
327 | | fill-color:red; |
328 | | text-color: red; |
329 | | } |
330 | | |
331 | | relation[boundary]:selected > way |
332 | | { |
333 | | casing-width:+6; |
334 | | casing-color:red; |
335 | | } |
336 | | |
337 | | |
338 | | /* Connection nodes */ |
339 | | |
340 | | node|z11-:connection { |
341 | | symbol-size:12; |
342 | | symbol-shape: circle; |
343 | | symbol-stroke-color: #00ffff; |
344 | | symbol-stroke-width: 1; |
345 | | symbol-fill-color: crimson; |
346 | | } |
347 | | |
348 | | /* node selected */ |
349 | | |
350 | | node|z10-:selected |
351 | | { |
352 | | symbol-size:14; |
353 | | symbol-stroke-width:3; |
354 | | symbol-stroke-color: crimson; |
355 | | symbol-fill-color: yellow; |
356 | | } |
357 | | |
358 | | node|z11-:connection:selected { |
359 | | symbol-stroke-color: crimson; |
360 | | symbol-stroke-width: 5; |
361 | | symbol-fill-color: yellow; |
362 | | } |
363 | | /* Tagged nodes */ |
364 | | |
365 | | node|z9-12[!place]:tagged!:connection { |
366 | | symbol-shape: triangle; symbol-size: 4; |
367 | | symbol-stroke-color: cyan; |
368 | | text-color:yellow; |
369 | | } |
370 | | node|z13-[!place]:tagged!:connection { |
371 | | symbol-shape: triangle; symbol-size: 14; |
372 | | symbol-stroke-color: cyan; |
373 | | symbol-fill-color: blue; |
374 | | text-color:yellow; |
375 | | } |
376 | | |
377 | | |
378 | | }}} |
| 13 | [[wiki:Styles/Admin_Boundaries]] |