| | 1 | [[TranslatedPages(revision=7)]] |
| | 2 | |
| | 3 | = Ποδηλατόδρομοι = |
| | 4 | Επισήμανση ποδηλατόδρομων |
| | 5 | |
| | 6 | |
| | 7 | == Κώδικας == |
| | 8 | {{{ |
| | 9 | #!style type="mapcss" |
| | 10 | |
| | 11 | |
| | 12 | meta |
| | 13 | { |
| | 14 | title: "Cycleways"; |
| | 15 | description: "Standalone style to visualize cycleway=* and bicycle=* of objects, fade everything else. Please turn off JOSM internal style to use it."; |
| | 16 | version: "1.[[revision]]_[[date]]"; |
| | 17 | author: "cmuelle8"; |
| | 18 | link: "https://josm.openstreetmap.de/wiki/Styles/Cycleways"; |
| | 19 | min-josm-version: "5198"; |
| | 20 | } |
| | 21 | |
| | 22 | meta[lang=de] |
| | 23 | { |
| | 24 | title: "Radwege und -spuren"; |
| | 25 | description: "Eigenständiger Stil, der Radwege und -spuren, sowie bicycle=official|designated|yes|no hervorhebt - bitte JOSM-Stil deaktivieren."; |
| | 26 | } |
| | 27 | |
| | 28 | |
| | 29 | |
| | 30 | /* basic geometry */ |
| | 31 | canvas |
| | 32 | { |
| | 33 | fill-color: #606060; |
| | 34 | } |
| | 35 | node |
| | 36 | { |
| | 37 | symbol-shape: square; |
| | 38 | symbol-size: 2; |
| | 39 | symbol-stroke-color: lightgrey; |
| | 40 | symbol-stroke-opacity: 0.1; |
| | 41 | } |
| | 42 | node:connection |
| | 43 | { |
| | 44 | symbol-shape: square; |
| | 45 | symbol-size: 2; |
| | 46 | symbol-stroke-color: white; |
| | 47 | symbol-stroke-opacity: 0.2; |
| | 48 | } |
| | 49 | way |
| | 50 | { |
| | 51 | color: white; |
| | 52 | width: 0.5; |
| | 53 | opacity: 0.1; |
| | 54 | } |
| | 55 | |
| | 56 | |
| | 57 | |
| | 58 | /* faded area styles for orientation */ |
| | 59 | relation[landuse], |
| | 60 | way[landuse]:closed |
| | 61 | { |
| | 62 | fill-color: yellow; |
| | 63 | fill-opacity: 0.02; |
| | 64 | z-index: -0.9; |
| | 65 | } |
| | 66 | relation[natural], |
| | 67 | relation[landuse=forest], |
| | 68 | way[natural]:closed, |
| | 69 | way[landuse=forest]:closed |
| | 70 | { |
| | 71 | fill-color: green; |
| | 72 | fill-opacity: 0.02; |
| | 73 | z-index: -0.9; |
| | 74 | } |
| | 75 | relation[waterway], |
| | 76 | relation[landuse=basin], |
| | 77 | relation[natural=~/water/], |
| | 78 | way[waterway]:closed, |
| | 79 | way[landuse=basin]:closed, |
| | 80 | way[natural=~/water/]:closed |
| | 81 | { |
| | 82 | fill-color: blue; |
| | 83 | fill-opacity: 0.08; |
| | 84 | z-index: -0.9; |
| | 85 | } |
| | 86 | relation[building], |
| | 87 | way[building]:closed |
| | 88 | { |
| | 89 | width: 2; |
| | 90 | color: magenta; |
| | 91 | opacity: 0.1; |
| | 92 | fill-color: magenta; |
| | 93 | fill-opacity: 0.02; |
| | 94 | z-index: 0.2; |
| | 95 | } |
| | 96 | relation[highway][area?], |
| | 97 | way[highway][area?]:closed |
| | 98 | { |
| | 99 | width: 2; |
| | 100 | color: orange; |
| | 101 | opacity: 0.5; |
| | 102 | fill-color: orange; |
| | 103 | fill-opacity: 0.2; |
| | 104 | z-index: -0.5; |
| | 105 | } |
| | 106 | |
| | 107 | |
| | 108 | |
| | 109 | /* highway=* tag styles */ |
| | 110 | way[highway] |
| | 111 | { |
| | 112 | color: darkgrey; |
| | 113 | opacity: 1.0; |
| | 114 | |
| | 115 | cycleway-weakinfo-color: #4141ff; |
| | 116 | cycleway-weakinfo-width: 1.5; |
| | 117 | cycleway-color: #4100ff; |
| | 118 | cycleway-width: 2.0; |
| | 119 | cyclelane-width: 1.5; |
| | 120 | } |
| | 121 | way[highway=~/motorway|trunk|primary|secondary|tertiary/] |
| | 122 | { |
| | 123 | width: 4; |
| | 124 | } |
| | 125 | way[highway=~/living_street|residential|service|track|unclassified/] |
| | 126 | { |
| | 127 | width: 2; |
| | 128 | } |
| | 129 | way[highway=~/bridleway|cycleway|footway|path/] |
| | 130 | { |
| | 131 | width: 1; |
| | 132 | } |
| | 133 | |
| | 134 | |
| | 135 | |
| | 136 | /* cycleway=* tag styles */ |
| | 137 | way[cycleway:both=lane], |
| | 138 | way[cycleway:left=lane], |
| | 139 | way[cycleway=both], |
| | 140 | way[cycleway=left] |
| | 141 | { |
| | 142 | left-casing-color: eval(prop("cycleway-color")); |
| | 143 | left-casing-width: eval(prop("cyclelane-width")); |
| | 144 | } |
| | 145 | way[cycleway:both=lane], |
| | 146 | way[cycleway:right=lane], |
| | 147 | way[cycleway=both], |
| | 148 | way[cycleway=right] |
| | 149 | { |
| | 150 | right-casing-color: eval(prop("cycleway-color")); |
| | 151 | right-casing-width: eval(prop("cyclelane-width")); |
| | 152 | } |
| | 153 | way[cycleway=lane] |
| | 154 | { |
| | 155 | casing-color: eval(prop("cycleway-weakinfo-color")); |
| | 156 | casing-width: eval(prop("width")+(2*prop("cycleway-weakinfo-width"))); |
| | 157 | casing-dashes: list(16,3); |
| | 158 | } |
| | 159 | |
| | 160 | |
| | 161 | |
| | 162 | |
| | 163 | way[cycleway:both=track], |
| | 164 | way[cycleway:left=track] |
| | 165 | { |
| | 166 | left-casing-color: eval(prop("cycleway-color")); |
| | 167 | left-casing-width: eval(prop("cycleway-width")); |
| | 168 | left-casing-offset: +4; |
| | 169 | } |
| | 170 | way[cycleway:both=track], |
| | 171 | way[cycleway:right=track] |
| | 172 | { |
| | 173 | right-casing-color: eval(prop("cycleway-color")); |
| | 174 | right-casing-width: eval(prop("cycleway-width")); |
| | 175 | right-casing-offset: +4; |
| | 176 | } |
| | 177 | way[cycleway=track] |
| | 178 | { |
| | 179 | left-casing-color: eval(prop("cycleway-weakinfo-color")); |
| | 180 | left-casing-width: eval(prop("cycleway-weakinfo-width")); |
| | 181 | left-casing-dashes: list(16,3); |
| | 182 | left-casing-offset: +4; |
| | 183 | right-casing-color: eval(prop("cycleway-weakinfo-color")); |
| | 184 | right-casing-width: eval(prop("cycleway-weakinfo-width")); |
| | 185 | right-casing-dashes: list(16,3); |
| | 186 | right-casing-offset: +4; |
| | 187 | } |
| | 188 | |
| | 189 | |
| | 190 | |
| | 191 | /* highway=cycleway or stand-alone, dedicated cycleways */ |
| | 192 | way[bicycle_road=yes], |
| | 193 | way[highway=cycleway], |
| | 194 | way[highway=path][bicycle=~/official|designated/] |
| | 195 | { |
| | 196 | color: eval(prop("cycleway-color")); |
| | 197 | casing-color: eval(prop("cycleway-color")); |
| | 198 | casing-width: eval(prop("width")+(2*prop("cyclelane-width"))); |
| | 199 | } |
| | 200 | |
| | 201 | |
| | 202 | |
| | 203 | /* visualize access=* tag on an extra layer with a thin line in the way's center*/ |
| | 204 | /* .. continuous line if the way is officially marked by e.g. road signs */ |
| | 205 | way[bicycle=official]::access_layer, |
| | 206 | way[cycleway=sharrow]::access_layer, |
| | 207 | way[highway=cycleway]::access_layer |
| | 208 | { |
| | 209 | color: #b100ff; |
| | 210 | width: 1; |
| | 211 | } |
| | 212 | /* .. long dashes if the way is designated to be used by cyclists */ |
| | 213 | way[bicycle=designated]::access_layer |
| | 214 | { |
| | 215 | color: #b100ff; |
| | 216 | width: 1; |
| | 217 | dashes: list(12,3); |
| | 218 | } |
| | 219 | /* .. short dashes if cycling merely is allowed */ |
| | 220 | way[bicycle=yes]::access_layer |
| | 221 | { |
| | 222 | color: #b100ff; |
| | 223 | width: 1; |
| | 224 | dashes: list(3,3); |
| | 225 | } |
| | 226 | /* .. short black/red dashes if cycling is not allowed */ |
| | 227 | way[bicycle=no]::access_layer |
| | 228 | { |
| | 229 | color: red; |
| | 230 | width: 1; |
| | 231 | dashes: list(3,3); |
| | 232 | dashes-background-color: black; |
| | 233 | } |
| | 234 | way::access_layer |
| | 235 | { |
| | 236 | z-index: 10.0; |
| | 237 | } |
| | 238 | |
| | 239 | |
| | 240 | |
| | 241 | /* add a background glow for ways taking part in a bicycle route relation - similar to what is done in potlatch2.mapcss */ |
| | 242 | relation[type=route][route=bicycle][network=ncn] > way::relation_underlay { z-index: -200; width: 15; color: red; opacity: 0.08; linecap: none; } |
| | 243 | relation[type=route][route=bicycle][network=rcn] > way::relation_underlay { z-index: -200; width: 15; color: cyan; opacity: 0.08; linecap: none; } |
| | 244 | relation[type=route][route=bicycle][network=lcn] > way::relation_underlay { z-index: -200; width: 15; color: blue; opacity: 0.08; linecap: none; } |
| | 245 | |
| | 246 | }}} |