| 1 | | This style visualizes the surface=* and smoothness tags on highways. Currently it does the following: |
| 2 | | |
| 3 | | - show highways that neither have surface=* or smoothness=* as dotted black |
| 4 | | |
| 5 | | - with the smoothness tag render a |
| | 1 | This style visualizes the surface and smoothness tags on highways. Currently it does the following: |
| | 2 | |
| | 3 | - with neither surface or smoothness tag present |
| | 4 | - render a thin gray line of width 1.0 |
| | 5 | |
| | 6 | - with the smoothness tag present, render |
| | 7 | - ways with a width of 1.5 |
| 7 | | - then move from green (=good) to red (=impassable) for the rest of smoothness values and use dashed stiles as smoothness values |
| 8 | | - ways that have smoothness but lack surface are of width 1.5 |
| 9 | | |
| 10 | | - with the surface tag render |
| 11 | | - ways with a width of 3.0 |
| 12 | | - a noticable black casing for values paved|asphalt|concrete|concrete_pavers |
| 13 | | - for the rest render the value with text and text-color (light brown for dirt, ground, mud, light green for grass, etc..) |
| 14 | | - ways that have surface but not smoothness are rendered solid gray at width 3.0 |
| 15 | | |
| 16 | | - do not render text for the most common values (excellent, good, asphalt, paved) as they are easily identifyable by color code and would distract from the "problem zones" |
| | 9 | - green solid (=good) to red irregular dashed (=impassable), interpolate the rest of values |
| | 10 | - in zoom levels 14 and above, ways that have smoothness but lack surface are of width 1.5 |
| | 11 | |
| | 12 | - with the surface tag present, starting at zoom level 14, render |
| | 13 | - surface values with text and use light brown for dirt|ground, light green for grass, etc.. |
| | 14 | - ways with a width of 1.0 and the color of the text, if smoothness does not exist |
| | 15 | - ways with a width of 2.0-3.0 (zoom 13-15), if smoothness exists |
| | 16 | |
| | 17 | - with the smoothness and surface tags present, render |
| | 18 | - a noticable black casing if any combination of |
| | 19 | - surface=paved|asphalt|concrete|cobblestone |
| | 20 | - smoothness=excellent|good|intermediate |
| | 21 | - NO text of the attributes to not clutter the view |
| 176 | | way[highway][surface], |
| 177 | | way[highway][smoothness] |
| 178 | | { |
| 179 | | print-text: true; |
| 180 | | text-color: #B0E0EE; |
| 181 | | text-offset: 5; |
| 182 | | } |
| 183 | | |
| 184 | | way[highway][surface=grass] |
| 185 | | { |
| 186 | | text-color: #B0FFB0; |
| 187 | | } |
| 188 | | |
| 189 | | way[highway][surface=~/unpaved.*|dirt.*|earth.*|ground.*|mud.*/] |
| 190 | | { |
| 191 | | text-color: #FFB0B0; |
| 192 | | } |
| 193 | | |
| 194 | | way[highway][surface=~/.*gravel.*|pebble.*/] |
| 195 | | { |
| 196 | | text-color: #FFFFB0; |
| 197 | | } |
| 198 | | |
| 199 | | way[highway][surface=~/paved.*|asphalt.*|concrete.*|cobble.*/][smoothness=~/excellent|good|intermediate|bad/] |
| 200 | | { |
| 201 | | print-text: false; |
| 202 | | casing-width: +3; |
| 203 | | casing-color: black; |
| 204 | | casing-dashes: eval(prop(dashes)); |
| 205 | | } |
| 206 | | |
| 207 | | way[highway][smoothness=excellent], |
| 208 | | way[highway][smoothness=good] |
| 209 | | { |
| 210 | | print-text: false; |
| 211 | | } |
| 212 | | |
| 213 | | way[highway][smoothness][eval(prop(print-text))] |
| 214 | | { |
| 215 | | font-size: 10; |
| | 182 | |
| | 183 | way|z13-[highway][smoothness][surface] |
| | 184 | { |
| | 185 | width: 2.0; |
| | 186 | my-encasing: 1.0; |
| | 187 | } |
| | 188 | |
| | 189 | way|z14-[highway][smoothness][surface] |
| | 190 | { |
| | 191 | width: 2.5; |
| | 192 | my-encasing: 2.5; |
| | 193 | } |
| | 194 | |
| | 195 | way|z15-[highway][smoothness][surface] |
| | 196 | { |
| | 197 | width: 3.0; |
| | 198 | my-encasing: 3.0; |
| | 199 | } |
| | 200 | |
| | 201 | |
| | 202 | |
| | 203 | |
| | 204 | way|z14-[highway][smoothness] |
| | 205 | { |
| 222 | | way[highway][surface][eval(prop(print-text))] |
| 223 | | { |
| 224 | | font-size: 10; |
| 225 | | font-family: Arial; |
| 226 | | text: "surface"; |
| 227 | | text-position: line; |
| 228 | | z-index: 1.0; |
| 229 | | } |
| 230 | | |
| 231 | | |
| | 226 | way|z14-[highway][smoothness=~/excellent|good/] |
| | 227 | { |
| | 228 | text: none; |
| | 229 | } |
| | 230 | |
| | 231 | way|z14-[highway][surface=~/paved.*|asphalt.*|concrete.*|cobble.*/] |
| | 232 | { |
| | 233 | text-color: black; |
| | 234 | render-encasing: true; |
| | 235 | } |
| | 236 | |
| | 237 | way|z14-[highway][surface=~/.*gravel.*|pebble.*/] |
| | 238 | { |
| | 239 | text-color: #B0B060; |
| | 240 | } |
| | 241 | |
| | 242 | way|z14-[highway][surface=~/unpaved.*|dirt.*|earth.*|ground.*|mud.*/] |
| | 243 | { |
| | 244 | text-color: #FFB0B0; |
| | 245 | } |
| | 246 | |
| | 247 | way|z14-[highway][surface=sand] |
| | 248 | { |
| | 249 | text-color: #FFFFB0; |
| | 250 | } |
| | 251 | |
| | 252 | way|z14-[highway][surface=grass] |
| | 253 | { |
| | 254 | text-color: #B0FFB0; |
| | 255 | } |
| | 256 | |
| | 257 | way|z14-[highway][eval(prop(render-encasing))][smoothness=~/excellent|good|intermediate/] |
| | 258 | { |
| | 259 | casing-width: eval(prop(width) + prop(my-encasing)); |
| | 260 | casing-color: eval(prop(text-color)); |
| | 261 | casing-dashes: eval(prop(dashes)); |
| | 262 | } |
| | 263 | |
| | 264 | way|z14-[highway][surface][!smoothness] |
| | 265 | { |
| | 266 | color: eval(prop(text-color)); |
| | 267 | dashes: list(2,1); |
| | 268 | } |