source: josm/trunk/styles_nodist/potlatch2/source/opencyclemap.css@ 5153

Last change on this file since 5153 was 3983, checked in by bastiK, 14 years ago

potlatch2 dev moved to git, mirror the style sources here

File size: 9.5 KB
Line 
1/*
2
3 Stylesheet that mimicks, to a certain extent, opencyclemap
4 Andy Allan, June 2010
5
6 Based heavily on:
7 MapCSS demonstration stylesheet
8 Richard Fairhurst, October 2009
9
10*/
11
12/* This rule applies to all areas (closed ways). Note that rules are applied in the order
13 they appear in the file, so later rules may replace this one for some ways.
14 This is used as a debugger for finding unstyled areas; it's obviously oversimplistic since
15 it picks up closed-loop highways. */
16
17way :area { color: grey; width: 1; fill-color: red; fill-opacity: 0.1; }
18
19/* A set of fairly standard rules.
20 We use z-index to make sure high-priority roads appear above minor ones.
21 The default z-index is 5. If an object matches multiple rules with the same
22 z-index then the rules are "merged" (but individual properties become one or the other) */
23
24/*way[highway=motorway],way[highway=motorway_link],
25way[highway=trunk],way[highway=trunk_link],
26way[highway=primary],way[highway=primary_link],
27way[highway=secondary],way[highway=secondary_link],
28way[highway=tertiary],way[highway=tertiary_link],
29way[highway=residential] { text: name; text-color: black; font-size: 7; text-position: line;}*/
30way[highway=motorway],way[highway=motorway_link] { z-index: 9; color: #bfbfcf; width: 7; casing-color: #506077; casing-width: 9; }
31way[highway=trunk],way[highway=trunk_link] { z-index: 9; color: #c8d8c8; width: 7; casing-color: #477147; casing-width: 9; }
32way[highway=primary],way[highway=primary_link] { z-index: 8; color: #d8c8c8; width: 7; casing-color: #8d4346; casing-width: 9; }
33way[highway=secondary],way[highway=secondary_link] { z-index: 7; color: #eeeec9; width: 7; casing-color: #a37b48; casing-width: 9; }
34way[highway=tertiary],way[highway=unclassified] { z-index: 6; color: #eeeec9; width: 5; casing-color: #999999; casing-width: 7; }
35way[highway=residential] { z-index: 5; color: white; width: 5; casing-color: #999; casing-width: 7; }
36way[highway=service] { color: white; width: 3; casing-color: #999; casing-width: 5; }
37
38/* Pedestrian precincts need to be treated carefully. Only closed-loops with an explicit
39area=yes tag should be filled. The below doesn't yet work as intended. */
40way[highway=pedestrian] !:area { color: #ddddee; width: 5; casing-color: #555555; casing-width: 6; }
41way[highway=pedestrian] :area { color: #555555; width: 1; fill-color: #ddddee; fill-opacity: 0.8; }
42
43way[highway=steps] { color: #be6c6c; width: 2; dashes: 4, 2; }
44way[highway=footway] { color: #be6c6c; width: 2; dashes: 6, 3; }
45way[highway=cycleway] { color: blue; width: 1.6; dashes: 5, 4; }
46way[highway=bridleway] { z-index:9; color: #996644; width: 2; dashes: 4, 2, 2, 2; }
47way[highway=track] { color: #996644; width: 2; dashes: 4, 2; }
48way[highway=path] { color: lightgreen; width: 2; dashes: 2, 2; }
49
50way[waterway=river], way[waterway=canal] { color: blue; width: 2; text:name; text-color:blue; font-size:9; text-position: offset; text-offset: 7;}
51
52way[barrier] {color: #000000; width: 1}
53
54/* Fills can be solid colour or bitmap images */
55
56
57way[natural] :area { color: #ADD6A5; width: 1; fill-color: #ADD6A5; fill-opacity: 0.2; }
58way[landuse] :area { color: #efefef; width: 1; fill-color: #f5f5f5; fill-opacity: 0.3; }
59way[amenity],way[shop] :area { color: #ADCEB5; width: 1; fill-color: #ADCEB5; fill-opacity: 0.2; }
60way[leisure],way[sport] :area { color: #8CD6B5; width: 1; fill-color: #8CD6B5; fill-opacity: 0.2; }
61way[tourism] :area { color: #F7CECE; width: 1; fill-color: #F7CECE; fill-opacity: 0.2; }
62way[historic],way[ruins] :area { color: #F7F7DE; width: 1; fill-color: #F7F7DE; fill-opacity: 0.2; }
63way[military] :area { color: #D6D6D6; width: 1; fill-color: #D6D6D6; fill-opacity: 0.2; }
64way[building] :area { color: #8d8d8d; width: 1; fill-color: #e0e0e0; fill-opacity: 0.2; }
65way[natural=water],
66way[waterway] :area { color: blue; width: 2; fill-color: blue; fill-opacity: 0.2; }
67way[landuse=forest],way[natural=wood] :area { color: green; width: 2; fill-color: green; fill-opacity: 0.2; }
68way[leisure=pitch],way[leisure=park] { color: #44ff44; width: 1; fill-color: #44ff44; fill-opacity: 0.2; }
69way[amenity=parking] :area { color: gray; width: 1; fill-color: gray; fill-opacity: 0.2; }
70way[public_transport=pay_scale_area] :area { color: gray; width: 1; fill-color: gray; fill-opacity: 0.1; }
71
72/* Addressing. Nodes with addresses *and* match POIs should have a poi icon, so we put addressing first */
73
74node[addr:housenumber],
75node[addr:housename] { icon-image: circle; icon-width: 4; color: #B0E0E6; casing-color:blue; casing-width: 1; }
76way[addr:interpolation] { color: #B0E0E6; width: 3; dashes: 3,3;}
77
78/* POIs, too, can have bitmap icons - they can even be transparent */
79
80node[amenity=pub] { icon-image: icons/pub.png; text-offset: 15; font-family: DejaVu; text: name; font-size: 9; }
81/*node[place] { icon-image: icons/place.png; text-offset: 17; font-family: DejaVu; text: name; font-size: 9; font-weight: bold; text-decoration: underline; }
82node[railway=station] { icon-image: icons/station.png; text-offset: 13; font-family: DejaVu; text: name; font-size: 9; font-weight: bold; }
83node[aeroway=aerodrome] { icon-image: icons/airport.png; text-offset: 13; font-family: DejaVu; text: name; font-size: 10; }
84node[amenity=atm] { icon-image: icons/atm.png; }
85node[amenity=bank] { icon-image: icons/bank.png; text-offset: 15; text: name; }
86node[highway=bus_stop] { icon-image: icons/bus_stop.png; }
87node[amenity=cafe] { icon-image: icons/cafe.png; text-offset: 15; text: name; }
88node[shop=convenience] { icon-image: icons/convenience.png; text-offset:15; text:name; }
89node[shop=supermarket] { icon-image: icons/supermarket.png; text-offset:15; text:name; }
90node[amenity=fast_food] { icon-image: icons/fast_food.png; text-offset:15; text: name; }
91node[amenity=fire_station] { icon-image: icons/fire_station.png; }
92node[amenity=hospital] { icon-image: icons/hospital.png; }
93node[tourism=hotel] { icon-image: icons/hotel.png; }
94node[amenity=parking] { icon-image: icons/parking.png; } */
95node[amenity=bicycle_parking] { icon-image: icons/parking_cycle.png; text-offset: 15; text: capacity; text-color: blue }
96/* node[amenity=pharmacy] { icon-image: icons/pharmacy.png; }
97node[amenity=pharmacy][dispensing=yes] { icon-image: icons/pharmacy_dispensing.png; }
98node[amenity=police] { icon-image: icons/police.png; }
99node[amenity=post_box] { icon-image: icons/post_box.png; }
100node[amenity=recycling] { icon-image: icons/recycling.png; }
101node[amenity=restaurant] { icon-image: icons/restaurant.png; }
102node[amenity=school] { icon-image: icons/school.png; }
103node[amenity=taxi] { icon-image: icons/taxi.png; }
104node[amenity=telephone] { icon-image: icons/telephone.png; }
105way node[barrier=gate], way node[highway=gate] { icon-image: icons/gate.png; }
106way node[barrier=bollard] { icon-image: icons/bollard.png; }
107node[barrier=cattle_grid] { icon-image: icons/cattle_grid.png; }*/
108
109/* We can stack styles at different z-index (depth) */
110
111way[railway=rail]
112 { z-index: 6; color: #444444; width: 5; }
113 { z-index: 7; color: white; width: 3; dashes: 12,12; }
114way[railway=platform] { color:black; width: 2; }
115way[railway=subway]
116 { z-index: 6; color: #444444; width: 5; }
117 { z-index: 7; color: white; width: 3; dashes: 8,8; }
118
119/* Bridge */
120way[bridge=yes], way[bridge=viaduct], way[bridge=suspension]
121 { z-index: 4; color: white; width: eval('_width+3'); }
122 { z-index: 3; color: black; width: eval('_width+6'); }
123
124/* Tunnel */
125way[tunnel=yes]
126 { z-index: 4; color: white; width: eval('_width+2'); }
127 { z-index: 3; color: black; width: eval('_width+6'); dashes: 4,4; }
128
129/* Oneway */
130way[oneway=yes] { z-index: 10; color: #6c70d5; width: 2; dashes: 10,30; line-style: arrows; }
131
132
133/* Change the road colour based on dynamically set "highlighted" tag (see earlier) */
134
135way .highlighted { color: pink; }
136
137/* Interactive editors may choose different behaviour when a user mouses-over or selects
138 an object. Potlatch 2 supports these but the stand-alone Halcyon viewer does not */
139
140way :hover { z-index: 2; width: eval('_width+10'); color: #ffff99; }
141way :selected { z-index: 2; width: eval('_width+10'); color: yellow; opacity: 0.7;}
142way !:drawn { z-index:10; width: 0.5; color: gray; }
143
144node :selectedway { z-index: 9; icon-image: square; icon-width: 8; color: red; casing-color: #cc0000; casing-width: 1;}
145node :hoverway { z-index: 9; icon-image: square; icon-width: 7; color: blue; }
146node !:drawn :poi { z-index: 2; icon-image: circle; icon-width: 3; color: lightsteelblue; casing-color: black; casing-width: 1; }
147node :selected { z-index: 1; icon-image: square; icon-width: eval('_width+10'); color: yellow; }
148node :junction :selectedway { z-index: 8; icon-image: square; icon-width: 12; casing-color: black; casing-width: 1; }
149
150/* Descendant selectors provide an easy way to style relations: this example means "any way
151 which is part of a relation whose type=route". */
152
153relation[type=route] way { z-index: 1; width: 17; color: yellow; opacity: 0.3; }
154relation[type=route][route=bicycle][network=ncn] way { z-index: 1; width: 12; color: red; opacity: 0.3; }
155relation[type=route][route=bicycle][network=rcn] way { z-index: 1; width: 12; color: cyan; opacity: 0.3; }
156relation[type=route][route=bicycle][network=lcn] way { z-index: 1; width: 12; color: blue; opacity: 0.3; }
157relation[type=route][route=bicycle][network=mtb] way { z-index: 1; width: 12; color: #48a448; opacity: 0.3; }
158
159
160
Note: See TracBrowser for help on using the repository browser.