]> gerrit.simantics Code Review - simantics/district.git/blob - org.simantics.maps.server/server/tm2/mapbox-studio-light.tm2/style.mss
Fixed broken icon references from District Finder UI contributions
[simantics/district.git] / org.simantics.maps.server / server / tm2 / mapbox-studio-light.tm2 / style.mss
1 // Languages: name (local), name_en, name_fr, name_es, name_de
2 @name: '[name]';
3
4 // Fonts //
5 @sans: 'Arial Unicode MS Regular';
6 @sans_bold: 'Arial Unicode MS Bold';
7
8 /*
9 This style is designed to be easily recolored by adjusting the color
10 variables below. For predicatable feature relationships,
11 maintain or invert existing value (light to dark) scale.
12 */
13
14 // Color palette //
15 @road:  #fff;
16 @land:  #eee;
17
18 @fill1: #fff;
19 @fill2: #bbb;
20 @fill3: #777;
21 @fill4: #000;
22
23 @text: #777;
24
25 Map { background-color: @land; }
26
27 // Political boundaries //
28 #boundary[admin_level=2] {
29   line-join: round;
30   line-color: mix(@fill3,@fill2,50);
31   line-width: 1;
32   [zoom>=5] { line-width: 1.4; }
33   [zoom>=6] { line-width: 1.8; }
34   [zoom>=8] { line-width: 2; }
35   [zoom>=10] { line-width: 3; }
36   [disputed=1] { line-dasharray: 4,4; }
37 }
38
39 #boundary[admin_level>2][admin_level<=4] {
40   line-join: round;
41   line-color: @fill2;
42   line-width: 1;
43   line-dasharray: 3,2;
44   [zoom>=6] { line-width: 1.5; }
45   [zoom>=8] { line-width: 1.8; }
46 }
47
48 // Land Features //
49 #landuse[class='cemetery'],
50 #park,
51 #landcover[class='wood'],
52 #landcover[class='wetland'] {
53   polygon-fill: darken(@land,3);
54   [zoom>=15] { polygon-fill:mix(@land,@fill4,95); }
55 }
56
57 #landuse[class='pitch'],
58 #landcover[class='sand'] { 
59   polygon-fill: mix(@land,@fill4,90);
60 }
61
62 #landuse[class='hospital'],
63 #landuse[class='industrial'],
64 #landuse[class='school'] { 
65   polygon-fill: mix(@land,@fill1,95);
66 }
67
68 #building { 
69   polygon-fill: mix(@fill2,@land,25);
70   [zoom>=16]{ polygon-fill: mix(@fill2,@land,50);}
71 }
72
73 #aeroway {
74   ['mapnik::geometry_type'=3][class!='apron'] { 
75     polygon-fill: mix(@fill2,@land,25);
76     [zoom>=16]{ polygon-fill: mix(@fill2,@land,50);}
77   }
78   ['mapnik::geometry_type'=2] { 
79     line-color: mix(@fill2,@land,25);
80     line-width: 1;
81     [zoom>=13][class='runway'] { line-width: 4; }
82     [zoom>=16] {
83       [class='runway'] { line-width: 6; }
84       line-width: 3;
85       line-color: mix(@fill2,@land,50);
86     }
87   }
88 }
89
90 // Water Features //
91 #water {
92   ::shadow {
93     polygon-fill: mix(@land,@fill4,75);
94   }
95   ::fill {
96     // a fill and overlay comp-op lighten the polygon-
97     // fill from ::shadow.
98     polygon-fill: @land;
99     comp-op: soft-light;
100     // blurring reveals the polygon fill from ::shadow around
101     // the edges of the water
102     image-filters: agg-stack-blur(10,10);
103   }
104 }
105
106 // Water color is calculated by sampling the resulting color from
107 // the soft-light comp-op in the #water layer style above. 
108 @water: #d1d1d1;
109
110 #waterway {
111   [class='river'],
112   [class='canal'] {
113     line-color: @water;
114     line-width: 0.5;
115     [zoom>=12] { line-width: 1; }
116     [zoom>=14] { line-width: 2; }
117     [zoom>=16] { line-width: 3; }
118   }
119   [class='stream'] {
120     line-color: @water;
121     line-width: 0.5;
122     [zoom>=14] { line-width: 1; }
123     [zoom>=16] { line-width: 2; }
124     [zoom>=18] { line-width: 3; }
125   }
126 }