apply new tangram
[platform/core/location/maps-plugin-mapzen.git] / scenes / bubble-wrap / bubble-wrap.yaml
1 Author: Geraldine Sarmiento, Nathaniel V. Kelso, Patricio Gonzalez Vivo, Brett Camper, Peter Richardson
2
3 global:
4     # Sign up for a Mapzen API key to enjoy higher rate limits
5     # https://mapzen.com/documentation/overview/#developer-accounts-and-api-keys
6     sdk_mapzen_api_key: ''     # set this value to your Mapzen API key
7
8     #ux/ui
9     ux_language: false             # l10n language code, trusting OSM in v0.10 tiles, fixed in v1.0 tiles
10     ux_language_fallback: false    # l10n language code, trusting OSM in v0.10 tiles, fixed in v1.0 tiles
11     ux_language_text_source: |
12         function() {
13             // if a ux_langauge has been defined use that, else if there is feature name in the fallback_ux_language then use that, else use the feature's default name in the local language
14             return (global.ux_language && feature['name:'+global.ux_language]) || (global.ux_language_fallback && feature['name:'+global.ux_language_fallback]) || feature.name;
15         }
16     ux_language_text_source_boundary_lines: |
17         function() {
18             var right = (global.ux_language && feature['name:right:'+global.ux_language]) || (global.ux_language_fallback && feature['name:right:'+global.ux_language_fallback]) || feature['name:right'];
19             var left = (global.ux_language && feature['name:left:'+global.ux_language]) || (global.ux_language_fallback && feature['name:left:'+global.ux_language_fallback]) || feature['name:left'];
20             if( right && left ) {
21                 //if( right.includes(' ') || left.includes(' ') ) {
22                     return left + " - " + right;
23                 //} else {
24                 //    return right + '\n' + left;
25                 //}
26             } else {
27                 return (global.ux_language && feature['name:'+global.ux_language]) || (global.ux_language_fallback && feature['name:'+global.ux_language_fallback]) || feature.name;
28             }
29         }
30     ux_language_text_source_short: |
31         function() {
32             return (global.ux_language && feature['name:short:'+global.ux_language]) || (global.ux_language_fallback && feature['name:short:'+global.ux_language_fallback]) || feature['name:short'];
33         }
34     ux_language_text_source_short_proxy_name: |
35         function() {
36             var name  = (global.ux_language && feature['name:'+global.ux_language]) || (global.ux_language_fallback && feature['name:'+global.ux_language_fallback]) || feature['name'] || '';
37             var short = (global.ux_language && feature['name:short:'+global.ux_language]) || (global.ux_language_fallback && feature['name:short:'+global.ux_language_fallback]) || feature['name:short'];
38             return short ? name : '';
39         }
40     ux_language_text_source_abbreviation: |
41         function() {
42             var name  = (global.ux_language && feature['name:'+global.ux_language]) || (global.ux_language_fallback && feature['name:'+global.ux_language_fallback]) || feature['name'] || '';
43             var abbrev = (global.ux_language && feature['name:abbreviation:'+global.ux_language]) || (global.ux_language_fallback && feature['name:abbreviation:'+global.ux_language_fallback]) || feature['name:abbreviation'];
44             return abbrev || name;
45         }
46     ux_language_text_source_iata: |
47         function() {
48             var name = (global.ux_language && feature['name:'+global.ux_language]) || (global.ux_language_fallback && feature['name:'+global.ux_language_fallback]) || feature['name'];
49             if(feature.iata) {
50                 if (name) {
51                     return name + ' (' + feature.iata + ')';
52                 }
53                 else {
54                     return feature.iata;
55                 }
56             } else {
57                 return name;
58             }
59         }
60     ux_language_text_source_ocean: |
61         function() {
62             var name = (global.ux_language && feature['name:'+global.ux_language]) || (global.ux_language_fallback && feature['name:'+global.ux_language_fallback]) || feature['name'] || '';
63             name = name.split(' ').join('\n');
64             return name.split('').join('  ');
65         }
66     ux_language_text_source_sea: |
67         function() {
68             var name = (global.ux_language && feature['name:'+global.ux_language]) || (global.ux_language_fallback && feature['name:'+global.ux_language_fallback]) || feature['name'] || '';
69             name = name.split(' ').join('\n');
70             return name.split('').join(' ');
71         }
72     ux_language_text_source_continent_stacked_only: |
73         function() {
74             var name = (global.ux_language && feature['name:'+global.ux_language]) || (global.ux_language_fallback && feature['name:'+global.ux_language_fallback]) || feature['name'] || '';
75             return name.split(' ').join('\n');
76         }
77     ux_language_text_source_continent: |
78         function() {
79             var name = (global.ux_language && feature['name:'+global.ux_language]) || (global.ux_language_fallback && feature['name:'+global.ux_language_fallback]) || feature['name'] || '';
80             name = name.split(' ').join('\n');
81             return name.split('').join(' ');
82         }
83     ux_language_text_source_road_ref_and_name: |
84         function() {
85             // if a ux_langauge has been defined use that, else if there is feature name in the fallback_ux_language then use that, else use the feature's default name in the local language
86             return (global.ux_language && feature['name:'+global.ux_language]) || (global.ux_language_fallback && feature['name:'+global.ux_language_fallback]) || feature.name;
87
88             /*
89             var name = (global.ux_language && feature['name:'+global.ux_language]) || (global.ux_language_fallback && feature['name:'+global.ux_language_fallback]) || feature['name'];
90             if(feature.ref && name) {
91                 return (feature.ref + ' ' + name);
92             } else {
93                 return name;
94             }
95             */
96         }
97     ux_language_text_source_road_ref_and_name_short: |
98         function() {
99             // if a ux_langauge has been defined use that, else if there is feature name in the fallback_ux_language then use that, else use the feature's default name in the local language
100             return (global.ux_language && feature['name:'+global.ux_language]) || (global.ux_language_fallback && feature['name:'+global.ux_language_fallback]) || feature.name;
101
102             /*
103             var name = (global.ux_language && feature['name:'+global.ux_language]) || (global.ux_language_fallback && feature['name:'+global.ux_language_fallback]) || feature['name'];
104             if (feature.ref && (feature.ref.length < 6) && name) {
105                 return feature.ref + ' ' + name;
106             } else {
107                 return name;
108             }
109             */
110         }
111     ux_language_text_source_piste_advanced: |
112         function() {
113             var name = (global.ux_language && feature['name:'+global.ux_language]) || (global.ux_language_fallback && feature['name:'+global.ux_language_fallback]) || feature['name'];
114             return name ? ('◆ ' + name) : '◆';
115         }
116     ux_language_text_source_piste_expert: |
117         function() {
118             var name = (global.ux_language && feature['name:'+global.ux_language]) || (global.ux_language_fallback && feature['name:'+global.ux_language_fallback]) || feature['name'];
119             return name ? ('◆◆ ' + name) : '◆◆';
120         }
121     ux_language_text_source_building_and_address: |
122         function() {
123             var name = (global.ux_language && feature['name:'+global.ux_language]) || (global.ux_language_fallback && feature['name:'+global.ux_language_fallback]) || feature['name'];
124             if (name && feature.addr_housenumber) {
125                 return name + '\n' + feature.addr_housenumber;
126             } else {
127                 return name;
128             }
129         }
130
131     # To facilitate data visualizations several recommended sort orders are provided
132     #
133     # Your classic raster map overlay.
134     # Over all line and polygon features.
135     # Under map labels (icons and text), under UI elements
136     # (like routeline and search result pins).
137     sdk_order_over_everything_but_text_0: 490
138     sdk_order_over_everything_but_text_1: 491
139     sdk_order_over_everything_but_text_2: 492
140     sdk_order_over_everything_but_text_3: 493
141     sdk_order_over_everything_but_text_4: 494
142     sdk_order_over_everything_but_text_5: 495
143     sdk_order_over_everything_but_text_6: 496
144     sdk_order_over_everything_but_text_7: 497
145     sdk_order_over_everything_but_text_8: 498
146     sdk_order_over_everything_but_text_9: 499
147     #
148     # Your classic "underlay"
149     # Under roads. Above borders, water, landuse, and earth.
150     sdk_order_under_roads_0: 290
151     sdk_order_under_roads_1: 291
152     sdk_order_under_roads_2: 292
153     sdk_order_under_roads_3: 293
154     sdk_order_under_roads_4: 294
155     sdk_order_under_roads_5: 295
156     sdk_order_under_roads_6: 296
157     sdk_order_under_roads_7: 297
158     sdk_order_under_roads_8: 298
159     sdk_order_under_roads_9: 299
160     #
161     # Under water.
162     # Above earth and most landuse.
163     sdk_order_under_water_0: 190
164     sdk_order_under_water_1: 191
165     sdk_order_under_water_2: 192
166     sdk_order_under_water_3: 193
167     sdk_order_under_water_4: 194
168     sdk_order_under_water_5: 195
169     sdk_order_under_water_6: 196
170     sdk_order_under_water_7: 197
171     sdk_order_under_water_8: 198
172     sdk_order_under_water_9: 199
173     #
174     # Under everything.
175     # Tip: disable earth layer.
176     sdk_order_under_everything_0: 0
177     sdk_order_under_everything_1: 1
178     sdk_order_under_everything_2: 2
179     sdk_order_under_everything_3: 3
180     sdk_order_under_everything_4: 4
181     sdk_order_under_everything_5: 5
182     sdk_order_under_everything_6: 6
183     sdk_order_under_everything_7: 7
184     sdk_order_under_everything_8: 8
185     sdk_order_under_everything_9: 9
186     #
187     # TRANSIT OVERLAY
188     # should default to "auto", with SDK overriding it to true or false,
189     # or app logic sets other booleans that triggers auto behavior later
190     sdk_transit_overlay: false
191     #
192     # SHIELDS
193     sdk_shield_color: [0.506,0.192,0.169]
194     sdk_shield_text_color: white
195     #
196     # enable interactivity for key features
197     sdk_interactive: false
198     #
199     # default order for basemap features
200     feature_order: function() { return feature.sort_rank; }
201     #
202     #label visibility
203     text_visible_continent:         true
204     text_visible_admin:             true
205     text_visible_populated_places:  true
206     icon_visible_populated_places:  true
207     text_visible_neighbourhoods:    true
208     text_visible_neighbourhoods_e:  true
209     text_visible_building:          true     # false for default
210     text_visible_address:           true     # false for default
211     text_visible_water_labels:      true
212     text_visible_island:            true
213     label_visible_landuse_green:    true
214     icon_visible_landuse_green:     true     # needs work
215     text_visible_landuse_green:     true
216     icon_size_green:                [[13, 14px], [16, 18px], [18, 19px]]    # 0px for no, default, more  [[13, 14px], [16, 18px], [18, 19px]]
217     icon_size_green_l:              [[13, 14px], [16, 18px], [18, 19px]]    # 0px for no, default, more  [[14,24px],[16,32px]]
218     label_visible_poi_landuse:      true
219     icon_visible_poi_landuse:       true     # false for default
220     text_visible_poi_landuse:       true     # false for default
221     label_visible_poi_landuse_e:    true
222     icon_visible_poi_landuse_e:     true     # false for default
223     text_visible_poi_landuse_e:    true
224     text_visible_landuse_generic:   true     # false for default
225     label_visible_station:          true     # false for default
226     icon_visible_station:           true     # false for default
227     text_visible_station:           true     # false for default
228     text_visible_highway:           true
229     text_visible_highway_e:         true     # false for default, false for more
230     text_visible_trunk_primary:     true
231     text_visible_trunk_primary_route: true        # true by default
232     text_visible_trunk_primary_e2:  true     # false for default, false for more
233     text_visible_trunk_primary_e:   true     # false for default, false for more
234     text_visible_secondary:         true
235     text_visible_secondary_e:       true     # false for default, false for more
236     text_visible_tertiary:          true
237     text_visible_tertiary_e:        true     # false for default, false for more
238     text_visible_minor_road:        true
239     text_visible_minor_road_e:      true
240     text_visible_service_road:      true
241     text_visible_path:              true
242     text_visible_piste:             true
243     text_visible_steps:             true
244     text_visible_aerialway:         true
245     text_visible_airport_gate:      true
246     sdk_road_shields:               true
247     text_visible_exits:             true
248     text_visible_exits_e:           true     # false for default, false for more
249     #
250     #label styling
251     text_fill: [0.300, 0.300, 0.300]         # BLACK
252     text_fill2: '#555'                       # WHITE
253     text_fill_road_e: '#555'                 # WHITE
254     text_fill_exits: [0.920,0.398,0.340]     # motorway junctions, highway_casing1
255     text_fill_building: '#ccc'               # WHITE
256     text_fill_address: '#aaa'                # HUH
257     text_fill_water: '#4c89b5'               # blue
258     text_fill_park: [0.35,0.35,0.35]         # black
259     text_fill_beach: [0.35,0.35,0.35]        # black
260     text_fill_piste: '#444'                  # dark gray
261     text_fill_piste_e: '#666'                # dark gray early
262     text_fill_shield: white                  # road shield fill color
263     text_stroke: [0.870,0.870,0.870]         # land color
264     text_stroke_water: [0.9, 0.9, 0.9]       # water stroke color
265     text_stroke_park: '#bddec5'              # park stroke color
266     text_stroke_building: [0.83, 0.83, 0.83] # building stroke color
267     text_stroke_address:  [0.85, 0.85, 0.85] # address stroke color
268     text_stroke_road1: [0.9, 0.9, 0.9]       # road stroke color highway
269     text_stroke_road2: [0.9, 0.9, 0.9]       # road stroke color major road
270     text_stroke_road3: [0.9, 0.9, 0.9]       # road stroke color major road route
271     text_stroke_road4: [0.9, 0.9, 0.9]       # road stroke color minor road
272     text_stroke_shield: '#D16768'            # road shield stroke color &highway_casing1
273     townspot_sprite: townspot-m-rev          # depends on land color and text settings
274     text_font_family: 'Open Sans'            # branding in asperational Unicode, yo (or Helvetica)
275     #
276     #roads
277     highway1: [0.988,0.495,0.439]
278     highway1_e: [0.988,0.495,0.439]
279     highway_link1: [1.000,0.631,0.590]
280     highway_casing1: [0.859,0.859,0.859]
281     highway_tunnel1: [0.800,0.800,0.800]
282     highway_tunnel_casing1: [0.870,0.870,0.870]
283     highway_link_tunnel_casing1: [0.8, 0.8, 0.7]
284     ferry1: '#8bb5e4'
285     rail1: '#999'
286     rail1_e: '#bbb'
287     rail2: '#777'                           # less important rail (service, sidings)
288     major_road1: [1, 1, 1]
289     major_road1b: [1.0,1.0,1.0]
290     major_road1c: white                     #15%
291     major_road2: [1.0,1.0,1.0]
292     major_road2a: [1.0,1.0,1.0]
293     major_road2b: [1.0,1.0,1.0]
294     major_road3: [1.0,1.0,1.0]
295     major_road4: white
296     major_road5: white
297     major_casing1: [0.859,0.859,0.859]      # same as highway_casing1
298     major_casing2: [0.859,0.859,0.859]      # zoomed out
299     major_tunnel1: [.870,0.870,0.870]       # light orange (major_route1)
300     major_tunnel_casing1: [0.780,0.780,0.780]
301     major_route1: [1.000,0.631,0.590]
302     major_route2: [1.000,0.752,0.730]       # zoomed out
303     minor_route: [1.000,0.631,0.590]        # same as major_route
304     minor_road1: [0.9,0.9,0.9]              # natural earth
305     minor_road2: [0.9,0.9,0.9]              # natural earth, same as major_road2
306     minor_road3: [0.9,0.9,0.9]
307     minor_road4: [0.9,0.9,0.9]              # zoomed out
308     minor_road5: [0.9,0.9,0.9]              # zoomed out, again
309     minor_casing1: white                    # same as highway_casing1
310     minor_casing2: white                    # zoomed out
311     minor_tunnel1: [0.8, 0.8, 0.7]
312     minor_tunnel_casing1: white
313     service_road1: white
314     service_road2: white
315     service_road_casing1: [0.770,0.770,0.770]
316     service_road_casing2: white
317     path1: [0.91,0.91,0.91]
318     path2: [0.91,0.91,0.91]                 # zoomed out
319     path_casing1: [0.875,0.875,0.875]
320     path_bridge_casing1: [0.870,0.870,0.870]
321     path_bridge_casing2: [0.870,0.870,0.870] # zoomed out
322     path_steps1: [0.91,0.91,0.91]
323     path_steps1_b: '#f0ebeb'
324     piste_easy: [0.367,0.750,0.622]
325     piste_intermediate: [0.420,0.678,0.863]
326     piste_advanced: [0.450,0.450,0.450]
327     piste_expert: [0.450,0.450,0.450]
328     #
329     #boundaries
330     country_boundary: [1.0,1.0,1.0]
331     region_boundary: [0.96,0.96,0.96]
332     subregion_boundary: '#bbb'
333     city_wall: [0.682,0.682,0.682]
334     retaining_wall: [0.827,0.808,0.780]
335     snow_fence: [0.827,0.808,0.780]
336     fence: [0.827,0.808,0.780]
337     #
338     #landuse
339     water1: [0.83, 0.83, 0.83]              # water
340     water2: [0.83, 0.83, 0.83]              # playa
341     water1_o: '#9dc3de'                     # water stroke
342     water2_o: '#9dc3de'                     # water stroke 2
343     earth1: [0.870,0.870,0.870]             # land color, used to set scene background color
344     earth1_r: '#666'                        # land color road
345     earth2: '#e9e4e0'                       # urban
346     earth2_v: false                         # urban
347     earth2_e: '#b3b3b3'                     # urban early
348     earth2_e2: '#b3b3b3'                    # urban early fade in
349     earth2_e3: '#bbbbbb'                    # urban early fade in 3
350     earth2_ev: true                         # urban early visibility
351     green1: [0.140,0.843,0.824]             # park
352     green1_r: [0.140,0.843,0.824]           # roads in parks
353     green1_b: '#94d8d6'                     # buildings in parks
354     green1_bo: '#7fc3c1'                    # buildings in parks, outlines
355     green1_w: '#b7d7bf'                     # wilderness area
356     green1_ws: '#aed0b6'                    # wilderness area stroke
357     green1b: [0.80,0.80,0.80]               # park
358     green2: [0.547,0.760,0.590]             # cemetery
359     green2_r: [0.7,0.7,0.7]                 # cemetery road
360     green3: [0.000,0.779,0.328]             # golf course
361     green4: '#526054'                       # farm faint
362     green4_v: false                         # farm faint
363     green5: '#5a695c'                       # farm
364     green6: '#648560'                       # nature reserve
365     green7: [0.169,0.651,0.631]             # forest
366     green8: [0.123,0.770,0.587]             # conservation
367     green9: '#cfe3d4'                       # forest (landcover)
368     green9_e: '#cfe3d4'                     # forest (landcover) early
369     green9_v: true                          # forest (landcover) visibility
370     green10: '#c7d4c0'                      # sports_centre
371     green11: '#d8ddd0'                      # minor zoo related AOIs
372     green11_o: '#aec7b5'                    # minor zoo related AOIs outline
373     orange1: '#bfb08e'                      # stadium
374     orange2: '#d8ccb0'                      # pitch (play field)
375     orange3: '#b9a597'                      # racetrack (play field)
376     brown1: [0.814,0.692,0.570]             # university
377     brown1_r: [0.814,0.692,0.570]           # roads in university
378     brown1_b: [.65, .65, .65]               # university buildings
379     brown1_bo: [.8, .8, .8]                 # university building outlines
380     brown2: '#ada497'                       # school
381     brown3: '#c7b7a2'                       # playground
382     red1: [0.840,0.503,0.541]               # hospital
383     red1_r: [0.840,0.503,0.541]             # roads in hospital
384     red1_b: [.65, .65, .65]                 # hospital buildings
385     red1_bo: [.8, .8, .8]                   # hospital building outlines
386     grey1: '#717171'                        # pedestrian, retail, airport apron, parking, church
387     grey1_e: '#cac6c4'                      # pedestrian, retail, airport apron, parking, church early zoom 14
388     grey1_v: true                           # pedestrian, retail, airport apron, parking, church
389     grey2: [0.5, 0.5, 0.5]                  # airport runway
390     grey3: grey                             # railway
391     grey4: '#ffc52a'                        # airport taxiway
392     grey5: '#ffc52a'                        # airport taxiway
393     grey6: '#c6c6c6'                        # industrial
394     grey6_b: [.65, .65, .65]                # industrial buildings
395     grey6_bo: [.8, .8, .8]                  # industrial building outlines
396     grey7: '#ecebe9'                        # pedestrian, match minor road / path color
397     grey7_v: true                           # pedestrian visibility
398     grey8: '#ecebe9'                        # winter sports
399     grey8_v: true                           # winter sports visibility
400     grey9: [.7, .0, .0, 0.5]                # [.7, .7, .7]        # transit platform
401     grey9_o: [.5, .5, .5]                   # transit platform outline
402     grey9_v: true                           # transit platform visibility
403     grey10: '#d4cce6'                       # generic major landuse (theme park, resort, aquarium, winery)
404     grey10_o: '#bcb9c5'                     # generic major landuse outline
405     grey11: '#d7d7d7'                       # generic minor landuse (attraction, artwork)
406     grey11_o: '#cccccc'                     # generic minor landuse outline
407     grey12: '#cfcfcf'                       # generic minor amusements (roller coasters, rides, slide, carousel)
408     grey12_o: '#c5c5c5'                     # generic minor amusements
409     purple: '#f0e1e1'                       # airport
410     purple_v: false                         # airport
411     purple_b: '#c2c3c4'                     # airport buildings
412     purple_bo: '#969798'                    # airport buildings outline
413     mystry1: '#bfb08e'                      # recreation ground
414     yellow1: '#e7eda8'                      # beach
415     building1: [0.784, 0.784, 0.784]        # building
416     building2: [.860, .860, .860]           # building stroke
417     building_o:  5                          # building stroke order
418     building_e: true                        # building stroke order early
419     sdk_building_extrude: true              # building extrusion toggle
420     building_extrude_height: |              # building extrude height logic
421         function() { return feature.height || 20; }
422
423 textures:
424     pois:
425         url: images/bubble-wrap@2x.png
426         #url: https://raw.githubusercontent.com/tangrams/bubble-wrap/gh-pages/images/bubble-wrap%402x.png
427         filtering: mipmap
428         sprites:
429             # define sprites: [x origin, y origin, width, height]
430             'US:CA-1char': [350, 694, 82, 90]
431             'US:CA-2char': [826, 694, 92, 92]
432             'US:CA-3char': [706, 694, 112, 92]
433             'US:CA-4char': [574, 694, 124, 92]
434             'US:CA-5char': [438, 694, 128, 92]
435             'US:I-1char': [686, 790, 90, 100]
436             'US:I-2char': [288, 894, 100, 100]
437             'US:I-3char': [148, 894, 134, 100]
438             'US:I-4char': [0, 894, 140, 100]
439             'US:I-5char': [784, 790, 152, 100]
440             'US:NY-1char': [560, 602, 72, 88]
441             'US:NY-2char': [812, 510, 88, 88]
442             'US:NY-3char': [700, 510, 104, 86]
443             'US:NY-4char': [576, 510, 116, 88]
444             'US:NY-5char': [448, 510, 120, 86]
445             'US:PA-1char': [480, 602, 72, 88]
446             'US:PA-2char': [384, 602, 88, 88]
447             'US:PA-3char': [264, 602, 112, 88]
448             'US:PA-4char': [136, 602, 120, 88]
449             'US:PA-5char': [0, 602, 128, 88]
450             'US:US-1char': [480, 790, 88, 94]
451             'US:US-2char': [576, 790, 104, 94]
452             'US:US-3char': [336, 790, 138, 100]
453             'US:US-4char': [172, 790, 158, 100]
454             'US:US-5char': [0, 792, 164, 98]
455             airport: [870, 0, 38, 38]
456             aerodrome: [870, 0, 38, 38]
457             aquarium: [870, 204, 38, 38]
458             atm: [46, 204, 38, 38]
459             bakery: [686, 204, 38, 38]
460             bank: [92, 204, 38, 38]
461             category-predicate-money: [92, 204, 38, 38]
462             bar: [368, 204, 38, 38]
463             pub: [368, 204, 38, 38]
464             category-predicate-drink: [368, 204, 38, 38]
465             baseball: [506, 84, 38, 38]
466             basketball: [460, 84, 38, 38]
467             beach: [644, 84, 38, 38]
468             bench: [548, 0, 38, 38]
469             bicycle: [0, 204, 38, 38]
470             bicycle_rental: [0, 204, 38, 38]
471             bicycle_rental_station: [0, 204, 38, 38]
472             bicycle_parking: [772, 126, 38, 38]
473             biergarten: [458, 246, 38, 38]
474             brewery: [458, 246, 38, 38]
475             books: [954, 126, 38, 38]
476             bridge: [920, 84, 38, 38]
477             buddhist: [782, 84, 38, 38]
478             building: [552, 204, 38, 38]
479             hangar: [552, 204, 38, 38]
480             nursing_home: [552, 204, 38, 38]
481             manor: [552, 204, 38, 38]
482             apartments: [552, 204, 38, 38]
483             care_home: [552, 204, 38, 38]
484             bus_station: [778, 0, 38, 38]
485             bus_stop: [778, 0, 38, 38]
486             butcher: [920, 42, 38, 38]
487             cafe: [640, 204, 38, 38]
488             camp_site: [828, 84, 38, 38]
489             summer_camp: [828, 84, 38, 38]
490             caravan_site: [828, 84, 38, 38]
491             capital-l: [726, 246, 32, 32]
492             capital-m: [694, 246, 24, 24]
493             capital-s: [666, 246, 20, 20]
494             capital-xl: [814, 246, 40, 40]
495             capital-xs: [642, 246, 16, 16]
496             car: [908, 126, 38, 38]
497             category-namespace-mobility: [908, 126, 38, 38]
498             category-predicate-mobility: [908, 126, 38, 38]
499             car_repair: [138, 204, 38, 38]
500             car_sharing: [594, 0, 38, 38]
501             castle: [414, 42, 38, 38]
502             fort: [414, 42, 38, 38]
503             cemetery: [736, 84, 38, 38]
504             grave_yard: [736, 84, 38, 38]
505             christian: [230, 126, 38, 38]
506             cinema: [916, 204, 38, 38]
507             clothes: [962, 204, 38, 38]
508             fashion: [962, 204, 38, 38]
509             college: [0, 246, 38, 38]
510             university: [0, 246, 38, 38]
511             confectionery: [136, 246, 38, 38]
512             convenience: [46, 84, 38, 38]
513             county_shield-1char: [640, 602, 72, 72]
514             county_shield-2char: [256, 694, 88, 72]
515             county_shield-3char: [144, 694, 104, 72]
516             county_shield-4char: [0, 694, 136, 72]
517             county_shield-5char: [720, 602, 160, 72]
518             courthouse: [364, 0, 38, 38]
519             department_store: [862, 126, 38, 38]
520             drinking_water: [412, 246, 38, 38]
521             dry_cleaning: [0, 84, 38, 38]
522             electronics: [726, 126, 38, 38]
523             computer: [726, 126, 38, 38]
524             estate_agent: [138, 42, 38, 38]
525             factory: [506, 204, 38, 38]
526             industrial: [506, 204, 38, 38]
527             chimney: [506, 204, 38, 38]
528             substation: [506, 204, 38, 38]
529             wastewater_plant: [506, 204, 38, 38]
530             works: [506, 204, 38, 38]
531             water_works: [506, 204, 38, 38]
532             plant: [506, 204, 38, 38]
533             generator: [506, 204, 38, 38]
534             category-predicate-industry: [506, 204, 38, 38]
535             fast_food: [320, 246, 38, 38]
536             ferry: [824, 0, 38, 38]
537             ferry_terminal: [824, 0, 38, 38]
538             fire_station: [318, 0, 38, 38]
539             fitness: [874, 42, 38, 38]
540             fitness_station: [874, 42, 38, 38]
541             florist: [184, 126, 38, 38]
542             forest: [182, 246, 38, 38]
543             natural_forest: [182, 246, 38, 38]
544             nature_reserve: [182, 246, 38, 38]
545             conservation: [182, 246, 38, 38]
546             protected_area: [182, 246, 38, 38]
547             grass: [182, 246, 38, 38]
548             fountain: [404, 126, 38, 38]
549             fuel: [90, 246, 38, 38]
550             gallery: [778, 204, 38, 38]
551             garden: [690, 84, 38, 38]
552             generic: [596, 246, 38, 38]
553             category-namespace-other: [596, 246, 38, 38]
554             category-predicate-addressing: [596, 246, 38, 38]
555             generic_shield-1char: [928, 290, 72, 72]
556             generic_shield-2char: [488, 422, 98, 72]
557             generic_shield-3char: [348, 422, 132, 72]
558             generic_shield-4char: [188, 422, 152, 72]
559             generic_shield-5char: [0, 422, 180, 72]
560             gift: [138, 126, 38, 38]
561             golf_course: [414, 84, 38, 38]
562             government: [276, 204, 38, 38]
563             townhall: [276, 204, 38, 38]
564             public: [276, 204, 38, 38]
565             embassy: [276, 204, 38, 38]
566             category-predicate-civic: [276, 204, 38, 38]
567             hairdresser: [46, 42, 38, 38]
568             hardware: [828, 42, 38, 38]
569             doityourself: [828, 42, 38, 38]
570             painter: [828, 42, 38, 38]
571             historical: [92, 126, 38, 38]
572             hospital: [184, 0, 38, 38]
573             category-namespace-health: [184, 0, 38, 38]
574             category-predicate-health: [184, 0, 38, 38]
575             hotel: [732, 0, 38, 38]
576             motel: [732, 0, 38, 38]
577             hostel: [732, 0, 38, 38]
578             category-predicate-sleep: [732, 0, 38, 38]
579             ice_cream: [504, 246, 38, 38]
580             information: [550, 246, 38, 38]
581             jewelry: [736, 42, 38, 38]
582             jewish: [46, 0, 38, 38]
583             landmark: [272, 0, 38, 38]
584             memorial: [272, 0, 38, 38]
585             monument: [272, 0, 38, 38]
586             tower: [272, 0, 38, 38]
587             beacon: [272, 0, 38, 38]
588             laundry: [690, 42, 38, 38]
589             library: [0, 0, 38, 38]
590             light_rail: [686, 0, 38, 38]
591             tram_stop: [686, 0, 38, 38]
592             lighthouse: [276, 84, 38, 38]
593             liquor: [634, 126, 38, 38]
594             alcohol: [634, 126, 38, 38]
595             mall: [644, 42, 38, 38]
596             marina: [230, 204, 38, 38]
597             dock: [230, 204, 38, 38]
598             mineshaft: [782, 42, 38, 38]
599             quarry: [782, 42, 38, 38]
600             adit: [782, 42, 38, 38]
601             mobile_phone: [506, 42, 38, 38]
602             museum: [46, 126, 38, 38]
603             observatory: [46, 126, 38, 38]
604             music: [368, 42, 38, 38]
605             muslim: [92, 0, 38, 38]
606             newspaper: [322, 42, 38, 38]
607             kiosk: [322, 42, 38, 38]
608             office: [598, 84, 38, 38]
609             insurance: [598, 84, 38, 38]
610             company: [598, 84, 38, 38]
611             category-predicate-service: [598, 84, 38, 38]
612             optician: [276, 42, 38, 38]
613             park: [358, 126, 38, 38]
614             national_park: [358, 126, 38, 38]
615             battlefield: [358, 126, 38, 38]
616             protected_area: [358, 126, 38, 38]
617             category-predicate-nature: [358, 126, 38, 38]
618             park-l: [276, 126, 74, 74]
619             parking: [818, 126, 38, 38]
620             peak: [230, 84, 38, 38]
621             pet: [230, 42, 38, 38]
622             pharmacy: [966, 42, 38, 38]
623             photographic_laboratory: [184, 42, 38, 38]
624             photographer: [184, 42, 38, 38]
625             pier: [640, 0, 38, 38]
626             place_of_worship: [414, 204, 38, 38]
627             chapel: [414, 204, 38, 38]
628             wayside_shrine: [414, 204, 38, 38]
629             category-predicate-religion: [414, 204, 38, 38]
630             playground: [460, 42, 38, 38]
631             police: [226, 0, 38, 38]
632             post_office: [460, 204, 38, 38]
633             recycling: [92, 42, 38, 38]
634             restaurant: [228, 246, 38, 38]
635             category-namespace-eat_and_drink: [228, 246, 38, 38]
636             category-predicate-eat: [228, 246, 38, 38]
637             retail: [598, 42, 38, 38]
638             store: [598, 42, 38, 38]
639             category-namespace-shop_and_service: [598, 42, 38, 38]
640             category-predicate-shop: [598, 42, 38, 38]
641             ruin: [502, 0, 38, 38]
642             ruins: [502, 0, 38, 38]
643             archaeological_site: [502, 0, 38, 38]
644             school: [552, 84, 38, 38]
645             kindergarten: [552, 84, 38, 38]
646             category-namespace-education_and_religion: [552, 84, 38, 38]
647             category-predicate-education: [552, 84, 38, 38]
648             sdk_shield-1char: [592, 422, 84, 84]
649             sdk_shield-2char: [328, 510, 112, 84]
650             sdk_shield-3char: [176, 510, 144, 84]
651             sdk_shield-4char: [0, 510, 168, 84]
652             sdk_shield-5char: [684, 422, 192, 84]
653             shoemaker: [552, 42, 38, 38]
654             ski: [450, 126, 38, 38]
655             winter_sports: [450, 126, 38, 38]
656             slipway: [138, 84, 38, 38]
657             soccer: [368, 84, 38, 38]
658             sports: [0, 42, 38, 38]
659             sports_centre: [322, 204, 38, 38]
660             pitch: [322, 204, 38, 38]
661             recreation_ground: [322, 204, 38, 38]
662             spring: [322, 84, 38, 38]
663             hot_spring: [322, 84, 38, 38]
664             stadium: [542, 126, 38, 38]
665             subway_entrance: [456, 0, 38, 38]
666             supermarket: [680, 126, 38, 38]
667             greengrocer: [680, 126, 38, 38]
668             swimming_pool: [588, 126, 38, 38]
669             tailor: [962, 0, 38, 38]
670             taqueria: [274, 246, 38, 38]
671             tennis: [496, 126, 38, 38]
672             theatre: [732, 204, 38, 38]
673             category-predicate-fun: [732, 204, 38, 38]
674             theme_park: [0, 126, 38, 38]
675             amusement_ride: [0, 126, 38, 38]
676             toilets: [874, 84, 38, 38]
677             townspot-l: [132, 288, 32, 32]
678             townspot-l-rev: [942, 246, 32, 32]
679             townspot-m: [100, 288, 24, 24]
680             townspot-m-rev: [910, 246, 24, 24]
681             townspot-s: [72, 288, 20, 20]
682             townspot-s-rev: [882, 246, 20, 20]
683             townspot-xl: [172, 288, 40, 40]
684             townspot-xl-rev: [0, 290, 40, 40]
685             townspot-xs: [48, 288, 16, 16]
686             townspot-xs-rev: [862, 246, 12, 12]
687             toys: [916, 0, 38, 38]
688             traffic_signals: [46, 246, 38, 38]
689             train_station: [410, 0, 38, 38]
690             station: [410, 0, 38, 38]
691             train: [410, 0, 38, 38]
692             category-predicate-transport: [410, 0, 38, 38]
693             ux-current-location: [514, 290, 88, 88]
694             ux-locate-off: [848, 290, 72, 72]
695             ux-locate-on: [768, 290, 72, 72]
696             ux-route-arrow: [220, 290, 128, 128]
697             ux-route-start: [434, 290, 72, 92]
698             ux-route-stop: [356, 290, 72, 92]
699             ux-search-active: [608, 290, 72, 108]
700             ux-search-inactive: [688, 290, 72, 108]
701             ux-transit-stop: [766, 248, 42, 36]
702             veterinary: [138, 0, 38, 38]
703             viewpoint: [824, 204, 38, 38]
704             category-namespace-do_and_see: [824, 204, 38, 38]
705             category-predicate-attraction: [824, 204, 38, 38]
706             vineyard: [184, 204, 38, 38]
707             volcano: [92, 84, 38, 38]
708             water_park: [184, 84, 38, 38]
709             wine: [366, 246, 38, 38]
710             winery: [594, 204, 38, 38]
711             zoo: [966, 84, 38, 38]
712
713     building-grid:
714         url: images/building-grid.gif
715         #url: https://raw.githubusercontent.com/tangrams/bubble-wrap/gh-pages/images/building-grid.gif
716         filtering: mipmap
717
718 fonts:
719     Open Sans:
720         - weight: 300 # Light
721           url: fonts/OpenSans-Light.woff
722         - weight: normal # Regular
723           url: fonts/OpenSans-Regular.woff
724         - weight: normal # Regular
725           style: italic
726           url: fonts/OpenSans-Italic.woff
727         - weight: 600 # Semi Bold
728           url: fonts/OpenSans-Semibold.woff
729         - weight: 600 # Semi Bold
730           style: italic
731           url: fonts/OpenSans-SemiboldItalic.woff
732         - weight: bold
733           url: fonts/OpenSans-Bold.woff
734     Montserrat:
735         - weight: normal
736           #url: https://fonts.gstatic.com/s/montserrat/v7/zhcz-_WihjSQC0oHJ9TCYL3hpw3pgy2gAi-Ip7WPMi0.woff
737           url: fonts/Montserrat-Regular.woff
738     Varela:
739         - weight: normal
740           #url: https://fonts.gstatic.com/s/varela/v7/maB5vWJo0EAVzvHPjBkLM-vvDin1pK8aKteLpeZ5c0A.woff
741           url: fonts/Varela-Regular.woff
742     Quicksand:
743         - weight: normal
744           #url: https://fonts.gstatic.com/s/quicksand/v6/sKd0EMYPAh5PYCRKSryvW7O3LdcAZYWl9Si6vvxL-qU.woff
745           url: fonts/Quicksand-Regular.woff
746
747 sources:
748     mapzen:
749         # EraserMaps the app only supports MVT format tiles
750         type:  MVT #TopoJSON
751         url:  https://tile.mapzen.com/mapzen/vector/v1/all/{z}/{x}/{y}.mvt
752         #url:  http://tile.dev.mapzen.com/mapzen/vector/v1/all/{z}/{x}/{y}.mvt
753         #url:  //localhost:8080/vector/all/{z}/{x}/{y}.mvt
754         # road labels in Tangram JS are broken when overzooming, set max_zoom: 18 to preview fix
755         url_params:
756             api_key: global.sdk_mapzen_api_key
757         max_zoom: 16
758
759 #    # Only enable this for local debug, should not be enabled for prod (app inserts these at runtime)
760 #    # These are all in San Francisco, California
761 #    #
762 #    # Current location gem
763 #    mz_current_location:
764 #        type: GeoJSON
765 #        url: https://gist.githubusercontent.com/anonymous/9e9588228b0a604264a2/raw/b28be49bea0b7feb859eb65b588c28e9fee5ae2c/map.geojson
766 #    # Route line
767 #    mz_route_line:
768 #        type: GeoJSON
769 #        # sf to ny
770 #        # url: https://gist.githubusercontent.com/anonymous/30c6c1a75c168d91d90c/raw/92bfe55e622766d250b1f2f5d17bdc7c26acb956/map.geojson
771 #        # local sf trip
772 #        url: https://gist.githubusercontent.com/anonymous/9a610ebda6fe4be7bccc/raw/8d217e43f2412d48d01534ba115f1e42dac72e68/map.geojson
773 #    # Dashed route line
774 #    mz_dash_line:
775 #        type: GeoJSON
776 #        url: https://gist.githubusercontent.com/anonymous/d73b851c64c3e5fbfc2754aa32f44c10/raw/938ae435776e176919c4797bed1465a92e403ef3/map.geojson
777 #    # Transit route line
778 #    mz_route_line_transit:
779 #        type: GeoJSON
780 #        url: https://gist.githubusercontent.com/anonymous/71ae88cbc6d62c4d141ecd6a61060050/raw/2254bbc18243f5dc609e663a580c9412a7447936/map.geojson
781 #    # Pin at start of route
782 #    mz_route_start:
783 #        type: GeoJSON
784 #        url: https://gist.githubusercontent.com/anonymous/5262969cb7549ea69221/raw/be03f233fa323d9b5cf50ef1d8e89a1faa3750f1/map.geojson
785 #    # Pin at end of route
786 #    mz_route_destination:
787 #        type: GeoJSON
788 #        url: https://gist.githubusercontent.com/anonymous/dbae9635dfe46796490e/raw/df55c318635a7d91b309ed40754d4738a292fd38/map.geojson
789 #    # Arrow for current route location
790 #    mz_route_location:
791 #        type: GeoJSON
792 #        url: https://gist.githubusercontent.com/anonymous/36613092be6e2aa004fd/raw/f753d13069425199e1dea1b449ef67d723f6510e/map.geojson
793 #    # Dots for transit stops in route preview
794 #    mz_route_transit_stop:
795 #        type: GeoJSON
796 #        url: https://gist.githubusercontent.com/anonymous/b9f16bca4a804f50faf71277d52ee4ab/raw/db13e4e765fa1ac8844b8ba02f4a0f66fe772907/map.geojson
797 #    # Pins showing search result locations
798 #    mz_search_result:
799 #        type: GeoJSON
800 #        url: https://gist.githubusercontent.com/anonymous/57dc09eeb120919f76de/raw/43426217da3c2bae0522dc4257aaa61e4df3981e/map.geojson
801 #    # Default point styling (SDK)
802 #    mz_default_point:
803 #        type: GeoJSON
804 #        url: https://gist.githubusercontent.com/anonymous/16324c771edfce45be0721390389b878/raw/7dbaebf17da7da8562e6c6f8768bc8cff83efa88/map.geojson
805 #    # Default shield styling (SDK)
806 #    mz_default_shield:
807 #        type: GeoJSON
808 #        url: https://gist.githubusercontent.com/nvkelso/3c08dba1eced4d01df98c1a9a7801162/raw/d83a5a396fc7b22309b8ca89336ad2dcfff6c452/map.geojson
809 #    # Default line styling (SDK)
810 #    mz_default_line:
811 #        type: GeoJSON
812 #        url: https://gist.githubusercontent.com/anonymous/26f4e8b6b34b2617b5d5533d89decb39/raw/df8e180ab4f7f19448014dccc4a755f7cfa20003/map.geojson
813 #    # Default polygon styling (SDK)
814 #    mz_default_polygon:
815 #        type: GeoJSON
816 #        url: https://gist.githubusercontent.com/anonymous/88235c795bb44b8c45150bdd5561f947/raw/71d4fab97b6513833bf1a589167119e6169ef86d/map.geojson
817
818 cameras:
819     isometric:
820         type: isometric
821
822 styles:
823     dashed:
824         base: lines
825         dash: [1.25, 1.25]
826         dash_background_color: [0.808,0.860,0.851]
827     dashed_big:
828         base: lines
829         dash: [2.0, 1.0]
830         dash_background_color: [0.808,0.860,0.851]
831     dashed_steps:
832         base: lines
833         dash: [0.5, 0.5]
834         dash_background_color: [0.867, 0.867, 0.867]
835     tools-tilecoords:
836         shaders:
837             blocks:
838                 global: |
839                     // Varying to be added to both vertex and fragment shaders
840                     varying vec2 v_pos;
841                     #ifdef TANGRAM_FRAGMENT_SHADER
842                     vec2 TileCoords() {
843                         return fract(v_pos);
844                     }
845                     #endif
846                 position: |
847                     v_pos = modelPosition().xy;
848     tools-aastep:
849         shaders:
850             extensions: OES_standard_derivatives
851             blocks:
852                 global: |
853                     float aastep(float threshold, float value) {
854                         #ifdef TANGRAM_FRAGMENT_SHADER
855                             #ifdef TANGRAM_EXTENSION_OES_standard_derivatives
856                                 float afwidth = length(vec2(dFdx(value), dFdy(value))) * 0.70710678118654757;
857                                 return smoothstep(threshold - afwidth, threshold + afwidth, value);
858                             #else
859                                 return step(threshold, value);
860                             #endif
861                         #else
862                             return step(threshold, value);
863                         #endif
864                     }
865     tools-grid:
866         mix: tools-tilecoords
867         shaders:
868             blocks:
869                 global: |
870                     #ifdef TANGRAM_FRAGMENT_SHADER
871                     bool grid(vec2 st, float res, float press) {
872                         vec2 grid = fract(st * res);
873                         return (grid.x < res * press) || (grid.y < res * press);
874                     }
875                     float TileGrid(float res) {
876                         vec2 st = TileCoords() * 100. * res;
877                         float pct = 0.0;
878                         float press = 0.4 + (1.0 - fract(u_map_position.z)) * 0.1;
879                         if (grid(st, 0.01, press)) { pct += 0.5; }
880                         if (grid(st, 0.1, press)) { pct += 0.15; }
881                         return pct;
882                     }
883                     float TileGrid() {
884                         return mix(TileGrid(1.), TileGrid(2.), fract(u_map_position.z));
885                     }
886                     #endif
887     grid:
888         base: polygons
889         mix: [tools-grid]
890         shaders:
891             blocks:
892                 filter: |
893                     color.rgb = vec3(0.899, 0.95, 1.0);
894                     color.rgb = mix(color.rgb, vec3(0.654,0.856,0.896), TileGrid());
895     water_border:
896         base: lines
897         texcoords: true
898         mix: tools-aastep
899         shaders:
900             blocks:
901                 global: |
902                     float pulse(float x, float p, float w) {
903                         x = abs(x - p);
904                         if (x > w) { return 0.0; }
905                         x /= w;
906                         return (1.0 - x * x * (3.0 - 2.0 * x));
907                     }
908                 width: |
909                     // Comment/Uncomment to fix the line to the border
910                     width *= 1.0 - v_texcoord.x;
911                 color: |
912                     vec2 st = v_texcoord.xy;
913                     float pattern = aastep(.5, pulse(st.x, .75, .15) + pulse(st.x, .4, .10) + pulse(st.x, .1, .1));
914                     color.rgb = mix(color.rgb, vec3(0.675,0.855,0.886), pattern);
915     shapes-circle:
916         shaders:
917             blocks:
918                 global: |
919                     // get distance field of a Circle
920                     // ================================
921                     float circleDF (vec2 st) {
922                         return dot(st,st);
923                     }
924
925     tiling-brick:
926         shaders:
927             blocks:
928                 global: |
929                     // Repeats a coordinate space (st) in diferent brick-like tiles
930                     // ================================
931                     vec2 brick(vec2 st, float zoom){
932                         st *= zoom;
933                         // Here is where the offset is happening
934                         st.x += step(1., mod(st.y, 2.0)) * 0.5;
935                         return fract(st);
936                     }
937     pattern-dots:
938         mix: [tools-tilecoords, tiling-brick, shapes-circle, tools-aastep]
939         shaders:
940             blocks:
941                 global: |
942                     #ifdef TANGRAM_FRAGMENT_SHADER
943                         float TileDots(float scale, float size) {
944                             vec2 tc = TileCoords() * scale * pow(2., floor(u_map_position.z) - abs(u_tile_origin.z));
945                             vec2 IN = brick(tc, 2.);
946                             float A = circleDF(vec2(0.5) - IN) * 1.8;
947                             float d = 0.0;
948                             if (u_map_position.z < 18.) {
949                                 vec2 OUT = fract(tc * 2.);
950                                 float B = circleDF(vec2(0.25) - OUT) * 7.;
951                                 B = min(B, circleDF(vec2(0.75, 0.25) - OUT) * 7.);
952                                 B = min(B, circleDF(vec2(0.50, 0.75) - OUT) * 7.);
953                                 B = min(B, circleDF(vec2(0.00, 0.75) - OUT) * 7.);
954                                 B = min(B, circleDF(vec2(1.00, 0.75) - OUT) * 7.);
955                                 d = mix(A, B, pow(fract(u_map_position.z), 10.));
956                             } else {
957                                 d = A;
958                             }
959                             return aastep(size, d);
960                         }
961                     #endif
962     dots:
963         base: polygons
964         mix: pattern-dots
965         shaders:
966             blocks:
967                 color: |
968                     color.rgb = mix(color.rgb, vec3(0.850), TileDots(45., 0.1));
969                     // size was set to 35 previously, now 45
970
971     dots-rev:
972         base: polygons
973         mix: pattern-dots
974         shaders:
975             blocks:
976                 color: |
977                     color.rgb = mix(vec3(0.850), color.rgb, TileDots(45., .21));
978
979     # HSV/RGB functions
980     hsv:
981         shaders:
982             blocks:
983                 global: |
984                     vec3 rgb2hsv(vec3 c)
985                     {
986                         vec4 K = vec4(0.0, -1.0 / 3.0, 2.0 / 3.0, -1.0);
987                         vec4 p = mix(vec4(c.bg, K.wz), vec4(c.gb, K.xy), step(c.b, c.g));
988                         vec4 q = mix(vec4(p.xyw, c.r), vec4(c.r, p.yzx), step(p.x, c.r));
989                         float d = q.x - min(q.w, q.y);
990                         float e = 1.0e-10;
991                         return vec3(abs(q.z + (q.w - q.y) / (6.0 * d + e)), d / (q.x + e), q.x);
992                     }
993                     vec3 hsv2rgb(vec3 c)
994                     {
995                         vec4 K = vec4(1.0, 2.0 / 3.0, 1.0 / 3.0, 3.0);
996                         vec3 p = abs(fract(c.xxx + K.xyz) * 6.0 - K.www);
997                         return c.z * mix(K.xxx, clamp(p - K.xxx, 0.0, 1.0), c.y);
998                     }
999
1000     scale-buildings:
1001         shaders:
1002             blocks:
1003                 position: |
1004                     // scale buildings based on zoom
1005                     float zoom = u_map_position.z;
1006                     float min = .1;       // minimum building scale
1007                     float midpoint = 16.; // middle of zoom range
1008                     float inspeed = .1;   // number of zooms to scale buildings up
1009                     float outspeed = 2.;  // number of zooms to scale buildings back down
1010                     float e = 0.;
1011
1012                     if (zoom >= midpoint) {
1013                         e = (zoom - midpoint) / (outspeed * .2);
1014                     } else {
1015                         e = abs(zoom - midpoint) / inspeed;
1016                     }
1017                     position.z *= ((1. - min) / (1. + (exp(e)))) + min;
1018
1019     building-grid:
1020         base: polygons
1021         lighting: false
1022         mix: [hsv, scale-buildings]
1023         texcoords: true
1024         shaders:
1025             uniforms:
1026                 u_tex_grid: building-grid
1027             defines:
1028                 WALL_TINT: vec3(1., 3., .800)
1029             blocks:
1030                 color: |
1031                     if (dot(vec3(0., 0., 1.), worldNormal()) < .5) {
1032                         // If it's a wall
1033                         color.rgb = hsv2rgb(rgb2hsv(color.rgb) * WALL_TINT);
1034                         color.rgb = mix(color.rgb, vec3(0.),
1035                                         texture2D(u_tex_grid, v_texcoord).a);
1036                     }
1037
1038     building-lines:
1039         base: lines
1040         mix: scale-buildings
1041         texcoords: true
1042     lines_transparent:
1043         base: lines
1044         blend: overlay
1045     outline_transparent:
1046         base: lines
1047         blend: overlay
1048     polygons_transparent:
1049         base: polygons
1050         blend: overlay
1051     icons:
1052         base: points
1053         texture: pois
1054         blend_order: 1
1055     text-blend-order:
1056         base: text
1057         blend_order: 1
1058     ux-route-line-overlay:
1059         base: lines
1060         blend: overlay
1061         blend_order: 0
1062     ux-route-line-dash-overlay:
1063         base: lines
1064         blend: overlay
1065         blend_order: 0
1066         dash: [2, 1]
1067     ux-transit-line-overlay:
1068         base: lines
1069         blend: overlay
1070         blend_order: 0
1071     ux-location-gem-overlay:
1072         base: points
1073         texture: pois
1074         blend: overlay
1075         blend_order: 2
1076     ux-icons-overlay:
1077         base: points
1078         texture: pois
1079         interactive: global.sdk_interactive
1080         blend: overlay
1081         blend_order: 3
1082     sdk-point-overlay:
1083         base: points
1084         texture: pois
1085         interactive: global.sdk_interactive
1086         blend: overlay
1087         blend_order: 3
1088     sdk-shield-overlay:
1089         base: points
1090         texture: pois
1091         interactive: global.sdk_interactive
1092         blend: overlay
1093         blend_order: 3
1094     sdk-line-overlay:
1095         base: lines
1096         blend: overlay
1097         blend_order: 0
1098     sdk-polygon-overlay:
1099         base: polygons
1100         blend: overlay
1101         blend_order: 0
1102
1103 scene:
1104     background:
1105         color: global.earth1
1106
1107 layers:
1108     # Map overlays for styling the server response (using special source layer names) for route line, current location, and search result pins
1109     mz_route_line:
1110         data: { source: mz_route_line }
1111         draw:
1112             ux-route-line-overlay:
1113                 color: '#06a6d4'
1114                 order: 500
1115                 width: [[0,3.5px],[5,5px],[9,7px],[10,6px],[11,6px],[13,8px],[14,9px],[15,10px],[16,11px],[17,12px],[18,10px]]
1116     mz_route_line_dash:
1117         data: { source: mz_dash_line }
1118         draw:
1119             ux-route-line-dash-overlay:
1120                 color: '#06a6d4'
1121                 order: 500
1122                 width: [[2,2px],[5,2.5px],[11,3px],[16,7px],[17,9px]]
1123     mz_route_line_transit:
1124         data: { source: mz_route_line_transit }
1125         draw:
1126             ux-transit-line-overlay:
1127                 # each transit route segment could be a different "line" each with it's own color
1128                 # but some transit lines don't define a color, in those cases default to blue
1129                 # and since the color is coming from Transit.land they call it "color" instead of "colour"
1130                 color: function() { return feature.color || '#06a6d4'; }
1131                 order: 500
1132                 width: [[0,3.5px],[5,5px],[9,7px],[10,6px],[11,6px],[13,8px],[14,9px],[15,10px],[16,11px],[17,12px],[18,10px]]
1133     mz_current_location_gem:
1134         data: { source: mz_current_location }
1135         draw:
1136             ux-location-gem-overlay:
1137                 sprite: ux-current-location
1138                 size: 36px
1139                 collide: false
1140                 transition: { show: { time: 0s }, hide: { time: 0s } }
1141     mz_route_location:
1142         data: { source: mz_route_location }
1143         draw:
1144             ux-location-gem-overlay:
1145                 sprite: ux-route-arrow
1146                 size: [60px,60px]
1147                 collide: false
1148                 transition: { show: { time: 0s }, hide: { time: 0s } }
1149     mz_route_start:
1150         data: { source: mz_route_start }
1151         draw:
1152             ux-icons-overlay:
1153                 interactive: global.sdk_interactive
1154                 priority: 1
1155                 sprite: ux-route-start
1156                 size: [36px,46px]
1157                 collide: false
1158                 anchor: top
1159                 transition: { show: { time: 0s }, hide: { time: 0s } }
1160     mz_route_destination:
1161         data: { source: mz_route_destination }
1162         draw:
1163             ux-icons-overlay:
1164                 interactive: global.sdk_interactive
1165                 priority: 1
1166                 sprite: ux-route-stop
1167                 size: [36px,46px]
1168                 collide: false
1169                 anchor: top
1170                 transition: { show: { time: 0s }, hide: { time: 0s } }
1171     mz_route_transit_stop:
1172         data: { source: mz_route_transit_stop }
1173         draw:
1174             ux-icons-overlay:
1175                 sprite: ux-transit-stop
1176                 size: [15px,15px]
1177                 collide: false
1178                 transition: { show: { time: 0s }, hide: { time: 0s } }
1179     mz_search_result:
1180         data: { source: mz_search_result }
1181         draw:
1182             ux-icons-overlay:
1183                 interactive: global.sdk_interactive
1184                 sprite: ux-search-active
1185                 size: [36px,54px]
1186                 collide: false
1187                 anchor: top
1188                 transition: { show: { time: 0s }, hide: { time: 0s } }
1189         inactive:
1190             filter: { state: inactive }
1191             draw:
1192                 ux-icons-overlay:
1193                     sprite: ux-search-inactive
1194     mz_dropped_pin:
1195         data: { source: mz_dropped_pin }
1196         draw:
1197             ux-icons-overlay:
1198                 sprite: ux-search-active
1199                 size: [36px,54px]
1200                 collide: false
1201                 anchor: top
1202                 transition: { show: { time: 0s }, hide: { time: 0s } }
1203
1204     # Used by the SDK to place point, line, and polygon overlays on the map
1205     mz_default_point:
1206         data: { source: mz_default_point }
1207         draw:
1208             sdk-point-overlay:
1209                 interactive: global.sdk_interactive
1210                 sprite: ux-search-active
1211                 size: [36px,54px]
1212                 collide: false
1213                 anchor: top
1214                 transition: { show: { time: 0s }, hide: { time: 0s } }
1215     mz_default_shield:
1216         data: { source: mz_default_shield }
1217         draw:
1218             sdk-shield-overlay:
1219                 interactive: global.sdk_interactive
1220                 sprite: |
1221                     function() {
1222                         if( feature.shield_text ) {
1223                             return ('sdk_shield-' + feature.shield_text.length + 'char');
1224                         } else {
1225                             return ('sdk_shield-' + feature.name.length + 'char');
1226                         }
1227                     }
1228                 sprite_default: sdk_shield-1char
1229                 color: global.sdk_shield_color
1230                 collide: false
1231                 transition: { show: { time: 0s }, hide: { time: 0s } }
1232                 text:
1233                     # offset: [0px, -1px]
1234                     text_source: |
1235                         function() {
1236                             if( feature.shield_text ) {
1237                                 return feature.shield_text;
1238                             } else {
1239                                 return feature.name;
1240                             }
1241                         }
1242                     anchor: center
1243                     font:
1244                         family: Montserrat
1245                         fill: global.sdk_shield_text_color
1246                         style: bold
1247                         size: [[7,7px],[12,8px],[16,11px]]
1248
1249         width_1char:
1250             filter: |
1251                 function() {
1252                     if( feature.shield_text ) {
1253                         return (feature.shield_text.length === 1);
1254                     } else {
1255                         return (feature.name.length === 1);
1256                     }
1257                 }
1258             draw:
1259                 sdk-shield-overlay:
1260                     size: [[6,[16px,16px]],[13,[18px,18px]],[16,[21px,21px]]]
1261         width_2char:
1262             filter: |
1263                 function() {
1264                     if( feature.shield_text ) {
1265                         return (feature.shield_text.length === 2);
1266                     } else {
1267                         return (feature.name.length === 2);
1268                     }
1269                 }
1270             draw:
1271                 sdk-shield-overlay:
1272                     size: [[6,[21px,16px]],[13,[24px,18px]],[16,[28px,21px]]]
1273         width_3char:
1274             filter: |
1275                 function() {
1276                     if( feature.shield_text ) {
1277                         return (feature.shield_text.length === 3);
1278                     } else {
1279                         return (feature.name.length === 3);
1280                     }
1281                 }
1282             draw:
1283                 sdk-shield-overlay:
1284                     size: [[6,[27px,16px]],[13,[31px,18px]],[16,[36px,21px]]]
1285         width_4char:
1286             filter: |
1287                 function() {
1288                     if( feature.shield_text ) {
1289                         return (feature.shield_text.length === 4);
1290                     } else {
1291                         return (feature.name.length === 4);
1292                     }
1293                 }
1294             draw:
1295                 sdk-shield-overlay:
1296                     size: [[6,[32px,16px]],[13,[36px,18px]],[16,[41px,21px]]]
1297         width_5char:
1298             filter: |
1299                 function() {
1300                     if( feature.shield_text ) {
1301                         return (feature.shield_text.length === 5);
1302                     } else {
1303                         return (feature.name.length === 5);
1304                     }
1305                 }
1306             draw:
1307                 sdk-shield-overlay:
1308                     size: [[6,[37px,16px]],[13,[41px,18px]],[16,[48px,21px]]]
1309         # this is kinda a hack
1310         width_longggggg:
1311             filter: |
1312                 function() {
1313                     if( feature.shield_text ) {
1314                         return (feature.shield_text.length > 5);
1315                     } else {
1316                         return (feature.name.length > 5);
1317                     }
1318                 }
1319             draw:
1320                 sdk-shield-overlay:
1321                     visible: false
1322     mz_default_line:
1323         data: { source: mz_default_line }
1324         draw:
1325             sdk-line-overlay:
1326                 color: '#06a6d4'
1327                 order: 503
1328                 width: 3px
1329     mz_default_polygon:
1330         data: { source: mz_default_polygon }
1331         draw:
1332             sdk-polygon-overlay:
1333                 color: [0.02,0.65,0.82,0.5]  #'#06b1e2'
1334                 order: 501
1335             sdk-line-overlay:
1336                 color: '#06a6d4'
1337                 order: 502
1338                 width: 0px
1339
1340     # Basemap styling
1341     water:
1342         data: { source: mapzen, layer: water }
1343         draw:
1344             grid:
1345                 order: global.feature_order
1346                 #color: global.water1
1347         ocean:
1348             filter:
1349                 kind: ocean
1350             draw:
1351                 grid:
1352                     color: global.water1
1353         inland-water:
1354             filter:
1355                 all:
1356                     - kind: [lake, water, riverbank, reservoir, swimming_pool]
1357                 any:
1358                     # limit show smaller landuse areas to higher zooms
1359                     - { $zoom: { min: 1 },  area: { min: 40000000000 } }
1360                     - { $zoom: { min: 2 },  area: { min: 20000000000 } }
1361                     # some weird natural earth scale set transition
1362                     - { $zoom: { min: 3 },  area: { min: 80000000000 } }
1363                     - { $zoom: { min: 4 },  area: { min: 5000000000 } }
1364                     - { $zoom: { min: 5 },  area: { min: 700000000 } }
1365                     - { $zoom: { min: 6 },  area: { min: 500000000 } }
1366                     - { $zoom: { min: 7 },  area: { min: 160000000 } }
1367                     - { $zoom: { min: 8 },  area: { min: 40000000 } }
1368                     - { $zoom: { min: 9 },  area: { min: 10000000 } }
1369                     - { $zoom: { min: 10 }, area: { min: 8000000 } }
1370                     - { $zoom: { min: 11 }, area: { min: 2000000 } }
1371                     - { $zoom: { min: 12 }, area: { min: 200000 } }
1372                     - { $zoom: { min: 13 }, area: { min: 100000 } }
1373                     - { $zoom: { min: 14 }, area: { min: 2000 } }
1374                     - { $zoom: { min: 15 } }
1375             draw:
1376                 grid:
1377                     color: global.water1
1378         other-water-areas:
1379             filter: { not: { kind: [ocean, lake, water, reservoir, swimming_pool, playa] }, $zoom: { min: 11 }, area: { min: 100 } }
1380             draw:
1381                 grid:
1382                     color: global.water1
1383         playas:
1384             filter: { kind: playa }
1385             draw:
1386                 polygons:
1387                     order: function() { return feature.sort_rank + 1; }
1388                     color: global.water2 #[0.870,0.870,0.870]
1389         water-boundary-ocean-early:
1390             filter: { boundary: true, kind: ocean, $zoom: {min: 1, max: 17} }
1391             draw:
1392                 line2:
1393                     style: lines
1394                     order: global.feature_order
1395                     color: [[9,[0.396,0.833,0.920]],[10,[0.886,0.937,0.988]]]
1396                     width: [[9,0.25px],[10,2px],[11,3px],[13,4px],[15,6px]]
1397                 lines:
1398                     order: 240
1399                     color: [[1,[0.698,0.800,0.820]],[11,[0.631,0.773,0.800]],[14,[0.543,0.740,0.780]]]
1400                     width: [[1,0.25px],[6,0.5px],[7,0.75px],[9,0.75px],[10,1px]]
1401         water-boundary-ocean-late:
1402             filter: { boundary: true, kind: ocean, $zoom: {min: 17} }
1403             draw:
1404                 water_border:
1405                     order: 240
1406                     color: [[0,[0.886,0.937,0.988]]]
1407                     width: 20px
1408         water_boundaries-not-ocean:
1409             filter: { boundary: true, not: { kind: ocean }, $zoom: { min: 8 } }
1410             draw:
1411                 lines:
1412                     order: global.feature_order
1413                     # color: [[8,[0.635,0.737,0.753]],[13,[0.635,0.737,0.753]],[14,[0.569,0.722,0.749]],[15,[0.397,0.743,0.809]]]
1414                     color: [[8,[0.749,0.831,0.867]],[12,[0.698,0.788,0.816]],[13,[0.698,0.784,0.812]],[14,[0.627,0.788,0.831]],[17,[0.643,0.824,0.851]]]
1415                     width: [[8,0.5px],[10,0.5px],[11,0.5px],[12,0.75px],[13,1px],[14,1px],[15,1px],[16,1px],[17,1px]]
1416                     join: round
1417                     outline:
1418                         color: [0.886,0.937,0.988]
1419                         #width: [[9,0px],[10,1.5px],[11,1px],[12,1.5px],[13,1.6px],[14,2px],[15,2px],[16,3px],[18,4px]]
1420                         width: [[11,0px],[12,1.2px],[13,1.6px],[14,2px],[15,2px],[16,3px],[18,4px]]
1421             early:
1422                 filter: { $zoom: { min: 14 } }
1423                 draw:
1424                     lines:
1425                         order: 241
1426             riverbank:
1427                 # river boundaries like the thames in london, la seine in paris
1428                 filter: { kind: riverbank }
1429                 draw:
1430                     lines:
1431                         color: [[8,[0.667,0.792,0.824]],[11,[0.698,0.808,0.835]],[13,[0.710,0.796,0.824]],[14,[0.522,0.792,0.855]]]
1432                         width: [[9,0.5px],[10,0.75px],[11,0.75px],[12,0.8px],[13,1px],[14,1px],[15,1px],[16,1px],[17,1.5px]]
1433         river:
1434             #river center lines, not boundaries for polygons
1435             filter: { kind: [river,canal,stream,dam,ditch,drain], $zoom: { min: 11 }, not: { is_tunnel: true } }
1436             draw:
1437                 lines:
1438                     order: global.feature_order
1439                     color: [[11,[0.753,0.820,0.835]],[12,[0.710,0.800,0.824]],[13,[0.886,0.937,0.988]]]
1440                     width: [[8,0px],[10,0px],[11,0.75px],[12,1px],[13,1px],[14,2px],[15,3px],[16,4px],[17,5px]]
1441                     join: round
1442                     outline:
1443                         color: [[11,[0.671,0.788,0.812]],[13,[0.710,0.800,0.824]],[14,[0.635,0.812,0.843]]]
1444                         width: [[9,0px],[11,0px],[12,0px],[13,0.5px],[14,0.75px],[15,0.75px],[16,0.75px],[17,1px]]
1445
1446         water-labels:
1447             filter:
1448                 all:
1449                     - name: true
1450                     - function() { return global.text_visible_water_labels; }
1451             water-line-labels:
1452                 filter:
1453                     $geometry: line
1454                     kind: [river,canal,stream,dam,ditch,drain]
1455                     $zoom: { min: 14 }
1456                 draw:
1457                     text-blend-order:
1458                         text_source: global.ux_language_text_source
1459                         font:
1460                             fill: [0.314,0.591,0.640]
1461                             family: global.text_font_family
1462                             style: italic
1463                             weight: normal
1464                             size: 12px
1465                 water-line-labels-z14:
1466                     filter: { $zoom: [14] }
1467                     draw:
1468                         text-blend-order: { font: { size: 10px } }
1469                 water-line-labels-z17:
1470                     filter: { $zoom: [17] }
1471                     draw:
1472                         text-blend-order: { font: { size: 14px } }
1473                 not-river-not-stream:
1474                     filter: { kind: [canal,dam,ditch,drain], $zoom: { max: 16 } }
1475                     draw:
1476                         text-blend-order:
1477                             visible: false
1478                 stream:
1479                     filter: { kind: [stream], $zoom: { max: 17 } }
1480                     draw:
1481                         text-blend-order:
1482                             visible: false
1483
1484             water-area-labels:
1485                 filter:
1486                     all:
1487                         - $geometry: point
1488                         - not: { kind: [riverbank, dock, playa] }
1489                         - area: true
1490                     any:
1491                         # show labels for smaller landuse areas at higher zooms
1492                         - { $zoom: { min: 5 },  area: { min: 10000000000 } }
1493                         - { $zoom: { min: 6 },  area: { min: 5000000000 } }
1494                         - { $zoom: { min: 7 },  area: { min: 400000000 } }
1495                         - { $zoom: { min: 8 },  area: { min: 200000000 } }
1496                         - { $zoom: { min: 9 },  area: { min: 100000000 } }
1497                         - { $zoom: { min: 10 }, area: { min: 100000000 } }
1498                         - { $zoom: { min: 11 }, area: { min: 10000000 } }
1499                         - { $zoom: { min: 12 }, area: { min: 2000000 } }
1500                         - { $zoom: { min: 13 }, area: { min: 1000000 } }
1501                         - { $zoom: { min: 14 }, area: { min: 500000 } }
1502                         - { $zoom: { min: 15 }, area: { min: 100000 } }
1503                         - { $zoom: { min: 15 }, area: { min: 50000 } }
1504                         - { $zoom: { min: 16 }, area: { min: 20000 } }
1505                         - { $zoom: { min: 17 } }
1506                 default-label-text:
1507                     draw:
1508                         text-blend-order:
1509                             text_source: global.ux_language_text_source
1510                             font:
1511                                 fill: [0.314,0.591,0.640] #global.text_fill_water
1512                                 family: global.text_font_family
1513                                 style: italic
1514                                 weight: normal
1515                                 size: 12px
1516                 lakes-labels:
1517                     filter:
1518                         $zoom: { min: 4 }
1519                     draw:
1520                         text-blend-order:
1521                             font:
1522                                 size: [[5,9px],[8,12px]]
1523
1524             ocean-sea-labels:
1525                 filter:
1526                     kind: [sea, ocean]
1527                 draw:
1528                     text-blend-order:
1529                         text_source: global.ux_language_text_source
1530                         font:
1531                             fill: [0.314,0.591,0.640] #global.text_fill_water
1532                             family: global.text_font_family
1533                             weight: normal
1534                             size: 8px
1535                             transform: uppercase
1536                 ocean-spacer:
1537                     filter: { kind: ocean }
1538                     ocean-spacer-z1-z4:
1539                         filter: { $zoom: { min: 1, max: 4 } }
1540                         draw:
1541                             text-blend-order:
1542                                 text_source: global.ux_language_text_source_sea
1543                                 text_wrap: false
1544                     ocean-spacer-z4-up:
1545                         filter: { $zoom: { min: 4 } }
1546                         draw:
1547                             text-blend-order:
1548                                 text_source: global.ux_language_text_source_ocean
1549                                 text_wrap: false
1550                 ocean-labels:
1551                     draw:
1552                         text-blend-order:
1553                             font:
1554                                 size: [[1,8px],[4,16px]]
1555                 sea-early:
1556                     filter: { $zoom: [3], kind: sea }
1557                     draw: { text-blend-order: { visible: false } }
1558
1559                 sea-spacer:
1560                     filter: { not: { kind: [ocean] }, $zoom: { min: 4 } }
1561                     draw:
1562                         text-blend-order:
1563                             text_source: global.ux_language_text_source_sea
1564                             text_wrap: false
1565                 sea-labels:
1566                     filter: { not: { kind: [ocean] } }
1567                     draw:
1568                         text-blend-order:
1569                             font:
1570                                 size: [[4,9px],[8,16px]]
1571
1572             playa-labels:
1573                 filter:
1574                     all:
1575                         - $geometry: point
1576                         - kind: playa
1577                         - area: true
1578                     any:
1579                         # show labels for smaller landuse areas at higher zooms
1580                         - { $zoom: { min: 7 },  area: { min: 1500000000 } }
1581                         - { $zoom: { min: 8 },  area: { min: 200000000 } }
1582                         - { $zoom: { min: 9 },  area: { min: 100000000 } }
1583                         - { $zoom: { min: 10 }, area: { min: 100000000 } }
1584                         - { $zoom: { min: 11 }, area: { min: 10000000 } }
1585                         - { $zoom: { min: 12 }, area: { min: 2000000 } }
1586                         - { $zoom: { min: 13 }, area: { min: 1000000 } }
1587                         - { $zoom: { min: 14 }, area: { min: 500000 } }
1588                         - { $zoom: { min: 15 }, area: { min: 100000 } }
1589                         - { $zoom: { min: 15 }, area: { min: 50000 } }
1590                         - { $zoom: { min: 16 }, area: { min: 20000 } }
1591                         - { $zoom: { min: 17 } }
1592                 draw:
1593                     text-blend-order:
1594                         text_source: global.ux_language_text_source
1595                         font:
1596                             fill: grey
1597                             family: global.text_font_family
1598                             style: italic
1599                             weight: normal
1600                             size: 12px
1601                             stroke: { color: global.text_stroke_water, width: 3 }
1602                 # debug only
1603         #        icons:
1604         #            size: [[13, 12px], [15, 18px]]
1605         #            sprite: global.townspot_sprite
1606
1607
1608     transit-basemap:
1609         data: { source: mapzen, layer: transit }
1610         subway-light-rail:
1611             filter: { not: { kind: [platform] }, $zoom: { min: 14 } }
1612             draw:
1613                 lines:
1614                     order: function() { return feature.sort_rank || 275; }
1615             railway:
1616                 filter: { kind: [railway,train] }
1617                 draw:
1618                     lines:
1619                         color: [0.588,0.671,0.698]
1620                         width: [[14,0.4px],[15,0.75px],[16,1.1px],[18,2px],[19,1m]]
1621             subway:
1622                 filter: { kind: subway }
1623                 draw:
1624                     lines:
1625                         color: [0.588,0.671,0.698]
1626                         width: [[14,0.4px],[15,0.75px],[16,1.3px],[17,1.5px],[18,2m]]
1627             light_rail:
1628                 filter: { kind: [light_rail,tram], $zoom: { min: 15 } }
1629                 draw:
1630                     lines:
1631                         order: 415
1632                         color: [0.588,0.671,0.698]
1633                         width: [[14,0px],[15,0.6px],[16,0.75px],[17,1.5px],[19,1m]]
1634         platforms:
1635             filter: { kind: platform }
1636             draw:
1637                 lines_transparent:
1638                     color: [0.569,0.690,0.722,0.5]
1639                     width: 5m
1640                     visible: global.grey9_v
1641             polygon_geom:
1642                 filter: { $geometry: polygon }
1643                 draw:
1644                     polygons_transparent:
1645                         color: [0.592,0.671,0.694,0.5]
1646                         visible: global.grey9_v
1647                     lines_transparent:
1648                         visible: false
1649                     outline_transparent:
1650                         color: global.grey9_o
1651                         width: [[16,0px],[17,0.5px],[19,2px]]
1652             z-order:
1653                 draw:
1654                     lines_transparent:
1655                         order: function() { if($zoom<17) { return feature.sort_rank; } else { return 435; } }
1656                         color: [0.569,0.690,0.722,0.5]
1657                         width: 5m
1658                         visible: global.grey9_v
1659                     polygons_transparent:
1660                         order: function() { if($zoom<17) { return feature.sort_rank; } else { return 435; } }
1661                     outline_transparent:
1662                         order: function() { if($zoom<17) { return feature.sort_rank; } else { return 436; } }
1663                 polygon_geom:
1664                     filter: { $geometry: polygon }
1665                     draw:
1666                         polygons_transparent:
1667                             color: [0.592,0.671,0.694,0.5]
1668                             visible: global.grey9_v
1669                         lines_transparent:
1670                             visible: false
1671                         outline_transparent:
1672                             color: global.grey9_o
1673                             width: [[16,0px],[17,0.5px],[19,2px]]
1674
1675 #    # useful to example road geometry merging & Tangram labeling w/r/t tile boundaries
1676 #    z-randomColor:
1677 #        data: { source: mapzen, layer: roads }
1678 #        draw:
1679 #            lines:
1680 #                order: 1000
1681 #                # color: '#777'
1682 #                color: function() { return [Math.random(), Math.random(), Math.random()] }
1683 #                width: [[13,0.5px],[14,1px],[16,2px]]
1684
1685     roads:
1686         data: { source: mapzen, layer: roads }
1687         draw:
1688             lines:
1689                 # let roads sort themselves past zoom 14 (using server value)
1690                 order: global.feature_order
1691                 # but give them all the same outline
1692                 outline:
1693                     order: 352
1694             text-blend-order:
1695                 text_source: global.ux_language_text_source
1696                 visible: false    # labels are enabled by each layer below
1697                 font:
1698                     family: global.text_font_family
1699                     weight: normal
1700                     fill: global.text_fill
1701                     size: 12px
1702
1703         natural_earth_highways:
1704             filter: { source: 'naturalearthdata.com', $zoom: { max: 8 } }
1705             draw:
1706                 lines:
1707                     # Perf impact (too many vertices)
1708                     #cap: round
1709                     #join: round
1710                     color: global.highway1
1711                     width: [[5, 1px], [7, 1.4px], [9, 1.5px], [14, 3px], [16, 4px], [17, 10m]]
1712             major_road:
1713                 filter: { kind: major_road }
1714                 draw:
1715                     lines:
1716                         color: [0.980,0.601,0.559]
1717                         width: [[5, 0.45px], [6, 0.75px], [7, 1.0px], [8, 1px]]
1718             minor_road:
1719                 filter: { kind: minor_road }
1720                 draw:
1721                     lines:
1722                         color: [[12, global.minor_road1], [17, global.minor_road2]]
1723                         width: [[12, 1.0px], [14, 1.5px], [15, 3px], [16, 5m]]
1724             ferry:
1725                 filter: { kind: ferry }
1726                 draw:
1727                     lines:
1728                         color: [0.702,0.843,0.933]
1729                         width: 1px
1730         highway:
1731             filter: { kind: highway, $zoom: { min: 8 } }
1732             draw:
1733                 lines:
1734                     color: [[8, global.highway1], [14, global.highway1], [15, [1.0,1.0,1.0]], [17, [1.0,1.0,1.0]]]
1735                     width: [[8, 1px], [9, 1.25px], [11, 1.2px], [12, 1.3px], [13, 1.5px], [14, 2.25px], [15, 0.15px], [16, 5.5px], [17, 12m]]
1736                     outline:
1737                         color: [[11, global.highway_casing1], [15,[0.988,0.495,0.439]], [17, [0.988,0.495,0.439]]]
1738                         width: [[11, 0], [12, 1px], [13, 1.33px], [15, 2px], [16, 2.25px], [17, 3px], [18, 3px]]
1739             early:
1740                 filter: { $zoom: { max: 15 } }
1741                 draw:
1742                     lines:
1743                         outline:
1744                             order: 353
1745             link:
1746                 filter: { is_link: true } # on- and off-ramps, etc
1747                 draw:
1748                     lines:
1749                         color: [[9, global.highway_link1], [14, global.highway_link1], [15, [1.0,1.0,1.0]], [17, [1.0,1.0,1.0]]]
1750                         width: [[9, 0px], [11, 0.5px], [13, 1px], [14, 1px], [15, 0.15px], [16, 3px], [17, 4m], [18, 5m]]
1751                         cap: butt
1752                         outline:
1753 #                            order: 355
1754                             color: [[10, global.highway_casing1], [16, [0.988,0.495,0.439]], [17, [0.988,0.495,0.439]]]
1755                             width: [[14, 0px], [15, 0.85px], [17, 1.125px], [18, 1.5px]]
1756                 early:
1757                     filter: { $zoom: { max: 15 } }
1758                     draw:
1759                         lines:
1760                             order: 352
1761                 tunnel-link:
1762                     filter: {is_tunnel: true, $zoom: {min: 13} }
1763                     draw:
1764                         lines:
1765                             color: global.highway_tunnel1
1766                             outline:
1767                                 color: global.highway_tunnel_casing1
1768             tunnel:
1769                 filter: {is_tunnel: true, $zoom: {min: 13} }
1770                 draw:
1771                     lines:
1772                         # color: [[16, [0.843,0.843,0.843]]]
1773                         color: [[16, [0.85,0.85,0.85]]]
1774                         outline:
1775                             color: [[13, [0.890,0.890,0.890]], [14, [0.870,0.870,0.870]], [16, [0.824,0.753,0.741]]]
1776             highway_bridge:
1777                 filter: {is_bridge: true}
1778                 draw:
1779                     lines:
1780                         cap: round
1781                         outline:
1782                             cap: butt
1783             labels-highway-default:
1784                 draw:
1785                     text-blend-order:
1786                         text_source: global.ux_language_text_source_road_ref_and_name
1787             # labels-highway-early:
1788             #     filter:
1789             #         $zoom: [7,8,9]
1790             #         shield_text: false
1791             #     draw:
1792             #         text-blend-order:
1793             #             priority: 50
1794             #             visible: global.sdk_road_shields
1795             #             text_source: ref
1796             #             font:
1797             #                 fill: [1.0,1.0,1.0]
1798             #                 weight: 600
1799             #                 size: 9px
1800             #                 stroke: { color: [0.976,0.541,0.490], width: 3 }
1801             # labels-highway-z10:
1802             #     filter:
1803             #         $zoom: 10
1804             #         shield_text: false
1805             #     draw:
1806             #         text-blend-order:
1807             #             visible: global.sdk_road_shields
1808             #             text_source: ref
1809             #             font:
1810             #                 fill: [1.0,1.0,1.0]
1811             #                 weight: 600
1812             #                 size: 10px
1813             #                 stroke: { color: [0.976,0.541,0.490], width: 3 }
1814             # labels-highway-z11:
1815             #     filter:
1816             #         $zoom: 11
1817             #         shield_text: false
1818             #     draw:
1819             #         text-blend-order:
1820             #             visible: global.sdk_road_shields
1821             #             text_source: ref
1822             #             font:
1823             #                 fill: [1.0,1.0,1.0]
1824             #                 weight: 600
1825             #                 size: 11px
1826             #                 stroke: { color: [0.976,0.541,0.490], width: 3 }
1827             # labels-highway-z12:
1828             #     filter:
1829             #         $zoom: 12
1830             #         shield_text: false
1831             #     draw:
1832             #         text-blend-order:
1833             #             visible: global.sdk_road_shields
1834             #             text_source: ref
1835             #             font:
1836             #                 fill: [1.0,1.0,1.0]
1837             #                 weight: 600
1838             #                 size: 12px
1839             #                 stroke: { color: [0.976,0.541,0.490], width: 3 }
1840             labels-highway-z13:
1841                 filter:
1842                     $zoom: 13
1843                 draw:
1844                     text-blend-order:
1845                         priority: 50
1846                         visible: global.text_visible_highway
1847                         #text_source: ref
1848                         font:
1849                             fill: [0.0,0.0,0.0]
1850                             weight: 600
1851                             size: 12px
1852                             # stroke: { color: [0.976,0.541,0.490], width: 4 }
1853             labels-highway-z14:
1854                 filter:
1855                     $zoom: 14
1856                 draw:
1857                     text-blend-order:
1858                         priority: 50
1859                         visible: global.text_visible_highway
1860                         #text_source: ref
1861                         font:
1862                             fill: [0.0,0.0,0.0]
1863                             weight: 600
1864                             size: 12px
1865                             # stroke: { color: [0.976,0.541,0.490], width: 4 }
1866             labels-highway-z15:
1867                 filter:
1868                     $zoom: 15
1869                 draw:
1870                     text-blend-order:
1871                         visible: global.text_visible_highway
1872                         font:
1873                             fill: [0.0,0.0,0.0]
1874                             weight: 600
1875                             size: 14px
1876                             stroke: { color: [1.000,1.000,1.000], width: 2 }
1877             labels-highway-z16:
1878                 filter: { $zoom: { min: 16, max: 18 } }
1879                 draw:
1880                     text-blend-order:
1881                         priority: 50
1882                         visible: global.text_visible_highway
1883                         font:
1884                             fill: [0.0,0.0,0.0]
1885                             size: 15px
1886                             stroke: { color: [1.000,1.000,1.000], width: 4 }
1887             labels-highway-z18:
1888                 filter: { $zoom: { min: 18 } }
1889                 draw:
1890                     text-blend-order:
1891                         priority: 50
1892                         visible: global.text_visible_highway
1893                         font:
1894                             fill: [0.0,0.0,0.0]
1895                             size: 17px
1896                             stroke: { color: [1.000,1.000,1.000], width: 4 }
1897
1898         major_road:
1899             filter: { kind: major_road, $zoom: { min: 8 } }
1900             # default style
1901             draw:
1902                 lines:
1903                     color: [[8, global.major_road4], [13, global.major_road2], [17, global.major_road1]]
1904                     width: [[13, 0px], [14, 2px], [16, 2.5px], [19, 8m]]
1905             trunk_primary:
1906                 filter: { kind_detail: [trunk, primary] }
1907                 draw:
1908                     lines:
1909                         color: [1.0,1.0,1.0]
1910                         width: [[9, 0.5px], [10, 0.5px], [11, 1.0px], [12, 1.0px], [13, 1.5px], [14, 2.5px], [15, 5px], [16, 10m], [17, 10m]]
1911                         outline:
1912                             color: [[13, [0.827,0.827,0.827]], [15, [1.000,0.739,0.710]]]
1913                             # todo: investigate width optimizations
1914                             width: [[14, 0px], [15, 1.75px], [16, 2px], [17, 3px]]
1915                 early:
1916                     filter: { $zoom: { max: 16 } }
1917                     draw:
1918                         lines:
1919                             order: 352
1920                             outline:
1921                                 order: function() { return feature.sort_rank + 2; }
1922                     primary:
1923                         filter: { kind: [primary] }
1924                         draw:
1925                             lines:
1926                                 outline:
1927                                     order: function() { return feature.sort_rank + 1; }
1928                 routes:
1929                     filter: { ref: true }
1930                     draw:
1931                         lines:
1932                             color: [[9, global.major_route1], [14, global.major_route1], [15,[1.0,1.0,1.0]], [16,[1.0,1.0,1.0]]]
1933                             #order: function() { return feature.sort_rank + 1; }
1934                             # todo confirm widths
1935                             width: [[9, 1.0px], [10, 1.0px], [11, 1.2px], [12, 1.25px], [13, 1.5px], [14, 1.6px], [15, 0.15px], [16, 5.25px], [17, 12m]]
1936                             outline:
1937                                 color: [[13, [0.870,0.870,0.870]], [15, [0.976,0.612,0.573]]]
1938                                 width: [[13, 0], [15, 2px], [16, 2px], [17, 3px]]
1939                     early:
1940                         filter: { $zoom: { max: 16 } }
1941                         draw:
1942                             lines:
1943                                 order: function() { return feature.sort_rank + 2; }
1944                                 outline:
1945                                     order: 353
1946                     # no national-routes layer because it's not different than the basic style
1947                     tunnel:
1948                         filter: {is_tunnel: true, $zoom: {min: 13} }
1949                         draw:
1950                             lines:
1951                                 color: global.major_tunnel1
1952                                 outline:
1953                                     color: global.major_tunnel_casing1
1954                                     width: [[13, 0.5px], [15, 2px], [16, 2px], [17, 3px]]
1955                     labels-trunk_primary-route-default:
1956                         draw:
1957                             text-blend-order:
1958                                 text_source: global.ux_language_text_source_road_ref_and_name
1959                                 visible: global.text_visible_trunk_primary_route
1960                     # labels-trunk_primary-route-z13:
1961                     #     filter:
1962                     #         $zoom: { max: 14 }
1963                     #         shield_text: false
1964                     #     draw:
1965                     #         text-blend-order:
1966                     #             text_source: ref
1967                     #             visible: global.text_visible_trunk_primary_route
1968                     #             font:
1969                     #                 fill: [1.0,1.0,1.0]
1970                     #                 weight: 600
1971                     #                 size: 11px
1972                     #                 stroke: { color: [0.976,0.541,0.490], width: 2 }
1973                     labels-trunk_primary-route-z14:
1974                         filter: { $zoom: [14] }
1975                         draw:
1976                             text-blend-order:
1977                                 priority: 51
1978                                 #text_source: ref
1979                                 font:
1980                                     fill: [0.0,0.0,0.0]
1981                                     #size: 12px
1982                                     stroke: { color: [0.95,0.95,0.95], width: 0.1px }
1983                     labels-trunk_primary-route-z15:
1984                         filter: { $zoom: [15] }
1985                         draw:
1986                             text-blend-order:
1987                                 priority: 51
1988                                 #text_source: global.ux_language_text_source_road_ref_and_name
1989                                 font:
1990                                     fill: [0.0,0.0,0.0]
1991                                     weight: 600
1992                                     size: 14px
1993                                     stroke: { color: [0.95,0.95,0.95], width: 0.1px }
1994                     labels-trunk_primary-route-z16:
1995                         filter: { $zoom: { min: 16 } }
1996                         draw:
1997                             text-blend-order:
1998                                 priority: 51
1999                                 #text_source: global.ux_language_text_source_road_ref_and_name
2000                                 font:
2001                                     fill: [0.0,0.0,0.0]
2002                                     weight: 600
2003                                     size: 15px
2004                                     stroke: { color: [1.000,1.000,1.000], width: 4px }
2005                 labels-trunk_primary-default:
2006                     draw:
2007                         text-blend-order:
2008                             text_source: global.ux_language_text_source_road_ref_and_name_short
2009                             visible: global.text_visible_trunk_primary
2010                 labels-trunk_primary-z11:
2011                     filter:
2012                         $zoom: [11]
2013                     draw:
2014                         text-blend-order:
2015                             priority: 51
2016                             visible: global.text_visible_trunk_primary_e
2017                             #text_source: global.ux_language_text_source_road_ref_and_name_short
2018                             font:
2019                                 fill: [0.4,0.4,0.4]
2020                                 size: 10px
2021                                 # stroke: { color: [1.000,0.631,0.590], width: 3 }
2022                 labels-trunk_primary-z12:
2023                     filter:
2024                         $zoom: [12]
2025                     draw:
2026                         text-blend-order:
2027                             priority: 51
2028                             visible: global.text_visible_trunk_primary_e
2029                             #text_source: global.ux_language_text_source_road_ref_and_name_short
2030                             font:
2031                                 fill: [0.4,0.4,0.4]
2032                                 size: 11px
2033                                 # stroke: { color: [1.000,0.631,0.590], width: 3 }
2034                 labels-trunk_primary-z13:
2035                     filter:
2036                         $zoom: [13]
2037                     draw:
2038                         text-blend-order:
2039                             priority: 51
2040                             #text_source: global.ux_language_text_source_road_ref_and_name_short
2041                             font:
2042                                 fill: [0.25,0.25,0.25]
2043                                 size: 12px
2044                                 stroke: { color: global.text_stroke, width: 2 }
2045                 labels-trunk_primary-z14:
2046                     filter:
2047                         $zoom: [14]
2048                     draw:
2049                         text-blend-order:
2050                             priority: 51
2051                             #text_source: global.ux_language_text_source_road_ref_and_name_short
2052                             font:
2053                                 fill: [0.10,0.10,0.10]
2054                                 size: 13px
2055                                 stroke: { color: [1.00,1.00,1.00], width: 2 }
2056                 labels-trunk_primary-z15:
2057                     filter: { $zoom: [15] }
2058                     draw:
2059                         text-blend-order:
2060                             priority: 51
2061                             #text_source: global.ux_language_text_source_road_ref_and_name_short
2062                             font:
2063                                 fill: [0.0,0.0,0.0]
2064                                 size: 14px
2065                                 stroke: { color: [1.00,1.00,1.00], width: 3 }
2066                 labels-trunk_primary-z16:
2067                     filter: { $zoom: [16] }
2068                     draw:
2069                         text-blend-order:
2070                             priority: 51
2071                             #text_source: global.ux_language_text_source_road_ref_and_name
2072                             font:
2073                                 fill: [0.0,0.0,0.0]
2074                                 size: 15px
2075                                 stroke: { color: [1.00,1.00,1.00], width: 3 }
2076                 labels-trunk_primary-z17:
2077                     filter: { $zoom: [17] }
2078                     draw:
2079                         text-blend-order:
2080                             priority: 51
2081                             #text_source: global.ux_language_text_source_road_ref_and_name
2082                             font:
2083                                 fill: [0.0,0.0,0.0]
2084                                 size: 16px
2085                                 stroke: { color: [1.00,1.00,1.00], width: 3 }
2086                 labels-trunk_primary-z18:
2087                     filter: { $zoom: { min: 18 } }
2088                     draw:
2089                         text-blend-order:
2090                             priority: 51
2091                             #text_source: global.ux_language_text_source_road_ref_and_name
2092                             font:
2093                                 fill: [0.0,0.0,0.0]
2094                                 size: 17px
2095                                 stroke: { color: [1.00,1.00,1.00], width: 3 }
2096             link:
2097                 filter: { is_link: true } # on- and off-ramps, etc
2098                 draw:
2099                     lines:
2100                         width: [[9, 0px], [10, 0.5px], [14, 2px], [16, 4m], [17, 5m], [18, 6m]]
2101                         outline:
2102                             color: [[10, [0.827,0.827,0.827]], [13, [0.827,0.827,0.827]], [15, [1.000,0.739,0.710]]]
2103                             width: [[10, 0], [11, 1px], [14, 1px], [16, 1.5px], [17, 2px]]
2104             tunnel:
2105                 filter: {is_tunnel: true, $zoom: {min: 13} }
2106                 draw:
2107                     lines:
2108                         color: global.major_tunnel1
2109                         outline:
2110                             color: global.major_tunnel_casing1
2111             secondary:
2112                 filter: { kind_detail: secondary }
2113                 draw:
2114                     lines:
2115                         color: [1.0,1.0,1.0]
2116                         width: [[11, 0.65px], [12, 0.75px], [13, 1.25px], [14, 2px], [15, 5px], [16, 10m], [17, 10m]]
2117                         outline:
2118                             color: [[15, [1.000,0.739,0.710]]]
2119                             width: [[14, 0], [15, 1.75px], [16, 2px], [17, 3px]]
2120                 early:
2121                     filter: { $zoom: { max: 16 } }
2122                     draw:
2123                         lines:
2124                             order: 352
2125                             outline:
2126                                 order: 353 #function() { return feature.sort_rank + 2; }
2127                 routes:
2128                     filter: { ref: true, $zoom: { min: 12} }
2129                     draw:
2130                         lines:
2131                             #order: function() { return feature.sort_rank + 2; }
2132                             color: [1.0,1.0,1.0]
2133                             width: [[11, 0.65px], [12, 0.75px], [13, 1.25px], [14, 2px], [15, 5px], [16, 12m], [17, 12m]]
2134                             outline:
2135                                 color: [0.827,0.827,0.827]
2136                                 width: [[14, 0px], [15,  1.75px], [16, 2px], [17, 3px]]
2137                     early:
2138                         filter: { $zoom: { max: 15 } }
2139                         draw:
2140                             lines:
2141                                 order: function() { return feature.sort_rank + 2; }
2142                                 outline:
2143                                     order: 353
2144                     tunnel:
2145                         filter: {is_tunnel: true, $zoom: {min: 13} }
2146                         draw:
2147                             lines:
2148                                 color: global.major_tunnel1
2149                                 outline:
2150                                     color: global.major_tunnel_casing1
2151                     labels-secondary-routes-default:
2152                         draw:
2153                             text-blend-order:
2154                                 text_source: global.ux_language_text_source_road_ref_and_name_short
2155                     labels-secondary-routes:
2156                         filter: { $zoom: [13] }
2157                         draw:
2158                             text-blend-order:
2159                                 priority: 56
2160                                 visible: global.text_visible_secondary_e
2161                                 #text_source: global.ux_language_text_source_road_ref_and_name_short
2162                                 font:
2163                                     # need fill here?
2164                                     size: 12px
2165                                     stroke: { color: global.text_stroke, width: 4 }
2166                     labels-secondary-routes-z15:
2167                         filter: { $zoom: { min: 15 } }
2168                         draw:
2169                             text-blend-order:
2170                                 priority: 56
2171                                 visible: global.text_visible_secondary_e
2172                                 #text_source: global.ux_language_text_source_road_ref_and_name_short
2173                                 font:
2174                                     # need fill here?
2175                                     weight: 600
2176                                     size: 14px
2177                                     stroke: { color: global.text_stroke, width: 4 }
2178                 in_park:
2179                     filter: { landuse_kind: [park,nature_reserve,conservation,golf_course,garden] }
2180                     draw:
2181                         lines:
2182                             color: [1.0,1.0,1.0]
2183                             outline:
2184                                 color: [[14, [0.800,0.851,0.847]], [15, [0.678,0.796,0.792]]]
2185                                 width: [[12, 0px], [13, 0.5px], [14, 1.0px], [15, 1.0px], [16, 1.5px], [18, 3.0px]]
2186                     golf_course:
2187                         filter: { landuse_kind: golf_course }
2188                         draw:
2189                             lines:
2190                                 outline:
2191                                     color: [0.757,0.839,0.788]
2192                     nature_reserve:
2193                         filter: { landuse_kind: nature_reserve }
2194                         draw:
2195                             lines:
2196                                 outline:
2197                                     color: [0.635,0.819,0.742]
2198                     conservation:
2199                         filter: { landuse_kind: conservation }
2200                         draw:
2201                             lines:
2202                                 outline:
2203                                     color: orange
2204                     zoo:
2205                         filter: { landuse_kind: zoo }
2206                         draw:
2207                             lines:
2208                                 outline:
2209                                     color: pink
2210                 labels-secondary-default:
2211                     draw:
2212                         text-blend-order:
2213                             text_source: global.ux_language_text_source_road_ref_and_name_short
2214                             visible: global.text_visible_secondary
2215                 labels-secondary-z13:
2216                     filter:
2217                         $zoom: [13]
2218                     draw:
2219                         text-blend-order:
2220                             priority: 56
2221                             visible: global.text_visible_secondary_e
2222                             #text_source: global.ux_language_text_source_road_ref_and_name_short
2223                             font:
2224                                 fill: [0.5,0.5,0.5]
2225                                 size: 11px
2226                                 stroke: { color: global.text_stroke, width: 2 }
2227                 labels-secondary-z14:
2228                     filter:
2229                         $zoom: [14]
2230                     draw:
2231                         text-blend-order:
2232                             priority: 56
2233                             visible: global.text_visible_secondary_e
2234                             #text_source: global.ux_language_text_source_road_ref_and_name_short
2235                             font:
2236                                 fill: [0.30,0.30,0.30]
2237                                 size: 12px
2238                                 stroke: { color: [1.00,1.00,1.00], width: 2 }
2239                 labels-secondary-z15:
2240                     filter:
2241                         $zoom: [15]
2242                     draw:
2243                         text-blend-order:
2244                             priority: 56
2245                             #text_source: global.ux_language_text_source_road_ref_and_name_short
2246                             font:
2247                                 fill: [0.10,0.10,0.10]
2248                                 size: 13px
2249                                 stroke: { color: [1.00,1.00,1.00], width: 2 }
2250                 labels-secondary-z16:
2251                     filter: { $zoom: { min: 16, max: 18 } }
2252                     draw:
2253                         text-blend-order:
2254                             priority: 56
2255                             #text_source: global.ux_language_text_source_road_ref_and_name_short
2256                             font:
2257                                 fill: [0.0,0.0,0.0]
2258                                 size: 14.5px
2259                                 stroke: { color: [1.00,1.00,1.00], width: 3 }
2260                 labels-secondary-z18:
2261                     filter: { $zoom: { min: 18 } }
2262                     draw:
2263                         text-blend-order:
2264                             priority: 56
2265                             #text_source: ref
2266                             text_source: global.ux_language_text_source_road_ref_and_name
2267                             font:
2268                                 # need a fill color here?
2269                                 fill: [0.15,0.15,0.15]
2270                                 size: 16px
2271                                 stroke: { color: [1.00,1.00,1.00], width: 3 }
2272             tertiary:
2273                 filter: { kind_detail: [tertiary, tertiary_link] }
2274                 draw:
2275                     lines:
2276                         color: [1.0,1.0,1.0]
2277                         width: [[11, 0.5px], [12, 0.5px], [13, 0.65px], [14, 1.0px], [15, 2px], [16, 8m], [19, 10m]]
2278                         outline:
2279                             color: [0.827,0.827,0.827]
2280                             # todo: look at zoom 13 width
2281                             width: [[15, 0], [16, 1.0px], [18, 3.5px]]
2282                 early:
2283                     filter: { $zoom: { max: 15 } }
2284                     draw:
2285                         lines:
2286                             order: 352
2287                             outline:
2288                                 order: function() { return feature.sort_rank + 3; }
2289                 routes:
2290                     filter: { ref: true, $zoom: { min: 12} }
2291                     draw:
2292                         lines:
2293                             color: [1.0,1.0,1.0]
2294                             width: [[11, 0.5px], [12, 0.5px], [13, 0.65px], [14, 1.0px], [15, 2px], [16, 8m], [19, 10m]]
2295                             outline:
2296                                 color: [0.827,0.827,0.827]
2297                                 width: [[15, 0], [16, 1.0px], [18, 3.5px]]
2298                     early:
2299                         filter: { $zoom: { max: 15 } }
2300                         draw:
2301                             lines:
2302                                 order: function() { return feature.sort_rank + 3; }
2303                                 outline:
2304                                     order: 353
2305                     tunnel:
2306                         filter: {is_tunnel: true, $zoom: {min: 13} }
2307                         draw:
2308                             lines:
2309                                 color: global.major_tunnel1
2310                                 outline:
2311                                     color: global.major_tunnel_casing1
2312                 link:
2313                     filter: { is_link: true } # on- and off-ramps, etc
2314                     draw:
2315                         lines:
2316                             color: global.major_road1
2317                             width: [[10, 0.5px], [14, 2px], [16, 4m], [17, 5m], [18, 6m]]
2318                             outline:
2319                                 color: [[12, global.major_casing2]]
2320                                 width: [[12, 0], [14, 1px], [16, 1.5px], [17, 2px]]
2321                 in_park:
2322                     filter: { landuse_kind: [park,nature_reserve,conservation,golf_course,garden] }
2323                     draw:
2324                         lines:
2325                             #width: [[11, 0.0px], [12, .5px], [14, 1.5px], [16, 2.0px], [19, 7m]]
2326                             color: [[12, [0.9,0.9,0.9]], [13, [0.9,0.9,0.9]], [14, [0.98,0.98,0.98]]]
2327                             outline:
2328                                 color: [[14, [0.800,0.851,0.847]], [15, [0.678,0.796,0.792]]]
2329                                 width: [[12, 0px], [13, 0.5px], [14, 1.0px], [15, 1.0px], [16, 1.5px], [18, 3.0px]]
2330                     golf_course:
2331                         filter: { landuse_kind: golf_course }
2332                         draw:
2333                             lines:
2334                                 outline:
2335                                     color: [0.698,0.835,0.765]
2336                     nature_reserve:
2337                         filter: { landuse_kind: nature_reserve }
2338                         draw:
2339                             lines:
2340                                 outline:
2341                                     color: [0.635,0.819,0.742]
2342                     conservation:
2343                         filter: { landuse_kind: conservation }
2344                         draw:
2345                             lines:
2346                                 outline:
2347                                     color: orange
2348                     zoo:
2349                         filter: { landuse_kind: zoo }
2350                         draw:
2351                             lines:
2352                                 outline:
2353                                     color: pink
2354                 labels-tertiary-default:
2355                     draw:
2356                         text-blend-order:
2357                             text_source: global.ux_language_text_source_road_ref_and_name_short
2358                             visible: global.text_visible_tertiary
2359                 labels-tertiary-z13:
2360                     filter: { $zoom: [13] }
2361                     draw:
2362                         text-blend-order:
2363                             priority: 57
2364                             visible: global.text_visible_tertiary_e
2365                             #text_source: global.ux_language_text_source_road_ref_and_name_short
2366                             font:
2367                                 fill: [0.5,0.5,0.5]
2368                                 size: 10px
2369                                 stroke: { color: [1.00,1.00,1.00], width: 1 }
2370                 labels-tertiary-z14:
2371                     filter: { $zoom: [14] }
2372                     draw:
2373                         text-blend-order:
2374                             priority: 57
2375                             visible: global.text_visible_tertiary_e
2376                             #text_source: global.ux_language_text_source_road_ref_and_name_short
2377                             font:
2378                                 fill: [0.5,0.5,0.5]
2379                                 size: 12px
2380                                 stroke: { color: [1.00,1.00,1.00], width: 1 }
2381                 labels-tertiary-z15:
2382                     filter: { $zoom: [15] }
2383                     draw:
2384                         text-blend-order:
2385                             priority: 57
2386                             #text_source: global.ux_language_text_source_road_ref_and_name_short
2387                             font:
2388                                 fill: [0.3,0.3,0.3]
2389                                 size: 12px
2390                                 stroke: { color: [1.00,1.00,1.00], width: 1 }
2391                 labels-tertiary-z16:
2392                     filter: { $zoom: [16] }
2393                     draw:
2394                         text-blend-order:
2395                             priority: 57
2396                             #text_source: global.ux_language_text_source_road_ref_and_name_short
2397                             font:
2398                                 fill: [0.3,0.3,0.3]
2399                                 size: 14px
2400                                 stroke: { color: [1.00,1.00,1.00], width: 2 }
2401                 labels-tertiary-z17:
2402                     filter: { $zoom: { min: 17, max: 18 } }
2403                     draw:
2404                         text-blend-order:
2405                             priority: 57
2406                             #text_source: global.ux_language_text_source_road_ref_and_name_short
2407                             font:
2408                                 fill: [0.15,0.15,0.15]
2409                                 size: 15px
2410                                 stroke: { color: [1.00,1.00,1.00], width: 2 }
2411                 labels-tertiary-z18:
2412                     filter: { $zoom: { min: 18 } }
2413                     draw:
2414                         text-blend-order:
2415                             priority: 57
2416                             #text_source: global.ux_language_text_source_road_ref_and_name_short
2417                             font:
2418                                 fill: [0.15,0.15,0.15]
2419                                 size: 15px
2420                                 stroke: { color: [1.00,1.00,1.00], width: 2 }
2421         minor_road:
2422             filter: { kind: minor_road, not: { kind_detail: service }, $zoom: { min: 8 } }
2423             draw:
2424                 lines:
2425                     color: [[12, [0.9,0.9,0.9]], [13, [0.9,0.9,0.9]], [14, [1.0,1.0,1.0]]]
2426                     width: [[12, 0.65px], [13, 0.75px], [14, 0.85px], [15, 2px], [16, 8m], [17, 9m]]
2427                     # todo look at when color starts (z11 not z12) and width changes
2428                     #width: [[11, 0.5px], [12, 0.75px], [13, 1.0px], [14, 1.2px], [15, 2.5px], [16, 8m]]
2429                     outline:
2430                         color: [0.843,0.843,0.843]
2431                         width: [[15, 0], [16, 2px], [17, 3px]]
2432             early:
2433                 filter: { $zoom: { max: 16 } }
2434                 draw:
2435                     lines:
2436                         order: 350
2437                         outline:
2438                             order: 351
2439             # Is this junk code?
2440             round:
2441                 filter: { $zoom: { min: 17 } }
2442                 draw:
2443                     lines:
2444                         cap: round
2445                         join: round
2446
2447             in_park:
2448                 filter: { landuse_kind: [park,protected_area,nature_reserve,conservation,golf_course,garden,wood,farmland,farm] }
2449                 draw:
2450                     lines:
2451                         #todo: is the width here right?
2452                         #width: [[11, 0.5px], [12, 1.0px], [13, 1.2px], [14, 1.75px], [15, 2.5px], [16, 8m]]
2453                         color: [[12, [0.9,0.9,0.9]], [13, [0.96,0.96,0.96]], [14, [1.0,1.0,1.0]]]
2454                         outline:
2455                             color: [[14, [0.800,0.851,0.847]], [15, [0.678,0.796,0.792]]]
2456                             #todo: is the width here right?
2457                             width: [[13, 0px], [14, 0.25px], [17, 2.0px], [18, 4.0px]]
2458                 golf_course:
2459                     filter: { landuse_kind: golf_course }
2460                     draw:
2461                         lines:
2462                             outline:
2463                                 color: [0.757,0.839,0.788]
2464                 nature_reserve:
2465                     filter: { landuse_kind: nature_reserve }
2466                     draw:
2467                         lines:
2468                             outline:
2469                                 color: [0.635,0.819,0.742]
2470                 conservation:
2471                     filter: { landuse_kind: conservation }
2472                     draw:
2473                         lines:
2474                             outline:
2475                                 color: orange
2476                 zoo:
2477                     filter: { landuse_kind: zoo }
2478                     draw:
2479                         lines:
2480                             outline:
2481                                 color: pink
2482
2483             # in_residential:
2484             #     filter: { landuse_kind: residential }
2485             #     draw:
2486             #         lines:
2487             #             outline:
2488             #                 color: red
2489             in_university:
2490                 filter: { landuse_kind: university }
2491                 draw:
2492                     lines:
2493                         color: [[12, [0.9,0.9,0.9]], [13, [0.96,0.96,0.96]], [14, [1.0,1.0,1.0]]]
2494                         outline:
2495                             color: [0.806,0.763,0.717]
2496                             width: [[13, 0px], [14, 0.5px], [17, 2.0px], [18, 4.0px]]
2497             in_hospital:
2498                 filter: { landuse_kind: hospital }
2499                 draw:
2500                     lines:
2501                         color: [[12, [0.9,0.9,0.9]], [13, [0.96,0.96,0.96]], [14, [1.0,1.0,1.0]]]
2502                         outline:
2503                             color: [0.818,0.702,0.713]
2504                             width: [[13, 0px], [14, 0.5px], [17, 2.0px], [18, 4.0px]]
2505
2506             tunnel:
2507                 filter: {is_tunnel: true, $zoom: {min: 13} }
2508                 draw:
2509                     lines:
2510                         color: [0.870,0.870,0.870]
2511                         outline:
2512                             color: [0.790,0.790,0.790]
2513             minor_road_bridge:
2514                 filter: { is_bridge: true }
2515                 draw:
2516                     lines:
2517                         cap: round
2518                         outline:
2519                             cap: butt
2520             labels-minor_road-z15:
2521                 filter: { $zoom: 15 }
2522                 draw:
2523                     text-blend-order:
2524                         priority: 59
2525                         visible: global.text_visible_minor_road_e
2526                         text_source: global.ux_language_text_source
2527                         font:
2528                             fill: [0.30,0.30,0.30]
2529                             size: 12px
2530                             stroke: { color: [1.00,1.00,1.00], width: 1 }
2531             labels-minor_road-z16:
2532                 filter: { $zoom: 16 }
2533                 draw:
2534                     text-blend-order:
2535                         priority: 59
2536                         visible: global.text_visible_minor_road_e
2537                         text_source: global.ux_language_text_source
2538                         font:
2539                             fill: [0.35,0.35,0.35]
2540                             size: 14px
2541                             stroke: { color: [1.00,1.00,1.00], width: 2 }
2542             labels-minor_road-z17:
2543                 filter: { $zoom: { min: 17, max: 18 } }
2544                 draw:
2545                     text-blend-order:
2546                         priority: 59
2547                         visible: global.text_visible_minor_road_e
2548                         text_source: global.ux_language_text_source
2549                         font:
2550                             fill: [0.25,0.25,0.25]
2551                             size: 14px
2552                             stroke: { color: [1.00,1.00,1.00], width: 2 }
2553             labels-minor_road-z18:
2554                 filter: { $zoom: { min: 18 } }
2555                 draw:
2556                     text-blend-order:
2557                         priority: 59
2558                         visible: global.text_visible_minor_road
2559                         text_source: global.ux_language_text_source
2560                         font:
2561                             # needs a fill color?
2562                             fill: [0.15,0.15,0.15]
2563                             size: 15px
2564                             stroke: { color: [1.00,1.00,1.00], width: 2 }
2565         service_road:
2566             filter: { kind: minor_road, kind_detail: service }
2567             draw:
2568                 lines:
2569                     color: [[12, [0.9,0.9,0.9]], [14, [0.9,0.9,0.9]], [15, [1.0,1.0,1.0]]]
2570                     # todo: consider starting at z13 with 0.5px
2571                     width: [[12, 0.65px], [13, 0.75px], [14, 0.85px], [15, 1.25px], [16, 2.0px], [18, 6m]]
2572                     outline:
2573                         color: [0.827,0.827,0.827]
2574                         width: [[15, 0px], [16, 0.5px], [17, 1.0px], [18, 1.75px]]
2575
2576             # Is this junk code?
2577             round:
2578                 filter: { $zoom: { min: 17 } }
2579                 draw:
2580                     lines:
2581                         cap: round
2582                         join: round
2583
2584             in_park:
2585                 filter: { landuse_kind: [park,forest,nature_reserve,conservation,golf_course,garden] }
2586                 draw:
2587                     lines:
2588                         #todo: is the color necc here?
2589                         color: [0.976,0.976,0.976]
2590                         outline:
2591                             color: [[14, [0.800,0.851,0.847]], [15, [0.678,0.796,0.792]]]
2592                             width: [[13, 0px], [14, 0.5px], [17, 2.0px], [18, 4.0px]]
2593                 golf_course:
2594                     filter: { landuse_kind: golf_course }
2595                     draw:
2596                         lines:
2597                             outline:
2598                                 color: [0.698,0.835,0.765]
2599                 nature_reserve:
2600                     filter: { landuse_kind: nature_reserve }
2601                     draw:
2602                         lines:
2603                             outline:
2604                                 color: [0.635,0.819,0.742]
2605                 conservation:
2606                     filter: { landuse_kind: conservation }
2607                     draw:
2608                         lines:
2609                             outline:
2610                                 color: orange
2611                 zoo:
2612                     filter: { landuse_kind: zoo }
2613                     draw:
2614                         lines:
2615                             outline:
2616                                 color: pink
2617             in_cemetery_garden:
2618                 filter: { landuse_kind: [cemetery,garden] }
2619                 draw:
2620                     lines:
2621                         outline:
2622                             color: [0.737,0.816,0.753]
2623                             # todo: consider starting z13 with 0.25px
2624                             width: [[13, 0px], [14, 0.5px], [17, 2.0px], [18, 4.0px]]
2625             in_university:
2626                 filter: { landuse_kind: university }
2627                 draw:
2628                     lines:
2629                         #todo: is this necc here?
2630                         color: [1.0,1.0,1.0]
2631                         outline:
2632                             color: [0.806,0.763,0.717]
2633                             width: [[13, 0px], [14, 0.5px], [17, 2.0px], [18, 4.0px]]
2634             in_hospital:
2635                 filter: { landuse_kind: hospital }
2636                 draw:
2637                     lines:
2638                         #todo: is this necc here?
2639                         color: [1.0,1.0,1.0]
2640                         outline:
2641                             color: [0.818,0.702,0.713]
2642                             width: [[13, 0px], [14, 0.5px], [17, 2.0px], [18, 4.0px]]
2643             labels-service_road:
2644                 filter: { $zoom: 17 }
2645                 draw:
2646                     text-blend-order:
2647                         priority: 60
2648                         visible: global.text_visible_service_road
2649                         text_source: global.ux_language_text_source
2650                         font:
2651                             # need fill color?
2652                             fill: [0.25,0.25,0.25]
2653                             size: 13px
2654                             stroke: { color: [1.00,1.00,1.00], width: 2 }
2655             labels-service_road-z18:
2656                 filter: { $zoom: { min: 18 } }
2657                 draw:
2658                     text-blend-order:
2659                         priority: 60
2660                         visible: global.text_visible_service_road
2661                         text_source: global.ux_language_text_source
2662                         font:
2663                             # need fill color?
2664                             fill: [0.15,0.15,0.15]
2665                             size: 14px
2666                             stroke: { color: [1.00,1.00,1.00], width: 2 }
2667
2668         shields:
2669             filter:
2670                 all:
2671                     - $zoom: { min: 6 }
2672                     #
2673                     # United State looks great with shield_text alone, but...
2674                     #
2675                     #shield_text: true    # some roads don't have shield text, deal with that later
2676                     #
2677                     # Europe doesn't have many network relations set, so we could look for either
2678                     # shield_text or ref (with no shield_text) but...
2679                     # that makes United States look a bit funky with `(xxx)` and generic shields
2680                     # showing up in fields of custom state shields like US:CA and US:NY
2681                     #
2682                     - function() { return global.sdk_road_shields; }
2683                     - any:
2684                         - shield_text: true    # some roads don't have shield text, deal with that later
2685                         - all:
2686                             - shield_text: false    # some roads don't have shield text, deal with that later
2687                             - ref: true
2688                             - kind_detail: [motorway, trunk, primary, secondary, tertiary]
2689             # default
2690             draw:
2691                 icons:
2692                     # you need to match any custom shield to the vector tile `network` values
2693                     sprite: |
2694                         function() {
2695                             if( feature.shield_text ) {
2696                                 return ('generic_shield-' + feature.shield_text.length + 'char');
2697                             } else {
2698                                 return ('generic_shield-' + feature.ref.length + 'char');
2699                             }
2700                         }
2701                     sprite_default: generic_shield_5char
2702                     priority: 58
2703                     # Size is specified below, and limited to 5 char in another filter
2704                     repeat_group: shields
2705                     repeat_distance: [[8,90px],[10,40px],[13,30px]]
2706                     placement: midpoint
2707                     placement_min_length_ratio:
2708                         - [8, 0.1]
2709                         - [9, 0.25]
2710                         - [10, 0.25]
2711                         - [11, 0.15]
2712                         - [12, 1]
2713                         - [13, 1.50]
2714                         - [14, 2.0]
2715                     cull_from_tile: true
2716                     visible: false
2717                     text:
2718                         offset: [0px, -0.5px]
2719                         repeat_distance: 200px
2720                         anchor: center
2721                         text_source: |
2722                             function() {
2723                                 if( feature.shield_text ) {
2724                                     return feature.shield_text;
2725                                 } else {
2726                                     return feature.ref;
2727                                 }
2728                             }
2729                         font:
2730                             family: Montserrat
2731                             fill: [0.308,0.308,0.308]
2732                             size: [[7,7px],[12,8px],[15,11px]]
2733
2734             default_priority_highway:
2735                 filter:
2736                     all:
2737                         - kind_detail: motorway
2738                         - $zoom: { min: 9 }
2739                 draw:
2740                     icons:
2741                         priority: 47
2742                         #color: yellow
2743                         visible: global.sdk_road_shields
2744
2745             default_priority_trunk:
2746                 filter:
2747                     all:
2748                         - kind_detail: [trunk]
2749                         - $zoom: { min: 10 }
2750                 draw:
2751                     icons:
2752                         priority: 48
2753                         #color: red
2754                         visible: global.sdk_road_shields
2755             default_priority_primary:
2756                 filter:
2757                     all:
2758                         - kind_detail: [primary]
2759                         - $zoom: { min: 12 }
2760                 draw:
2761                     icons:
2762                         priority: 49
2763                         #color: aqua
2764                         visible: global.sdk_road_shields
2765             default_priority_trunk_secondary:
2766                 filter:
2767                     all:
2768                         - kind_detail: [secondary]
2769                         - $zoom: { min: 12 }
2770                 draw:
2771                     icons:
2772                         priority: 53
2773                         #color: blue
2774                         visible: global.sdk_road_shields
2775             default_priority_trunk_tertiary:
2776                 filter:
2777                     all:
2778                         - kind_detail: tertiary
2779                         - $zoom: { min: 13 }
2780                 draw:
2781                     icons:
2782                         priority: 55
2783                         #color: green
2784                         visible: global.sdk_road_shields
2785
2786             width_1char:
2787                 filter: |
2788                     function() {
2789                         if( feature.shield_text ) {
2790                             return (feature.shield_text.length === 1)
2791                         } else {
2792                             return (feature.ref.length === 1)
2793                         }
2794                     }
2795                 draw:
2796                     icons:
2797                         size: [[6,[14px,14px]],[13,[16px,16px]],[15,[18px,18px]]]
2798             width_2char:
2799                 filter: |
2800                     function() {
2801                         if( feature.shield_text ) {
2802                             return (feature.shield_text.length === 2)
2803                         } else {
2804                             return (feature.ref.length === 2)
2805                         }
2806                     }
2807                 draw:
2808                     icons:
2809                         size: [[6,[18px,14px]],[13,[20px,15px]],[15,[24px,18px]]]
2810             width_3char:
2811                 filter: |
2812                     function() {
2813                         if( feature.shield_text ) {
2814                             return (feature.shield_text.length === 3)
2815                         } else {
2816                             return (feature.ref.length === 3)
2817                         }
2818                     }
2819                 draw:
2820                     icons:
2821                         size: [[6,[25px,14px]],[13,[27px,15px]],[15,[33px,18px]]]
2822             width_4char:
2823                 filter: |
2824                     function() {
2825                         if( feature.shield_text ) {
2826                             return (feature.shield_text.length === 4)
2827                         } else {
2828                             return (feature.ref.length === 4)
2829                         }
2830                     }
2831                 draw:
2832                     icons:
2833                         size: [[6,[29px,14px]],[13,[31px,15px]],[15,[38px,18px]]]
2834                 # London sucks
2835                 early:
2836                     filter: { $zoom: { max: 14 } }
2837                     draw:
2838                         icons:
2839                             visible: false
2840             width_5char:
2841                 filter: |
2842                     function() {
2843                         if( feature.shield_text ) {
2844                             return (feature.shield_text.length === 5)
2845                         } else {
2846                             return (feature.ref.length === 5)
2847                         }
2848                     }
2849                 draw:
2850                     icons:
2851                         size: [[6,[34px,14px]],[13,[37px,15px]],[15,[45px,18px]]]
2852                 # London sucks
2853                 early:
2854                     filter: { $zoom: { max: 14 } }
2855                     draw:
2856                         icons:
2857                             visible: false
2858             # this is kinda a hack
2859             width_longggggg:
2860                 filter: |
2861                     function() {
2862                         if( feature.shield_text ) {
2863                             return (feature.shield_text.length > 5)
2864                         } else {
2865                             return (feature.ref.length > 5)
2866                         }
2867                     }
2868                 draw:
2869                     icons:
2870                         visible: false
2871             #
2872             # Now for the good stuff
2873             #
2874             legit-shields:
2875                 filter: { shield_text: true }
2876                 # draw:
2877                 #     icons:
2878                 #         color: pink
2879
2880                 # US Interstate roads
2881                 US-I:
2882                     filter:
2883                         network: 'US:I'
2884                     draw:
2885                         icons:
2886                             # you need to match any custom shield to the vector tile `network` values
2887                             sprite: function() { return (feature.network + '-' + feature.shield_text.length + 'char'); }
2888                             priority: 46
2889                             visible: global.sdk_road_shields
2890                             text:
2891                                 offset: [0px, 0.5px]
2892                                 font:
2893                                     fill: [0.308,0.308,0.308]
2894                                     size: [[7,8px],[13,9px],[15,11px]]
2895                     width_1char:
2896                         filter: function() { return (feature.shield_text.length === 1) }
2897                         draw:
2898                             icons:
2899                                 size: [[6,[15px,18px]],[13,[17px,20px]],[15,[22px,25px]]]
2900                     width_2char:
2901                         filter: function() { return (feature.shield_text.length === 2) }
2902                         draw:
2903                             icons:
2904                                 size: [[6,[18px,18px]],[13,[20px,20px]],[15,[25px,25px]]]
2905                     width_3char:
2906                         filter: function() { return (feature.shield_text.length === 3) }
2907                         draw:
2908                             icons:
2909                                 size: [[6,[23px,18px]],[13,[26px,20px]],[15,[33px,25px]]]
2910                     width_4char:
2911                         filter: function() { return (feature.shield_text.length === 4) }
2912                         draw:
2913                             icons:
2914                                 size: [[6,[25px,18px]],[13,[27px,20px]],[15,[35px,25px]]]
2915                     width_5char:
2916                         filter: function() { return (feature.shield_text.length === 5) }
2917                         draw:
2918                             icons:
2919                                 size: [[6,[26px,18px]],[13,[30px,20px]],[15,[38px,25px]]]
2920                 # US Federal Routes
2921                 US-US:
2922                     filter:
2923                         network: ['US:US','US:US:Business', 'US:US:Truck', 'US:US:Alternate']
2924                         $zoom: { min: 7 }
2925                     draw:
2926                         icons:
2927                             # you need to match any custom shield to the vector tile `network` values
2928                             sprite: |
2929                                 function() { return ('US:US-' + feature.shield_text.length + 'char'); }
2930                             priority: 47
2931                             cull_from_tile: true
2932                             visible: global.sdk_road_shields
2933                             text:
2934                                 offset: [0px, -0.7px]
2935                                 font:
2936                                     fill: [0.380,0.318,0.312]
2937                                     size: [[7,8px],[13,9px],[15,11px]]
2938                     width_1char:
2939                         filter: function() { return (feature.shield_text.length === 1) }
2940                         draw:
2941                             icons:
2942                                 size: [[6,[15px,17px]],[13,[17px,19px]],[15,[22px,24px]]]
2943                     width_2char:
2944                         filter: function() { return (feature.shield_text.length === 2) }
2945                         draw:
2946                             icons:
2947                                 size: [[6,[18px,17px]],[13,[20px,19px]],[15,[26px,24px]]]
2948                     width_3char:
2949                         filter: function() { return (feature.shield_text.length === 3) }
2950                         draw:
2951                             icons:
2952                                 size: [[6,[22px,17px]],[13,[25px,19px]],[15,[34px,25px]]]
2953                     width_4char:
2954                         filter: function() { return (feature.shield_text.length === 4) }
2955                         draw:
2956                             icons:
2957                                 size: [[6,[25px,17px]],[13,[29px,19px]],[15,[39px,25px]]]
2958                     width_5char:
2959                         filter: function() { return (feature.shield_text.length === 5) }
2960                         draw:
2961                             icons:
2962                                 size: [[6,[27px,17px]],[13,[30px,19px]],[15,[41px,25px]]]
2963                 # US State Routes
2964                 # US-states:
2965                 #     # Match state highways: `US:??`
2966                 #     filter: |
2967                 #         function() {
2968                 #             return feature.shield_text &&
2969                 #                 /^US:(?!US)\w\w$/.test(feature.network)
2970                 #         }
2971                 #     draw:
2972                 #         icons:
2973                 #             # you need to match any custom shield to the vector tile `network` values
2974                 #             #priority: 48
2975                 #             visible: global.sdk_road_shields
2976                 US-CA:
2977                     # Match California state highways: `US:CA`
2978                     filter: |
2979                         function() {
2980                             return feature.shield_text &&
2981                                 /^US:CA$/.test(feature.network)
2982                         }
2983                     draw:
2984                         icons:
2985                             sprite: function() { return (feature.network + '-' + feature.shield_text.length + 'char'); }
2986                             #priority: 48
2987                             text:
2988                                 offset: [0px, 1px]
2989                                 font:
2990                                     fill: [0.308,0.308,0.308]
2991                                     size: [[7,7px],[13,9px],[15,10px]]
2992                     motorway:
2993                         filter: { kind_detail: [motorway], $zoom: [7,8] }
2994                         draw:
2995                             icons:
2996                                 visible: global.sdk_road_shields
2997                     trunk:
2998                         filter: { kind_detail: [trunk], $zoom: [8,9] }
2999                         draw:
3000                             icons:
3001                                 visible: global.sdk_road_shields
3002                     primary:
3003                         filter: { kind_detail: primary, $zoom: [10,11] }
3004                         draw:
3005                             icons:
3006                                 visible: global.sdk_road_shields
3007                     width_1char:
3008                         filter: function() { return (feature.shield_text.length === 1) }
3009                         draw:
3010                             icons:
3011                                 size: [[6,[14px,16px]],[13,[15px,18px]],[15,[18px,21px]]]
3012                     width_2char:
3013                         filter: function() { return (feature.shield_text.length === 2) }
3014                         draw:
3015                             icons:
3016                                 size: [[6,[18px,18px]],[13,[20px,20px]],[15,[23px,23px]]]
3017                     width_3char:
3018                         filter: function() { return (feature.shield_text.length === 3) }
3019                         draw:
3020                             icons:
3021                                 size: [[6,[21px,18px]],[13,[24px,20px]],[15,[28px,23px]]]
3022                     width_4char:
3023                         filter: function() { return (feature.shield_text.length === 4) }
3024                         draw:
3025                             icons:
3026                                 size: [[6,[24px,18px]],[13,[26px,20px]],[15,[31px,23px]]]
3027                     width_5char:
3028                         filter: function() { return (feature.shield_text.length === 5) }
3029                         draw:
3030                             icons:
3031                                 size: [[6,[25px,18px]],[13,[27px,20px]],[15,[32px,23px]]]
3032                 US-NY:
3033                     # Match New York state highways: `US:NY`
3034                     filter: |
3035                         function() {
3036                             return feature.shield_text &&
3037                                 /^US:NY$/.test(feature.network)
3038                                 /* (/^US:NY$/.test(feature.network) || /^NY:US$/.test(feature.network)) */
3039                         }
3040                     draw:
3041                         icons:
3042                             sprite: |
3043                                 function() { return ( 'US:NY-' + feature.shield_text.length + 'char'); }
3044                             text:
3045                                 # offset: [0px, 1px]
3046                                 font:
3047                                     fill: [0.308,0.308,0.308]
3048                                     size: [[7,7px],[13,9px],[15,10px]]
3049                     width_1char:
3050                         filter: function() { return (feature.shield_text.length === 1) }
3051                         draw:
3052                             icons:
3053                                 size: [[6,[13px,17px]],[13,[15px,19px]],[15,[18px,22px]]]
3054                     width_2char:
3055                         filter: function() { return (feature.shield_text.length === 2) }
3056                         draw:
3057                             icons:
3058                                 size: [[6,[17px,17px]],[13,[19px,19px]],[15,[22px,22px]]]
3059                     width_3char:
3060                         filter: function() { return (feature.shield_text.length === 3) }
3061                         draw:
3062                             icons:
3063                                 size: [[6,[20px,17px]],[13,[22px,19px]],[15,[27px,22px]]]
3064                     width_4char:
3065                         filter: function() { return (feature.shield_text.length === 4) }
3066                         draw:
3067                             icons:
3068                                 size: [[6,[21px,17px]],[13,[24px,19px]],[15,[29px,22px]]]
3069                     width_5char:
3070                         filter: function() { return (feature.shield_text.length === 5) }
3071                         draw:
3072                             icons:
3073                                 size: [[6,[22px,17px]],[13,[25px,19px]],[15,[30px,22px]]]
3074                 US-PA:
3075                     # Match Pennsylvania state highways
3076                     filter: |
3077                         function() {
3078                             return feature.shield_text &&
3079                                 /^US:PA$/.test(feature.network)
3080                         }
3081                     draw:
3082                         icons:
3083                             sprite: |
3084                                 function() { return ( 'US:PA-' + feature.shield_text.length + 'char'); }
3085                             text:
3086                                 offset: [0px, 1px]
3087                                 font:
3088                                     fill: [0.308,0.308,0.308]
3089                                     size: [[7,7px],[13,9px],[15,10px]]
3090                     width_1char:
3091                         filter: function() { return (feature.shield_text.length === 1) }
3092                         draw:
3093                             icons:
3094                                 size: [[6,[13px,17px]],[13,[15px,19px]],[15,[18px,22px]]]
3095                     width_2char:
3096                         filter: function() { return (feature.shield_text.length === 2) }
3097                         draw:
3098                             icons:
3099                                 size: [[6,[17px,17px]],[13,[19px,19px]],[15,[22px,22px]]]
3100                     width_3char:
3101                         filter: function() { return (feature.shield_text.length === 3) }
3102                         draw:
3103                             icons:
3104                                 size: [[6,[21px,17px]],[13,[24px,19px]],[15,[28px,22px]]]
3105                     width_4char:
3106                         filter: function() { return (feature.shield_text.length === 4) }
3107                         draw:
3108                             icons:
3109                                 size: [[6,[22px,17px]],[13,[25px,19px]],[15,[30x,22px]]]
3110                     width_5char:
3111                         filter: function() { return (feature.shield_text.length === 5) }
3112                         draw:
3113                             icons:
3114                                 size: [[6,[24px,17px]],[13,[27px,19px]],[15,[32px,22px]]]
3115                 # USA County Routes
3116                 US-counties:
3117                     # Match state highways: `US:??:*`
3118                     #
3119                     # this is very USA specific
3120                     #
3121                     # filter: |
3122                     #     function() {
3123                     #         return feature.shield_text &&
3124                     #             /^US:(?!US)\w\w:.*$/.test(feature.network)
3125                     #     }
3126                     #
3127                     # this generic for any country with 3rd level networks (like county routes in USA)
3128                     # BEWARE:
3129                     # US:US:Business  about 150
3130                     # US:US:Truck
3131                     # US:US:Alternate
3132     #
3133                     # STATE ROUTE
3134                     # ??:??:Loop  about 200
3135                     # ??:??:Spur  about 200
3136                     # ??:??:Business   about 100
3137     #
3138                     # STATE TEXAS SPECIAL ROUTE
3139                     # US:TX:FM -- probably just state? there are 3k of these
3140                     #
3141                     #
3142                     filter: |
3143                         function() {
3144                             return feature.shield_text &&
3145                                 /^\w+:\w+:(!Alternate).+$/.test(feature.network) &&
3146                                 $zoom > 10
3147                         }
3148                     draw:
3149                         icons:
3150                             # you need to match any custom shield to the vector tile `network` values
3151                             sprite: function() { return ('county_shield-' + feature.shield_text.length + 'char'); }
3152                             #color: pink
3153                             #priority: 19
3154                             visible: global.sdk_road_shields
3155                             text:
3156                                 font:
3157                                     fill: [0.508,0.508,0.508]
3158                                     #size: [[11,7px],[15,10px]]
3159                     width_1char:
3160                         filter: function() { return (feature.shield_text.length === 1) }
3161                         draw:
3162                             icons:
3163                                 size: [[6,[14px,14px]],[13,[16px,16px]],[15,[18px,18px]]]
3164                     width_2char:
3165                         filter: function() { return (feature.shield_text.length === 2) }
3166                         draw:
3167                             icons:
3168                                 size: [[6,[16px,14px]],[13,[18px,15px]],[15,[22px,18px]]]
3169                     width_3char:
3170                         filter: function() { return (feature.shield_text.length === 3) }
3171                         draw:
3172                             icons:
3173                                 size: [[6,[20px,14px]],[13,[21px,15px]],[15,[26px,18px]]]
3174                     width_4char:
3175                         filter: function() { return (feature.shield_text.length === 4) }
3176                         draw:
3177                             icons:
3178                                 size: [[6,[25px,14px]],[13,[28px,15px]],[15,[34px,18px]]]
3179                     width_5char:
3180                         filter: function() { return (feature.shield_text.length === 5) }
3181                         draw:
3182                             icons:
3183                                 size: [[6,[30px,14px]],[13,[33px,15px]],[15,[40px,18px]]]
3184         path:
3185             filter:
3186                 all:
3187                     - kind: [path, portage_way]
3188                 not:
3189                     - kind_detail: [steps, track, pier]
3190             draw:
3191                 lines:
3192                     color: [[14, [0.97,0.97,0.97]],[16,[0.96,0.96,0.96]]]
3193                     width: [[14, 0.6px], [16, 1px], [17, 2.5m]]
3194                     outline:
3195                         color: [0.799,0.799,0.799]
3196                         width: [[14, 0], [16, 0.5px], [18, 3px]]
3197             pedestrian:
3198                 filter: { kind_detail: pedestrian }
3199                 draw:
3200                     lines:
3201                         color: [[13, [0.97,0.97,0.97]], [16,[0.96,0.96,0.96]]]
3202                         width: [[13, 1.5], [15, 1.5], [17, 3m]]
3203                         outline:
3204                             color: [0.799,0.799,0.799]
3205                             width: [[17, 0.5], [18, 1]]
3206             corridor:
3207                 filter: { kind_detail: corridor }
3208                 draw:
3209                     lines:
3210                         order: 1000
3211                 early:
3212                     filter: { $zoom: { max: 17 } }
3213                     draw:
3214                         lines:
3215                             visible: false
3216             bridge:
3217                 filter: { is_bridge: true }
3218                 draw:
3219                     lines:
3220                         color: [[15, [1.0,1.0,1.0]], [18, [1.0,1.0,1.0]]]
3221                         width: [[15, 1.5px], [16, 4m], [17, 2m], [18, 2m]]
3222                         cap: round
3223                         outline:
3224                             color: [[15, global.path_bridge_casing2],[16, global.path_bridge_casing1]]
3225                             width: [[15, 0px], [16, 1.0px], [18, 3px]]
3226                             cap: butt
3227             in_park:
3228                 # should `forest` and `wood` be included?
3229                 filter: { landuse_kind: [park,nature_reserve,conservation,golf_course,garden] }
3230                 draw:
3231                     lines:
3232                         color: [[14,white], [16,white], [17, [0.95,0.95,0.95]]]
3233                         outline:
3234                             color: [[16, [0.725,0.847,0.847]], [17, [0.663,0.847,0.843]]]
3235                             width: [[15, 0px], [16, 0.5px], [18, 3px]]
3236                 golf_course:
3237                     filter: { landuse_kind: golf_course }
3238                     draw:
3239                         lines:
3240                             outline:
3241                                 color: [0.698,0.835,0.765]
3242                 nature_reserve:
3243                     filter: { landuse_kind: nature_reserve }
3244                     draw:
3245                         lines:
3246                             outline:
3247                                 color: [0.635,0.819,0.742]
3248                 conservation:
3249                     filter: { landuse_kind: conservation }
3250                     draw:
3251                         lines:
3252                             outline:
3253                                 color: orange
3254             in_cemetery_garden:
3255                 filter: { landuse_kind: [cemetery,garden] }
3256                 draw:
3257                     lines:
3258                         outline:
3259                             color: [0.737,0.816,0.753]
3260                             width: [[15, 0px], [16, 0.5px], [18, 3px]]
3261             in_zoo:
3262                 filter: { landuse_kind: zoo }
3263                 draw:
3264                     lines:
3265                         outline:
3266                             color: [0.708,0.881,0.831]
3267                             width: [[15, 0px], [16, 0.5px], [18, 3px]]
3268             in_university:
3269                 filter: { landuse_kind: university }
3270                 draw:
3271                     lines:
3272                         color: [[14, [0.97,0.97,0.97]], [16,[0.96,0.96,0.96]]]
3273                         outline:
3274                             color: [0.806,0.763,0.717]
3275                             # todo: consider starting 14 at 0px so z15 has a little width
3276                             width: [[15, 0px], [16, 0.5px], [18, 3px]]
3277             in_hospital:
3278                 filter: { landuse_kind: hospital }
3279                 draw:
3280                     lines:
3281                         color: [[14,[0.90,0.90,0.90]],[16,[0.96,0.96,0.96]]]
3282                         outline:
3283                             color: [0.847,0.788,0.796]
3284                             # todo: consider starting 14 at 0px so z15 has a little width
3285                             width: [[15, 0px], [16, 0.5px], [18, 3px]]
3286             labels-path:
3287                 filter: { $zoom: { min: 17 } }
3288                 draw:
3289                     text-blend-order:
3290                         priority: 61
3291                         visible: global.text_visible_path
3292                         text_source: global.ux_language_text_source
3293                         font:
3294                             # need a fill color?
3295                             fill: [0.25,0.25,0.25]
3296                             size: 12px
3297                             stroke: { color: [1.00,1.00,1.00], width: 1 }
3298         track:
3299             filter: { kind: path, kind_detail: track }
3300             draw:
3301                 lines:
3302                     color: [[13, global.minor_road4], [15, global.minor_road3]]
3303                     width: [[13, 0.5px], [14, 1.0px], [15, 1.0px], [16, 6m]]
3304                     #color: [[13, global.minor_road4],[16, global.minor_road3]]
3305                     #width: [[13, 1.0], [15, 1.5], [17, 3m]]
3306                     cap: butt
3307                     join: round
3308                     outline:
3309                         order: 354
3310                         color: global.minor_casing1
3311                         width: [[15, 0px], [16, 0.5px], [17, 1.0px], [18, 2.0px]]
3312             bridge:
3313                 filter: { is_bridge: true }
3314                 draw:
3315                     lines:
3316                         width: [[15, 3.5], [17, 3m]]
3317                         cap: round
3318                         outline:
3319                             color: [[15, global.minor_casing2],[16, global.minor_casing1]]
3320                             width: [[15, 0.5px], [16, 1.0px], [18, 2px]]
3321                             cap: butt
3322             in_park:
3323                 filter: { landuse_kind: [park,national_park,nature_reserve,conservation,golf_course,garden] }
3324                 draw:
3325                     lines:
3326                         width: [[13, 0.5px], [14, 0.5px], [15, 1.0px], [16, 6m]]
3327                         outline:
3328                             color: [[16, global.green1_r],[17, global.major_casing1]]
3329                             width: [[15, 0px], [16, 0.25px], [17, 0.5px], [18, 1.0px], [19, 2.0px]]
3330         steps:
3331             filter:
3332                 all:
3333                     - kind: path
3334                     - kind_detail: steps
3335             draw:
3336                 dashed_steps:
3337                     order: global.feature_order
3338                     color: [0.97,0.97,0.97]
3339                     width: [[14,0.6px],[16,2px],[17,4px],[18,5px],[19,8px],[20,10px]]
3340                     outline:
3341                         color: [0.867,0.867,0.867]
3342                         width: 2px
3343             in_park:
3344                 filter: { landuse_kind: [park,nature_reserve,conservation,golf_course,garden] }
3345                 draw:
3346                     dashed_steps:
3347                         color: [1.0,1.0,1.0]
3348                         outline:
3349                             color: [0.867,0.867,0.867]
3350             in_university:
3351                 filter: { landuse_kind: university }
3352                 draw:
3353                     dashed_steps:
3354                         color: [1.0,1.0,1.0]
3355                         outline:
3356                             color: [0.867,0.867,0.867]
3357             in_hospital:
3358                 filter: { landuse_kind: hospital }
3359                 draw:
3360                     dashed_steps:
3361                         color: [1.0,1.0,1.0]
3362                         outline:
3363                             color: [0.867,0.867,0.867]
3364             labels-steps:
3365                 filter: { $zoom: { min: 17 } }
3366                 draw:
3367                     text-blend-order:
3368                         priority: 62
3369                         visible: global.text_visible_steps
3370                         text_source: global.ux_language_text_source
3371                         font:
3372                             # need fill color?
3373                             size: 12px
3374                             stroke: { color: [1.00,1.00,1.00], width: 1 }
3375         winter_sport_pistes:
3376             filter: { kind: piste }
3377             draw:
3378                 lines:
3379                     order: 388   # We override the server value here because Eraser Map is also a special Ski Map
3380                     cap: round
3381                     join: round
3382                     color: '#909090'
3383                     width: [[13,0px],[14,0.5px],[15, 1px], [16, 1.5px], [18, 3m]]
3384                 text-blend-order:
3385                     priority: 60
3386                     visible: true
3387                     font:
3388                         fill: global.text_fill_piste
3389                         size: 12px
3390                         stroke: { color: global.grey8, width: 4 }
3391             early:
3392                 filter: { $zoom: { max: 15 } }
3393                 draw:
3394                     text-blend-order:
3395                         visible: false
3396             early-z15:
3397                 filter: { $zoom: [15] }
3398                 draw:
3399                     text-blend-order:
3400                         font:
3401                             fill: global.text_fill_piste_e
3402                             size: 11px
3403             easy:
3404                 filter: { piste_difficulty: easy }
3405                 draw:
3406                     lines:
3407                         color: global.piste_easy
3408             intermediate:
3409                 filter: { piste_difficulty: intermediate }
3410                 draw:
3411                     lines:
3412                         color: global.piste_intermediate
3413             advanced:
3414                 filter: { piste_difficulty: advanced }
3415                 draw:
3416                     lines:
3417                         color: global.piste_advanced
3418                     text-blend-order:
3419                         text_source: global.ux_language_text_source_piste_advanced
3420             expert:
3421                 filter: { piste_difficulty: expert }
3422                 draw:
3423                     lines:
3424                         color: global.piste_expert
3425                     text-blend-order:
3426                         text_source: global.ux_language_text_source_piste_expert
3427         pier:
3428             filter: { kind: path, kind_detail: pier }
3429             draw:
3430                 lines:
3431                     color: [0.993,0.993,0.993]
3432                     width: [[13, 0px], [14, 0.5px],[15, 1.5px], [16, 2.5px],[17, 3px],[18, 3m]]
3433                     outline:
3434                         color: [0.675,0.855,0.886]
3435                         width: [[15, 0px],[16,0.65px], [17, 0.75px], [18, 1px], [19, 1.5px]]
3436         racetrack:
3437             filter: { kind: racetrack }
3438             draw:
3439                 lines:
3440                     cap: round
3441                     join: round
3442                     color: [0.600,0.667,0.627]
3443                     width: [[13,0.5px],[14,1px],[15, 1px], [16, 1.5px], [18, 3px], [19, 5px]]
3444         airport-lines:
3445             filter: { kind: aeroway, kind_detail: [runway,taxiway] }
3446             draw:
3447                 lines:
3448                     color: [[10,[0.4,0.4,0.4]],[11,[0.50,0.50,0.50]],[12,[0.7,0.7,0.7]],[13,[0.75,0.75,0.75]],[14,[0.95,0.95,0.95]]]
3449                     cap: butt
3450                     width: [[10,0.75px],[11,1.25px],[12,2px],[13,4px],[14,8px],[15,16px],[16,32px],[17,60m]]
3451                     # outline:
3452                     #     color: [17,[0.95,0.95,0.95]]
3453                     #     width: [17,[60m]]
3454             # Features come in at zoom 9, but include mostly minor airports without POIs until z13
3455             early:
3456                filter: { $zoom: { max: 12 }, not: { landuse_kind: [aerodrome, runway, taxiway] } }
3457                draw:
3458                    lines:
3459                        visible: false
3460             not-round:
3461                 filter: { $zoom: { min: 17 } }
3462                 draw:
3463                     lines:
3464                         cap: butt
3465             taxiway:
3466                 filter: { kind_detail: taxiway }
3467                 draw:
3468                     lines:
3469                         color: [[13,[0.913,0.913,0.913]],[15,[0.923,0.923,0.923]],[16,[0.95,0.95,0.95]]]
3470                         width: [[13,1px],[14,2px],[15,3px],[16,7px],[17,20m]]
3471                         outline:
3472                             color: [0.778,0.778,0.797]
3473                 early:
3474                     filter: { $zoom: { max: 13 } }
3475                     draw:
3476                         lines:
3477                             visible: false
3478         ferry:
3479             filter: { kind: ferry }
3480             draw:
3481                 lines:
3482                     color: [0.702,0.843,0.933]
3483                     width: [[12, 0.5px], [14, 1.0px], [15, 1.0px], [16, 1.25px]]
3484                     outline:
3485                         width: 0
3486         aerialway:
3487             filter: { kind: aerialway }
3488             draw:
3489                 lines:
3490                     color: '#444'
3491                     width: [[14, 0.5px], [15, 1.0px], [16, 2m]]
3492             gondola_cable_car:
3493                 filter: { kind_detail: [gondola, cable_car] }
3494                 draw:
3495                     lines:
3496                         color: [0.498,0.302,0.243]
3497                         width: [[12, 0.5px], [13, 0.5px], [14, 0.6px], [15, 1px], [16, 2px]]
3498                     lines_transparent:
3499                         color: [0.498,0.302,0.243,0.15]
3500                         width: [[12, 0px], [13, 5px], [14, 8px], [15, 10px], [16, 12px]]
3501             chair_lift:
3502                 filter: { kind_detail: chair_lift }
3503                 draw:
3504                     lines:
3505                         color: [0.493,0.541,0.666]
3506                         width: [[12, 0.5px], [13, 0.5px], [14, 0.6px], [15, 1px], [16, 1px], [16, 2px], [18, 3m]]
3507                     lines_transparent:
3508                         color: [0.635,0.698,0.859,0.20]
3509                         width: [[12, 0px], [13, 5px], [14, 8px], [15, 10px], [16, 12px], [18, 20px]]
3510             aerialway-labels:
3511                 filter: { $zoom: { min: 14 } }
3512                 draw:
3513                     text-blend-order:
3514                         priority: 63
3515                         visible: global.text_visible_aerialway
3516                         text_source: global.ux_language_text_source
3517                         font:
3518                             fill: global.text_fill
3519                             size: 12px
3520                             stroke: { color: global.grey8, width: 4 }
3521                 minor:
3522                     filter: { not: { kind_detail: [gondola,cable_car,chair_lift] }, $zoom: { max: 17 } }
3523                     draw:
3524                         text-blend-order:
3525                             visible: false
3526                 early_gondola:
3527                     filter: { $zoom: [14], kind_detail: [gondola,cable_car] }
3528                     draw:
3529                         text-blend-order:
3530                             font:
3531                                 weight: 600
3532                 later:
3533                     filter: { $zoom: { min: 15 } }
3534                     draw:
3535                         text-blend-order:
3536                             font:
3537                                 weight: 600
3538         bridges-tunnels:
3539             filter: { any: [is_bridge: true, is_tunnel: true] }
3540             draw:
3541                 lines:
3542                     outline:
3543                         # except bridges and tunnels, their outlines should also self-sort
3544                         order: global.feature_order
3545
3546         railway-late:
3547             filter: { kind: rail, not: { railway: [subway,light_rail,tram] } }
3548             draw:
3549                 lines:
3550                     order: global.feature_order
3551                     color: [0.588,0.671,0.698]
3552                     width: [[12,0px],[13,0.25px],[14,0.4px],[15,0.75px],[16,0.75px],[18,1m]]
3553             service:
3554                 filter: { service: true }
3555                 draw:
3556                     lines:
3557                         color: [0.588,0.671,0.698]
3558                         width: [[14,0px],[15,0.3px],[16,0.5px],[18,0.75px],[19,0.5m]]
3559             z-order:
3560                 #filter: { $zoom: {min: 12} }
3561                 draw:
3562                     lines:
3563                         # let roads sort themselves past zoom 14
3564                         order: global.feature_order
3565                         # but give them all the same outline
3566                         outline:
3567                             order: 354
3568
3569                 bridges-tunnels:
3570                     filter: { any: [is_bridge: true, is_tunnel: true] }
3571                     draw:
3572                         lines:
3573                             outline:
3574                                 # except bridges and tunnels, their outlines should also self-sort
3575                                 order: function() { return feature.sort_rank || 305; }
3576
3577     buildings:
3578         data: { source: mapzen, layer: buildings }
3579         filter:
3580             not: { location: underground }
3581         # set default footprint and extrusion draw properties, but don't draw by default (rules below will turn visibility on)
3582         draw:
3583             polygons:
3584                 visible: false
3585                 order: 329
3586                 color: global.building2
3587                 #color: |
3588 #                   function() {
3589 #                       if( feature.id ) {
3590 #                           return [
3591 #                               0.7 * (parseInt(feature.id, 16) / 100 % 1),     // jshint ignore:line
3592 #                               0.7 * (parseInt(feature.id, 16) / 10000 % 1),   // jshint ignore:line
3593 #                               0.7 * (parseInt(feature.id, 16) / 1000000 % 1), // jshint ignore:line
3594 #                               1
3595 #                           ];
3596 #                       } else {
3597 #                           if( feature.scale_rank == 6 ) {
3598 #                               return [1.,0.,0.,1];
3599 #                           } else if( feature.scale_rank == 5 ) {
3600 #                               return [0.,1.,0.,1];
3601 #                           } else if( feature.scale_rank == 4 ) {
3602 #                               return [0.,0.,1.,1];
3603 #                           } else if( feature.scale_rank == 3 ) {
3604 #                               return [0.,0.,0.5,1];
3605 #                           } else if( feature.scale_rank == 2 ) {
3606 #                               return [0.,0.5,0.,1];
3607 #                           } else if( feature.scale_rank == 1 ) {
3608 #                               return [0.,0.5,0.,1];
3609 #                           } else if( feature.scale_rank == 0 ) {
3610 #                               return [0.5,0.,0.,1];
3611 #                           } else {
3612 #                               return [0.5,0.5,0.5,1];
3613 #                           }
3614 #                       }
3615 #                   }
3616             lines:
3617                 style: lines
3618                 order: 330
3619                 visible: false
3620                 color: [[13,[0.70,0.70,0.70]],[17,[0.65, 0.65, 0.65]]]
3621                 width: [[13, 0.55px], [15, 0.65px], [16,0.75px], [18, 1.25px]]
3622
3623         # building footprints, pre-extrusion
3624         footprints:
3625             filter:
3626                 # show footprints for buildings at least one zoom level before they will be extruded
3627                 - { $zoom: 13, scale_rank: [1,2] }
3628                 - { $zoom: 14, scale_rank: [1,2,3] }
3629                 - { $zoom: 15, height: { min: 100 } }
3630                 - { $zoom: 15, area: { min: 500 } }
3631                 - { $zoom: 15, volume: { min: 100000 } }
3632                 - { $zoom: 16, area: { min: 100 } }
3633                 - { $zoom: 16, volume: { min: 50000 } }
3634                 - { $zoom: { min: 17 }, area: true }
3635             draw:
3636                 polygons: { visible: true }
3637                 lines: { visible: true }
3638
3639             # 3d buildings
3640             extrude:
3641                 filter:
3642                     all:
3643                         - function() { return global.sdk_building_extrude; }
3644                         - any:
3645                             - { $zoom: 15, height: { min: 190 } }
3646                             - { $zoom: 15, area: { min: 5000 } }
3647                             - { $zoom: 15, volume: { min: 100000 } }
3648                             - { $zoom: 16, height: { min: 100 } }
3649                             - { $zoom: 16, area: { min: 3500 } }
3650                             - { $zoom: 16, volume: { min: 50000 } }
3651                             - { $zoom: 17, area: { min: 500 } }
3652                             - { $zoom: 17, volume: { min: 15000 } }
3653                             - { $zoom: { min: 18 } }
3654                 draw:
3655                     polygons:
3656                         order: 438
3657                         style: building-grid
3658                         extrude: global.building_extrude_height
3659                     lines:
3660                         order: 439
3661                         style: building-lines
3662                         extrude: global.building_extrude_height
3663                 # NOTE: This is a hack to re-enable the building colors per landuse_kind
3664                 # Earlier versions before October 2016 didn't need this hack
3665                 not_landuse:
3666                     filter: { not: { landuse_kind: [station, retail, aerodrome, runway, taxiway, park,forest,nature_reserve,conservation,golf_course,garden, university,school, hospital] } }
3667                     draw:
3668                         polygons:
3669                             color: [0.892,0.880,0.878]
3670
3671         # landuse-specific rules
3672         in_park:
3673             filter:
3674                 landuse_kind: [park,forest,nature_reserve,conservation,golf_course,garden]
3675             draw:
3676                 polygons:
3677                     color: [0.864,0.910,0.905]
3678
3679             # golf_course:
3680             #     filter: { landuse_kind: golf_course }
3681             #     draw:
3682             #         polygons:
3683             #             color: global.building2
3684             # nature_reserve:
3685             #     filter: { landuse_kind: nature_reserve }
3686             #     draw:
3687             #         polygons:
3688             #             color: global.building2
3689             # conservation:
3690             #     filter: { landuse_kind: conservation }
3691             #     draw:
3692             #         polygons:
3693             #             color: global.building2
3694             # zoo:
3695             #     filter: { landuse_kind: zoo }
3696             #     draw:
3697             #         polygons:
3698             #             color: global.building2
3699         in_university:
3700             filter: { landuse_kind: [university,school] }
3701             draw:
3702                 polygons:
3703                     color: [0.950,0.917,0.883]
3704                 lines:
3705                     color: global.brown1_bo
3706         in_hospital:
3707             filter: { landuse_kind: hospital }
3708             draw:
3709                 polygons:
3710                     color: [0.976,0.908,0.913]
3711         in_airport:
3712             filter: { landuse_kind: [aerodrome, runway, taxiway] }
3713             draw:
3714                 polygons:
3715                     color: global.purple_b
3716                 lines:
3717                     color: global.purple_bo
3718                     width: [[14,0.5px],[15,0.5px],[17,0.5px],[18,0.75px],[19,0.25m]]
3719         in_retail:
3720            filter: { landuse_kind: retail }
3721            draw:
3722                 polygons:
3723                     color: [0.945, 0.898, 0.878]
3724
3725         transit-overlay-station-buildings:
3726             filter:
3727                 all:
3728                     - landuse_kind: [station]
3729                     - function() { return global.sdk_transit_overlay; }
3730             draw:
3731                 polygons:
3732                     color: '#bdadbf'
3733                     order: 500
3734                     #extrude: function() { return feature.height || 20; }
3735                 outline:
3736                     style: lines
3737                     order: 501
3738                     color: '#d534df'
3739                     width: [[14,0.1px],[15,0.5px],[17,0.5px],[18,0.75px],[19,0.25m]]
3740                     #extrude: function() { return feature.height || 20; }
3741
3742         buildings-labels:
3743             filter:
3744                 all:
3745                     - { $zoom: { min: 17 } }
3746                     - $geometry: point
3747                     - not: { location: underground, kind: address }
3748                     - name: true
3749                     - function() { return global.text_visible_building; }
3750     #                - kind: [false, building, university, college, school, kindergarten]
3751                 any:
3752                     - { $zoom: [16], area: { min: 5000 } }
3753                     - { $zoom: [16], area: { min: 5000 } }
3754                     - { $zoom: [16], area: { min: 10000 }, landuse_kind: true }
3755                     - { $zoom: [16], area: { min: 7000 }, kind_detail: [university, college, school, kindergarten] }
3756                     - { $zoom: [16], volume: { min: 50000 }, name: true }
3757                     - { $zoom: [17], area: { min: 3000 } }
3758                     - { $zoom: [17], area: { min: 2000 }, kind_detail: [university, college, school, kindergarten] }
3759                     - { $zoom: [18], area: { min: 1000 } }
3760                     - { $zoom: [18], kind_detail: [university, college, school, kindergarten] }
3761                     - { $zoom: [19], area: { min: 200 } }
3762                     - { $zoom: { min: 19 }, kind_detail: [university, college, school, kindergarten] }
3763                     - { $zoom: { min: 20 }, area: true }
3764             draw:
3765                 text-blend-order:
3766                     text_source: global.ux_language_text_source
3767                     move_into_tile: true
3768                     priority: 70
3769                     order: 7
3770                     font:
3771                         fill: '#666'
3772                         family: global.text_font_family
3773                         style: italic
3774                         size: 11px
3775                         stroke: { color: global.text_stroke_address, width: 1 }
3776             building_labels-z15-z16-z17:
3777                 filter: { $zoom: [15,16,17] }
3778                 draw: { text-blend-order: { font: { size: 12px, stroke: { width: 2 } } } }
3779             building_labels-z18:
3780                 filter: { $zoom: [18,19] }
3781                 draw: { text-blend-order: { font: { size: 12px, weight: 600, stroke: { width: 3 } } } }
3782             building_labels-z20-up:
3783                 filter: { $zoom: { min: 20 } }
3784                 draw: { text-blend-order: { font: { size: 14px, weight: 600, stroke: { width: 3 }  } } }
3785             building-labels-z16:
3786                 filter: function() { if( $zoom == 16 && feature.name.length > 20 ) { return true; } else { return false; } }
3787                 draw:
3788                     text-blend-order:
3789                         visible: false
3790             building-labels-z17:
3791                 filter: function() { if( $zoom == 17 && feature.name.length > 30 ) { return true; } else { return false; } }
3792                 draw:
3793                     text-blend-order:
3794                         visible: false
3795             building-labels-z20+:
3796                 filter: { $zoom: { min: 20 } }
3797                 draw:
3798                     text-blend-order:
3799                         text_source: global.ux_language_text_source_building_and_address
3800         address-labels:
3801             filter:
3802                 $zoom: { min: 20 }
3803                 any:
3804                     - kind: address
3805                     - { label_position: true, addr_housenumber: true, name: false }
3806                 all:
3807                     - function() { return global.text_visible_address; }
3808             draw:
3809                 text-blend-order:
3810                     order: 7
3811                     text_source: addr_housenumber
3812                     font:
3813                         fill: global.text_fill_address
3814                         family: global.text_font_family
3815                         style: italic
3816                         size: 10px
3817                         stroke: { color: global.text_stroke_address, width: 4 }
3818
3819     boundaries:
3820         data: { source: mapzen, layer: boundaries }
3821         # country subdivisions (states, provinces)
3822         draw:
3823             lines:
3824                 order: global.feature_order
3825 #                color: red
3826 #                width: [[9, 1px], [14, 2px], [16, 3px], [17, 8m]]
3827         country:
3828             filter:
3829                 any:
3830                     - kind: country
3831                     - admin_level: 2
3832             draw:
3833                 lines:
3834                     color: global.country_boundary
3835                     width: [[1, 0.5px], [2, 1.0px], [4, 1.5px], [8, 2.5px], [14, 3.5px], [16, 4.5px], [17, 14m]]
3836             water:
3837                 filter: { maritime_boundary: true }
3838                 draw:
3839                     lines:
3840                         visible: false
3841             labels-z9-up:
3842                 filter: { name: true, $zoom: { min: 9 }, not: { maritime_boundary: true } }
3843                 draw:
3844                     text-blend-order:
3845                         priority: 2
3846                         visible: global.text_visible_admin
3847                         text_source: global.ux_language_text_source_boundary_lines
3848                         text_wrap: 100px
3849                         font:
3850                             family: Varela
3851                             size: 9px
3852                             weight: 300
3853                             fill: [0.25,0.25,0.25]
3854                             # stroke: { color: global.text_stroke, width: 4 }
3855                             transform: uppercase
3856         other_country_boundary_disputed_etc:
3857             filter: { kind: [disputed, indefinite, indeterminate, lease_limit, line_of_control, overlay_limit] }
3858             draw:
3859                 dashed:
3860                     order: global.feature_order
3861                     color: global.country_boundary
3862                     width: [[1, 0.2px], [2, 0.5px], [4, 1.0px], [9, 1.5px], [14, 2.5px], [16, 3.5px], [17, 10m]]
3863             disputed:
3864                 filter: { kind: [disputed, line_of_control] }
3865                 draw:
3866                     dashed:
3867                         visible: false
3868                     dashed_big:
3869                         order: global.feature_order
3870                         color: global.country_boundary
3871                         #width: [[1, 0.2px], [2, 0.5px], [4, 1.0px], [9, 1.5px], [14, 2.5px], [16, 3.5px], [17, 10m]]
3872                         width: [[1, 0.5px], [2, 1.0px], [4, 1.5px], [9, 2.5px], [14, 3.5px], [16, 4.5px], [17, 14m]]
3873         region:
3874             filter:
3875                 any:
3876                     - kind: [region,macroregion]
3877                     - kind_detail: [3,4]
3878             draw:
3879                 lines:
3880                     color: global.region_boundary
3881                     width: [[0, 0.5px], [2, 1.0px], [5, 1.25px], [6, 1.5px], [7, 1.75px], [8, 2.0px], [9, 3.5px], [14, 5.5px], [16, 6.5px], [17, 16m]]
3882             water:
3883                 filter: { maritime_boundary: true }
3884                 draw:
3885                     lines:
3886                         visible: false
3887             early:
3888                 filter: { not: { min_zoom: [1,2] }, $zoom: { max: 8 } }
3889                 draw:
3890                     lines:
3891                         visible: false
3892             labels-z9-up:
3893                 filter: { name: true, $zoom: { min: 9 }, not: { maritime_boundary: true } }
3894                 draw:
3895                     text-blend-order:
3896                         priority: 3
3897                         visible: global.text_visible_admin
3898                         text_source: global.ux_language_text_source_boundary_lines
3899                         text_wrap: 100px
3900                         offset: 10px
3901                         anchor: top
3902                         font:
3903                             family: Varela
3904                             size: 9px
3905                             weight: 200
3906                             fill: [0.4,0.4,0.4]
3907                             # stroke: { color: global.text_stroke, width: 4 }
3908                             transform: uppercase
3909         city_walls:
3910             filter: { kind: city_wall }
3911             draw:
3912                 lines:
3913                     color: global.city_wall
3914                     width: [[12, 0.75px], [13, 1.0px], [14, 1.2px], [15, 2.0px], [16, 2.5px], [19, 6m]]
3915         retaining_wall:
3916             filter: { kind: retaining_wall }
3917             draw:
3918                 lines:
3919                     color: global.retaining_wall
3920                     width: [[14, 0.5px], [15, 1.0px], [16, 1.5px], [17, 2.0px], [19, 4m]]
3921         snow_fence:
3922             filter: { kind: snow_fence }
3923             draw:
3924                 lines:
3925                     color: global.snow_fence
3926                     width: [[14, 0.5px], [15, 1.0px], [16, 1.5px], [17, 2.0px], [19, 1.5m]]
3927         fence:
3928             filter: { kind: fence }
3929             draw:
3930                 lines:
3931                     color: global.fence
3932                     width: [[14, 0.5px], [15, 1.0px], [16, 1.5px], [17, 2.0px], [19, 1.5m]]
3933
3934     places:
3935         data: { source: mapzen, layer: places }
3936         filter:
3937             name: true
3938         draw:
3939             icons:
3940                 text:
3941                     text_source: global.ux_language_text_source
3942                     visible: false    # labels are enabled by each layer below
3943                     buffer: 3px
3944                     font:
3945                         family: Varela
3946                         fill: global.text_fill
3947             # NOTE: This is a hack for localities because of an icon & text bug, see note below
3948             text-blend-order:
3949                 text_source: global.ux_language_text_source
3950                 visible: false    # labels are enabled by each layer below
3951                 buffer: 3px
3952                 font:
3953                     family: Varela
3954                     fill: global.text_fill
3955             # END NOTE
3956
3957         country:
3958             filter:
3959                 kind: country
3960                 $zoom: { min: 2, max: 9 }
3961             draw:
3962                 text-blend-order:
3963                     priority: 3
3964                     visible: global.text_visible_admin
3965                     font:
3966                         fill: [[2,[0.357,0.243,0.184]],[6,[0.604,0.437,0.427]]]
3967                         transform: uppercase
3968             country-z2-z3:
3969                 filter:
3970                     $zoom: [2,3]
3971                 draw:
3972                     text-blend-order:
3973                         priority: 10
3974                         buffer: 10px
3975                         font:
3976                             size: 10px
3977                 early-ones-z2:
3978                     filter:
3979                         $zoom: [2]
3980                         not: { name: [United States of America,Brasil,中华人民共和国,Россия,Canada,Kalaallit Nunaat,Ísland,Australia,India,日本,Guam,Indonesia,South Africa,مصر,Nigeria,Kenya] }
3981                     draw:
3982                         text-blend-order:
3983                             visible: false
3984                 early-ones-z3:
3985                     filter:
3986                         $zoom: [3]
3987                         name: [Nederland,Luxembourg,Liechtenstein,San Marino,Civitatis Vaticanæ,Crna Gora,Македонија,The Gambia,Burundi,Swaziland,الإمارات العربية المتحدة,العراق,Singapore,El Salvador,Belize,Trinidad and Tobago, Saint Lucia, Montserrat,Anguilla,República Dominicana,Bahamas,British Virgin Islands,Antigua and Barbuda,Grenada,Sint Maarten,Saint Kitts and Nevis,Cayman Islands,België - Belgique - Belgien,Deutschland,España]
3988                     draw:
3989                         text-blend-order:
3990                             visible: false
3991             country-z4:
3992                 filter:
3993                     $zoom: [4]
3994                 draw:
3995                     text-blend-order:
3996                         buffer: 10px
3997                         priority: 8
3998                         font:
3999                             size: 11px
4000                 early-ones-z4:
4001                     filter:
4002                         name: [Nederland,Luxembourg,Liechtenstein,San Marino,Civitatis Vaticanæ,Crna Gora,Македонија,The Gambia,Burundi,Swaziland,الإمارات العربية المتحدة,العراق,Singapore,El Salvador,Belize,Trinidad and Tobago, Saint Lucia, Montserrat,Anguilla,República Dominicana,Bahamas,British Virgin Islands,Antigua and Barbuda,Grenada,Sint Maarten,Saint Kitts and Nevis,Cayman Islands,België - Belgique - Belgien,Deutschland,España,Magyarország,Österreich,Polska,Хуссар Ирыстон,Аҧсны - Абхазия]
4003                     draw:
4004                         text-blend-order:
4005                             visible: false
4006             country-z5:
4007                 filter:
4008                     $zoom: [5]
4009                 draw:
4010                     text-blend-order:
4011                         priority: 8
4012                         font:
4013                             size: 13px
4014                 early-ones-z5:
4015                     filter:
4016                         # South Ossetia and Abkhazia aren't countries (they are disputed areas)
4017                         - name: [Luxembourg,Liechtenstein,San Marino,Civitatis Vaticanæ,El Salvador,Belize,België - Belgique - Belgien,"Хуссар Ирыстон - Южная Осетия","Хуссар Ирыстон","Аҧсны - Абхазия","Լեռնային Ղարաբաղի Հանրապետությու (Nagorno-Karabakh Republic)"]
4018                         - population: { max: 5000000 }
4019                     draw:
4020                         text-blend-order:
4021                             visible: false
4022             country-z6:
4023                 filter:
4024                     $zoom: [6]
4025                 draw:
4026                     text-blend-order:
4027                         priority: 8
4028                         font:
4029                             size: 16px
4030                 small-ones-z6:
4031                     filter:
4032                         # South Ossetia and Abkhazia aren't countries (they are disputed areas)
4033                         - name: [Luxembourg,Liechtenstein,San Marino,Civitatis Vaticanæ,België - Belgique - Belgien,"Хуссар Ирыстон - Южная Осетия","Хуссар Ирыстон","Аҧсны - Абхазия","Լեռնային Ղարաբաղի Հանրապետությու (Nagorno-Karabakh Republic)"]
4034                         - population: { max: 5000000 }
4035                     draw:
4036                         text-blend-order:
4037                             visible: false
4038             country-z7:
4039                 filter:
4040                     $zoom: { min: 7, max: 9 }
4041                 draw:
4042                     text-blend-order:
4043                         font:
4044                             size: [[7,18px],[9,24px]]
4045                 small-ones-z7:
4046                     filter:
4047                         $zoom: [7]
4048                         # South Ossetia and Abkhazia aren't countries (they are disputed areas)
4049                         name: [Liechtenstein,San Marino,Civitatis Vaticanæ,"Хуссар Ирыстон - Южная Осетия","Хуссар Ирыстон","Аҧсны - Абхазия","Լեռնային Ղարաբաղի Հանրապետությու (Nagorno-Karabakh Republic)"]
4050                     draw:
4051                         text-blend-order:
4052                             visible: false
4053                 small-pop:
4054                     filter:
4055                         - population: { max: 5000000 }
4056                     draw:
4057                         text-blend-order:
4058                             priority: 30
4059                             font:
4060                                 size: 12px
4061
4062         region:
4063             filter:
4064                 kind: region
4065                 $zoom: { min: 4, max: 9 }
4066             draw:
4067                 text-blend-order:
4068                     priority: 14
4069                     visible: false
4070                     text_source: global.ux_language_text_source_short
4071                     font:
4072                         size: 10px
4073                         weight: 300
4074                         fill: [0.3,0.3,0.3]
4075             region-z4:
4076                 filter:
4077                     $zoom: [4]
4078                     not: { name: [Western Cape,Eastern Cape,Northern Cape,North West,Limpopo,KwaZulu-Natal,Hamburg,Freie und Hansestadt Hamburg,Neuchâtel,Nordrhein-Westfalen,Haute-Normandie,Baden-Württemberg,Bayern,Sachsen-Anhalt,Berlin,Mecklenburg-Vorpommern,Schleswig-Holstein,Brandenburg,Niedersachsen,Saarland,Thüringen,Hessen,Sachsen] }
4079                 draw:
4080                     text-blend-order:
4081                         visible: global.text_visible_admin
4082             region-z5:
4083                 filter:
4084                     $zoom: [5]
4085                     not: { name: [Western Cape,Eastern Cape,Northern Cape,North West,Limpopo,KwaZulu-Natal,Hamburg,Freie und Hansestadt Hamburg,Neuchâtel,Nordrhein-Westfalen,Haute-Normandie,Baden-Württemberg,Bayern,Sachsen-Anhalt,Berlin,Mecklenburg-Vorpommern,Schleswig-Holstein,Brandenburg,Niedersachsen,Saarland,Thüringen,Hessen,Sachsen] }
4086                 draw:
4087                     text-blend-order:
4088                         visible: global.text_visible_admin
4089                         font:
4090                             size: 13px
4091             region-z6:
4092                 filter:
4093                     $zoom: [6]
4094                     not: { name: [Western Cape,Eastern Cape,Northern Cape,North West,Limpopo,KwaZulu-Natal,Hamburg,Freie und Hansestadt Hamburg,Neuchâtel,Nordrhein-Westfalen,Haute-Normandie,Baden-Württemberg,Bayern,Sachsen-Anhalt,Berlin,Mecklenburg-Vorpommern,Schleswig-Holstein,Brandenburg,Niedersachsen,Saarland,Thüringen,Hessen,Sachsen] }
4095                 draw:
4096                     text-blend-order:
4097                         visible: global.text_visible_admin
4098                         font:
4099                             size: 15px
4100                             fill: [0.4,0.4,0.4]
4101             region-z7-z8:
4102                 filter: { $zoom: [7,8] }
4103                 draw:
4104                     text-blend-order:
4105                         visible: global.text_visible_admin
4106                         text_source: global.ux_language_text_source_short_proxy_name
4107                         font:
4108                             size: [[7,15px],[8,16px]]
4109                             fill: [0.5,0.5,0.5]
4110                             transform: uppercase
4111                 pesky-z7:
4112                     filter:
4113                         $zoom: [7]
4114                         name: [Western Cape,Eastern Cape,Northern Cape,North West,Limpopo,KwaZulu-Natal,Hamburg,Freie und Hansestadt Hamburg,Neuchâtel,Nordrhein-Westfalen,Haute-Normandie,Baden-Württemberg,Bayern,Sachsen-Anhalt,Berlin,Mecklenburg-Vorpommern,Schleswig-Holstein,Brandenburg,Niedersachsen,Saarland,Thüringen,Hessen,Sachsen]
4115                     draw:
4116                         text-blend-order:
4117                             visible: false
4118                 abbrev-small-ones-z7:
4119                     filter:
4120                         $zoom: [7]
4121                         name: [Delaware,New Jersey,Connecticut,Rhode Island,Massachusetts,New Hampshire,Vermont]
4122                     draw:
4123                         text-blend-order:
4124                             text_source: global.ux_language_text_source_abbreviation
4125                             font: { transform: uppercase }
4126                 region-z8:
4127                     filter:
4128                         $zoom: [8]
4129                     draw:
4130                         text-blend-order:
4131                             text_source: global.ux_language_text_source
4132                     no-pop:
4133                         filter:
4134                             any:
4135                                 - population: false
4136                                 - population: { max: 1000000 }
4137                         draw:
4138                             text-blend-order:
4139                                 font:
4140                                     size: 13px
4141
4142         populated-places:
4143             filter:
4144                 kind: locality
4145             draw:
4146                 icons:
4147                     visible: global.icon_visible_populated_places
4148                     size: [[10,4px],[11,0px]]
4149                     sprite: townspot-xs-rev
4150                     buffer: 8px
4151                     priority: 30
4152                     # debug testing
4153                     #collide: false
4154                     text:
4155                         visible: global.text_visible_populated_places
4156                         font:
4157                             size: [[5,9px],[8,10px],[12,11px]]
4158                 text-blend-order:
4159                     visible: global.text_visible_populated_places
4160                     buffer: 8px
4161                     font:
4162                         size: [[5,9px],[8,10px],[12,11px]]
4163
4164             #
4165             # NOTE: you'd think no-townspot would be the way to go, but icons with size 0px seems to have a bug to also hide the text :(
4166             #
4167             # no-townspot:
4168             #     filter: { $zoom: { min: 11 } }
4169             #     draw:
4170             #         icons:
4171             #             size: 0px
4172             #             text:
4173             #                 anchor: center
4174             #
4175             # NOTE: So instead we play a shell game with symbolizers per zoom
4176             #
4177             _icons_later:
4178                 filter: { $zoom: { min: 11 } }
4179                 draw:
4180                     icons:
4181                         visible: false
4182                     text-blend-order:
4183                         visible: global.text_visible_populated_places
4184             _text_early:
4185                 filter: { $zoom: { max: 11 } }
4186                 draw:
4187                     text-blend-order:
4188                         visible: false
4189             # END HACK
4190
4191             z8-50k-below:
4192                 filter: { $zoom: [8,9], population: { min: 10000, max: 50000 } }
4193                 draw:
4194                     icons:
4195                         buffer: 25px
4196                         #color: red
4197                         #visible: false
4198             z9-10k-below:
4199                 filter: { $zoom: [8,9], population: { max: 10000 } }
4200                 draw:
4201                     icons:
4202                         buffer: 18px
4203                         #color: blue
4204                         #visible: false
4205             z9-no-population:
4206                 filter: { $zoom: [8,9], population: false }
4207                 draw:
4208                     icons:
4209                         buffer: 10px
4210                         #color: yellow
4211                         #visible: false
4212
4213             sorry-denver:
4214                 filter:
4215                     $zoom: [3]
4216                     name: [Denver]
4217                 draw:
4218                     icons:
4219                         visible: false
4220
4221             # HACK
4222             # NOTE: These should use icon: buffer instead of going visible: false, but there are problems using icon here :(
4223             # This fixes Paris area, but causes problems for small places in the USA eg Table Bluff near Eureka, California.
4224             funky-village:
4225                 filter: { $zoom: [11], population: { max: 1000 }, kind_detail: [village] }
4226                 draw:
4227                     text-blend-order:
4228                         visible: false
4229             funky-isolated_dwelling:
4230                 filter: { $zoom: [13], kind_detail: [isolated_dwelling] }
4231                 draw:
4232                     text-blend-order:
4233                         visible: false
4234             hamlet:
4235                 filter: { $zoom: [13], kind_detail: hamlet }
4236                 draw:
4237                     text-blend-order:
4238                         visible: false
4239             # END HACK
4240
4241             # someone in London and Salt Lake City thought neighbourhoods should be tagged place: locality
4242             # They were wrong
4243             funky-fake-neighbourhoods:
4244                 filter: { $zoom: { min: 13 }, kind_detail: [locality] }
4245                 draw:
4246                     text-blend-order:
4247                         visible: false
4248
4249             population-10m-up:
4250                 filter:
4251                     population: { min: 10000000 }
4252                 draw:
4253                     icons:
4254                         size: [[4,5px],[8,6px],[9,0px]]
4255                         sprite: townspot-m-rev
4256                         priority: 6
4257                         text:
4258                             font:
4259                                 size: [[2,11px],[6,15px],[8,16px],[10,18px],[12,18px],[13,0px]]
4260                     text-blend-order:
4261                         priority: 6
4262                         font:
4263                             size: [[2,11px],[6,15px],[8,16px],[10,18px],[12,18px],[13,0px]]
4264                 capital:
4265                     # we only want townspots to show as capital dots starting at zoom 5
4266                     filter: { country_capital: true, $zoom: { min: 5 } }
4267                     draw:
4268                         icons:
4269                             size: [[10,8px],[11,0px]]
4270                             sprite: capital-l
4271                             priority: 5
4272                         text-blend-order:
4273                             priority: 5
4274             population-5m-10m:
4275                 filter:
4276                     population: { min: 5000000, max: 10000000 }
4277                 draw:
4278                     icons:
4279                         size: [[4,5px],[8,6px],[9,0px]]
4280                         sprite: townspot-m-rev
4281                         priority: 7
4282                         text:
4283                             font:
4284                                 size: [[4,10px],[6,13px],[8,16px],[10,18px],[12,18px],[13,0px]]
4285                     text-blend-order:
4286                         priority: 7
4287                         font:
4288                             size: [[4,10px],[6,13px],[8,16px],[10,18px],[12,18px],[13,0px]]
4289                 capital:
4290                     # we only want townspots to show as capital dots starting at zoom 5
4291                     filter: { country_capital: true, $zoom: { min: 5 } }
4292                     draw:
4293                         icons:
4294                             size: [[10,8px],[11,0px]]
4295                             sprite: capital-l
4296                             priority: 6
4297                         text-blend-order:
4298                             priority: 6
4299             population-1m-5m:
4300                 filter:
4301                     population: { min: 1000000, max: 5000000 }
4302                 draw:
4303                     icons:
4304                         size: [[4,5px],[8,6px],[9,0px]]
4305                         sprite: townspot-m-rev
4306                         priority: 9
4307                         text:
4308                             font:
4309                                 size: [[4,10px],[6,13px],[8,16px],[10,18px],[12,18px],[13,0px]]
4310                     text-blend-order:
4311                         priority: 9
4312                         font:
4313                             size: [[4,10px],[6,13px],[8,16px],[10,18px],[12,18px],[13,0px]]
4314                 capital:
4315                     # we only want townspots to show as capital dots starting at zoom 5
4316                     filter: { country_capital: true, $zoom: { min: 5 } }
4317                     draw:
4318                         icons:
4319                             size: [[10,8px],[11,0px]]
4320                             sprite: capital-l
4321                             priority: 8
4322                         text-blend-order:
4323                             priority: 8
4324             population-500k-1m:
4325                 filter:
4326                     population: { min: 500000, max: 1000000 }
4327                 draw:
4328                     icons:
4329                         size: [[8,6px],[9,0px]]
4330                         sprite: townspot-m-rev
4331                         priority: 11
4332                         text:
4333                             font:
4334                                 size: [[5,10px],[8,14px],[10,14px],[12,16px],[13,0px]]
4335                     text-blend-order:
4336                         priority: 11
4337                         font:
4338                             size: [[5,10px],[8,14px],[10,14px],[12,16px],[13,0px]]
4339                 capital:
4340                     filter: { country_capital: true, $zoom: { min: 5 } }
4341                     draw:
4342                         icons:
4343                             size: [[10,6px],[11,0px]]
4344                             sprite: capital-m
4345                             priority: 10
4346                         text-blend-order:
4347                             priority: 10
4348             population-200k-500k:
4349                 filter:
4350                     population: { min: 200000, max: 500000 }
4351                 draw:
4352                     icons:
4353                         size: [[8,6px],[9,6px],[10,6px],[11,0px]]
4354                         sprite: townspot-m-rev
4355                         priority: 13
4356                         text:
4357                             font:
4358                                 size: [[6,10px],[8,12px],[10,14px],[12,16px],[13,0px]]
4359                     text-blend-order:
4360                         priority: 13
4361                         font:
4362                             size: [[6,10px],[8,12px],[10,14px],[12,16px],[13,0px]]
4363                 capital:
4364                     filter: { country_capital: true, $zoom: { min: 5 } }
4365                     draw:
4366                         icons:
4367                             size: [[10,6px],[11,0px]]
4368                             sprite: capital-m
4369                             priority: 12
4370                         text-blend-order:
4371                             priority: 12
4372             population-100k-200k:
4373                 filter:
4374                     population: { min: 100000, max: 200000 }
4375                 draw:
4376                     icons:
4377                         size: [[8,6px],[9,6px],[10,6px],[11,0px]]
4378                         sprite: townspot-m-rev
4379                         priority: 15
4380                         text:
4381                             font:
4382                                 size: [[6,10px],[8,12px],[10,12px],[12,14px],[14,14px],[15,0px]]
4383                     text-blend-order:
4384                         priority: 15
4385                         font:
4386                             size: [[6,10px],[8,12px],[10,12px],[12,14px],[14,14px],[15,0px]]
4387                 capital:
4388                     filter: { country_capital: true, $zoom: { min: 5 } }
4389                     draw:
4390                         icons:
4391                             size: [[10,6px],[11,0px]]
4392                             sprite: capital-m
4393                             priority: 14
4394                         text-blend-order:
4395                             priority: 14
4396             population-50k-100k:
4397                 filter:
4398                     population: { min: 50000, max: 100000 }
4399                 draw:
4400                     icons:
4401                         size: [[8,5px],[9,5px],[10,6px],[11,0px]]
4402                         sprite: townspot-s-rev
4403                         priority: 17
4404                         text:
4405                             font:
4406                                 fill: [0.30,0.30,0.30]
4407                                 size: [[6,10px],[8,11px],[10,12px],[12,14px],[14,14px],[15,0px]]
4408                     text-blend-order:
4409                         priority: 17
4410                         font:
4411                             fill: [0.30,0.30,0.30]
4412                             size: [[6,10px],[8,11px],[10,12px],[12,14px],[14,14px],[15,0px]]
4413                 capital:
4414                     filter: { country_capital: true, $zoom: { min: 5 } }
4415                     draw:
4416                         icons:
4417                             size: [[10,5px],[11,0px]]
4418                             sprite: capital-m
4419                             priority: 16
4420                         text-blend-order:
4421                             priority: 16
4422             population-20k-50k:
4423                 filter:
4424                     population: { min: 20000, max: 50000 }
4425                 draw:
4426                     icons:
4427                         size: [[8,5px],[9,5px],[10,5px],[11,0px]]
4428                         sprite: townspot-s-rev
4429                         priority: 19
4430                         text:
4431                             font:
4432                                 fill: [0.30,0.30,0.30]
4433                                 size: [[9,11px],[12,12px],[14,12px],[15,0px]]
4434                     text-blend-order:
4435                         priority: 19
4436                         font:
4437                             fill: [0.30,0.30,0.30]
4438                             size: [[9,11px],[12,12px],[14,12px],[15,0px]]
4439                 capital:
4440                     filter: { country_capital: true, $zoom: { min: 5 } }
4441                     draw:
4442                         icons:
4443                             size: [[10,5px],[11,0px]]
4444                             sprite: capital-s
4445                             priority: 18
4446                         text-blend-order:
4447                             priority: 18
4448             population-10k-20k:
4449                 filter:
4450                     population: { min: 10000, max: 20000 }
4451                 draw:
4452                     icons:
4453                         size: [[8,4px],[9,4px],[10,4px],[11,0px]]
4454                         sprite: townspot-xs-rev
4455                         priority: 21
4456                         text:
4457                             font:
4458                                 fill: [0.35,0.35,0.35]
4459                                 size: [[9,11px],[12,12px],[14,12px],[15,0px]]
4460                     text-blend-order:
4461                         priority: 21
4462                         font:
4463                             fill: [0.35,0.35,0.35]
4464                             size: [[9,11px],[12,12px],[14,12px],[15,0px]]
4465                 capital:
4466                     filter: { country_capital: true, $zoom: { min: 5 } }
4467                     draw:
4468                         icons:
4469                             size: [[10,5px],[11,0px]]
4470                             sprite: capital-s
4471                             priority: 20
4472                         text-blend-order:
4473                             priority: 20
4474             population-5k-10k:
4475                 filter:
4476                     population: { min: 5000, max: 10000 }
4477                 draw:
4478                     icons:
4479                         size: [[8,4px],[9,4px],[10,4px],[11,0px]]
4480                         sprite: townspot-xs-rev
4481                         priority: 23
4482                         text:
4483                             font:
4484                                 fill: [0.35,0.35,0.35]
4485                                 size: [[9,10px],[12,12px],[13,12px],[14,12px],[15,0px]]
4486                     text-blend-order:
4487                         priority: 23
4488                         font:
4489                             fill: [0.35,0.35,0.35]
4490                             size: [[9,10px],[12,12px],[13,12px],[14,12px],[15,0px]]
4491                 capital:
4492                     filter: { country_capital: true, $zoom: { min: 5 } }
4493                     draw:
4494                         icons:
4495                             size: [[10,5px],[11,0px]]
4496                             sprite: capital-s
4497                             priority: 22
4498                         text-blend-order:
4499                             priority: 22
4500             population-2k-5k:
4501                 filter:
4502                     population: { min: 2000, max: 5000 }
4503                 draw:
4504                     icons:
4505                         size: [[8,4px],[9,4px],[10,4px],[11,0px]]
4506                         sprite: townspot-xs-rev
4507                         priority: 25
4508                         text:
4509                             font:
4510                                 fill: [0.35,0.35,0.35]
4511                                 size: [[9,10px],[12,10px],[13,12px],[14,12px],[15,0px]]
4512                     text-blend-order:
4513                         priority: 25
4514                         font:
4515                             fill: [0.35,0.35,0.35]
4516                             size: [[9,10px],[12,10px],[13,12px],[14,12px],[15,0px]]
4517                 capital:
4518                     filter: { country_capital: true, $zoom: { min: 5 } }
4519                     draw:
4520                         icons:
4521                             size: [[10,5px],[11,0px]]
4522                             sprite: capital-s
4523                             priority: 24
4524                         text-blend-order:
4525                             priority: 24
4526             population-1k-2k:
4527                 filter:
4528                     population: { min: 1000, max: 2000 }
4529                 draw:
4530                     icons:
4531                         size: [[8,4px],[9,4px],[10,4px],[11,0px]]
4532                         sprite: townspot-xs-rev
4533                         priority: 27
4534                         text:
4535                             font:
4536                                 fill: [0.35,0.35,0.35]
4537                                 size: [[9,10px],[12,10px],[14,11px],[15,0px]]
4538                     text-blend-order:
4539                         priority: 27
4540                         font:
4541                             fill: [0.35,0.35,0.35]
4542                             size: [[9,10px],[12,10px],[14,11px],[15,0px]]
4543                 capital:
4544                     filter: { country_capital: true, $zoom: { min: 5 } }
4545                     draw:
4546                         icons:
4547                             size: [[10,5px],[11,0px]]
4548                             sprite: capital-s
4549                             priority: 26
4550                         text-blend-order:
4551                             priority: 26
4552             population-200-1k:
4553                 filter:
4554                     population: { min: 200, max: 1000 }
4555                 draw:
4556                     icons:
4557                         size: [[8,4px],[9,4px],[10,4px],[11,0px]]
4558                         sprite: townspot-xs-rev
4559                         priority: 28
4560                         text:
4561                             font:
4562                                 fill: [0.35,0.35,0.35]
4563                                 size: [[9,10px],[12,10px],[14,11px],[15,0px]]
4564                     text-blend-order:
4565                         priority: 28
4566                         font:
4567                             fill: [0.35,0.35,0.35]
4568                             size: [[9,10px],[12,10px],[14,11px],[15,0px]]
4569                 capital:
4570                     filter: { country_capital: true, $zoom: { min: 5 } }
4571                     draw:
4572                         icons:
4573                             size: [[10,5px],[11,0px]]
4574                             sprite: capital-s
4575                             priority: 27
4576                         text-blend-order:
4577                             priority: 27
4578
4579         #
4580         #neighborhoods (excluding microhoods, eg the Tendernob)
4581         #
4582         neighbourhood:
4583             filter:
4584                 kind:
4585                     - macrohood
4586                     - neighbourhood
4587                     - borough
4588                 $zoom: { min: 10 }
4589                 is_landuse_aoi: false
4590             draw:
4591                 text-blend-order:
4592                     # there are more labels than we want to show, so we hide them,
4593                     # then selectively reveal in classes below (ultimately a data problem)
4594                     visible: false
4595                     priority: 29
4596                     buffer: 8px
4597                     text_wrap: 10
4598                     max_lines: 2
4599                     font:
4600                         family: Varela
4601                         fill: [0.225,0.561,0.415]
4602                         transform: uppercase
4603             neighborhood-z11:
4604                 filter:
4605                     $zoom: [11]
4606                     min_zoom: [11]
4607                     max_zoom: { min: 12 }
4608                     #kind_tile_rank: { max: 6 }
4609                 draw:
4610                     text-blend-order:
4611                         visible: global.text_visible_neighbourhoods_e
4612                         font:
4613                             size: 9px
4614                             stroke: { color: global.text_stroke, width: 4 }
4615             neighborhood-z12:
4616                 filter:
4617                     $zoom: [12]
4618                     min_zoom: [11,12]
4619                     max_zoom: { min: 13 }
4620                     #kind_tile_rank: { max: 8 }
4621                 draw:
4622                     text-blend-order:
4623                         visible: global.text_visible_neighbourhoods_e
4624                         font:
4625                             size: 10px
4626             neighborhood-z13:
4627                 filter:
4628                     $zoom: [13]
4629                     min_zoom: [11,12,13]
4630                     max_zoom: { min: 14 }
4631                     kind_tile_rank: { max: 8 }
4632                 draw:
4633                     text-blend-order:
4634                         visible: global.text_visible_neighbourhoods_e
4635                         font:
4636                             size: 11px
4637             neighborhood-z14:
4638                 filter:
4639                     $zoom: [14]
4640                     min_zoom: [11,12,13,14]
4641                     max_zoom: { min: 15 }
4642                     kind_tile_rank: { max: 8 }
4643                 draw:
4644                     text-blend-order:
4645                         text_wrap: 12
4646                         max_lines: 3
4647                         visible: global.text_visible_neighbourhoods
4648                         font:
4649                             size: 12px
4650             neighborhood-z15:
4651                 filter:
4652                     $zoom: [15]
4653                     min_zoom: [11,12,13,14,15]
4654                     max_zoom: { min: 16 }
4655                     kind_tile_rank: { max: 8 }
4656                 draw:
4657                     text-blend-order:
4658                         text_wrap: 12
4659                         max_lines: 4
4660                         visible: global.text_visible_neighbourhoods
4661                         font:
4662                             size: 14px
4663                 z15-new:
4664                     filter:
4665                         all:
4666                             - min_zoom: 15
4667                     draw:
4668                         text-blend-order:
4669                             priority: 19
4670                             font:
4671                                 size: 13px
4672             neighborhood-z16:
4673                 filter:
4674                     $zoom: [16]
4675                     min_zoom: [11,12,13,14,15,16]
4676                     max_zoom: { min: 17 }
4677                     kind_tile_rank: { max: 8 }
4678                 draw:
4679                     text-blend-order:
4680                         text_wrap: 12
4681                         max_lines: 4
4682                         visible: global.text_visible_neighbourhoods
4683                         font:
4684                             size: 17px
4685     pois:
4686         data: { source: mapzen, layer: pois }
4687         #visible: global.label_visible_poi_landuse
4688         filter:
4689             all:
4690                 - not: { kind: [building,address,farm,tree,apron,residential,commercial,industrial] }
4691                 # White list a few kinds to "always" show per the tile zoom inclusion, else test feature's min_zoom
4692                 #- function() { return feature.min_zoom <= $zoom }
4693                 - function() { if( feature.kind == 'restaurant' || feature.kind == 'landmark' || feature.kind == 'cafe' ) { return true } else { return feature.min_zoom <= $zoom } }
4694         draw:
4695             icons:
4696                 visible: global.icon_visible_poi_landuse
4697                 size: [[13, 14px], [16, 18px], [18, 19px]]
4698                 sprite: function() { return feature.kind; }
4699                 sprite_default: generic
4700                 interactive: global.sdk_interactive
4701                 priority: 65 #function() { return (feature.min_zoom && Math.floor(feature.min_zoom * 1000)) || 65; }
4702                 repeat_group: abc
4703                 buffer: 3px
4704                 text:
4705                     visible: global.text_visible_poi_landuse
4706                     text_source: global.ux_language_text_source
4707                     buffer: 3px
4708                     text_wrap: 18
4709                     max_lines: 3
4710                     font:
4711                         family: Quicksand #global.text_font_family
4712                         weight: normal
4713                         fill: [0.20,0.20,0.20]
4714                         size: [[13,10px],[14,11px],[17,12px],[19,12px],[20,14px]]
4715                         stroke: { color: global.text_stroke, width: [[12,2px],[16,4px]] }
4716
4717         # improve legibility at high zooms
4718         poi_labels-z18:
4719             filter: { $zoom: { min: 18 } }
4720             draw:
4721                 icons:
4722                     text:
4723                         # some pois have really long names
4724                         max_lines: 5
4725                         font:
4726                             weight: 600
4727
4728         # source icon sprite from something other than kind
4729         sports-pitch:
4730             filter: { kind: [grass, pitch] }
4731             draw:
4732                 icons:
4733                     sprite: function() { return feature.kind_detail; }
4734                     # needs a better recreation icon, so just use generic (default) for now
4735                     #sprite_default: sports
4736         place_of_worship:
4737             filter:
4738                 kind: [place_of_worship, wayside_chapel]
4739             draw:
4740                 icons:
4741                     sprite: function() { return feature.religion; }
4742                     sprite_default: place_of_worship
4743         # TODO: some or all of this may be unnecessary for the sprite, but is necessary for the early filter
4744         building-icon:
4745             filter:
4746                 kind: [apartments, auditorium, building, hangar, manor, recreation_center, retirement_home, terminal]
4747             draw:
4748                 icons:
4749                     sprite: building
4750             early:
4751                 filter:
4752                     any:
4753                         # show labels for smaller landuse areas at higher zooms
4754                         - { $zoom: [14], area: { max: 200000 } }
4755                         - { $zoom: [15], area: { max: 20000 } }
4756                         - { $zoom: [16], area: { max: 5000 } }
4757                         - { $zoom: [17], area: { max: 1000 } }
4758                 draw:
4759                     icons:
4760                         visible: false
4761         #end different icon sprites
4762
4763         #most POI icons without name should be hidden, except these
4764         no-name:
4765             filter: { name: false }
4766             draw:
4767                 icons:
4768                     visible: false
4769             # eg park polygons in SF that have area but no name, sigh
4770             no-name-no-area:
4771                 filter:
4772                     kind: true
4773                     name: false
4774                 draw:
4775                     icons:
4776                         visible: false
4777             sports-pitch:
4778                 filter:
4779                     $zoom: { min: 17 }
4780                     kind: [grass, pitch]
4781                     kind_detail: [baseball, basketball, football, hockey, soccer, tennis]
4782                 draw:
4783                     icons:
4784                         visible: global.icon_visible_poi_landuse_e
4785                         priority: 69
4786             z17:
4787                 filter:
4788                     $zoom: { min: 17 }
4789                     kind: [parking]
4790                 draw: { icons: { visible: global.icon_visible_poi_landuse_e } }
4791             z18:
4792                 # for different styles, different sets
4793                 # since [picnic_site] doesn't have bubble-wrap icon, it's omitted here
4794                 filter:
4795                     $zoom: { min: 18 }
4796                     kind: [drinking_water, information, playground, toilets, traffic_signals]
4797                 draw: { icons: { visible: global.icon_visible_poi_landuse_e } }
4798             z19:
4799                 filter:
4800                     $zoom: { min: 19 }
4801                     kind: [bicycle_parking]
4802                 draw: { icons: { visible: global.icon_visible_poi_landuse_e } }
4803
4804         # NOTE: all natural_* should only be in landuse layer
4805         suppress-icon-always:
4806             filter:
4807                 kind: [natural_forest, natural_park, natural_wood]
4808             draw:
4809                 icons:
4810                     size: 0px
4811                     priority: 100
4812                     text:
4813                         font:
4814                             fill: '#666'
4815                             family: global.text_font_family
4816                             style: italic
4817                             size: 11px
4818         suppress-icon-z17:
4819             filter:
4820                 $zoom: { min: 17 }
4821                 kind: [common, grass, houseboat, pedestrian, railway, ship, wetland]
4822             draw:
4823                 icons:
4824                     size: 0px
4825                     #visible: false
4826                     text: { font: { style: italic } }
4827
4828         # the server should be setting better values here
4829         z-server-friend:
4830             hide-until-z12-any:
4831                 filter:
4832                     kind: [landmark, museum, prison]
4833                     $zoom: { max: 12 }
4834                 draw:
4835                     icons:
4836                         visible: false
4837             hide-until-z14-any:
4838                 filter:
4839                     kind: [natural_forest, natural_park, natural_wood, post_office]
4840                     $zoom: { max: 14 }
4841                 draw:
4842                     icons:
4843                         visible: false
4844             hide-until-z15-any:
4845                 filter:
4846                     $zoom: { max: 15 }
4847                     kind: [cafe, restaurant]
4848                 draw:
4849                     icons:
4850                         visible: false
4851             hide-until-z15-no-area:
4852                 filter:
4853                     area: false
4854                     $zoom: { max: 15 }
4855                     kind: [park]
4856                 draw:
4857                     icons:
4858                         visible: false
4859             hide-until-z15-with-area:
4860                 filter:
4861                     area: true
4862                     $zoom: { max: 15 }
4863                     kind: [nursing_home]
4864                 draw:
4865                     icons:
4866                         visible: false
4867             hide-until-z16-any:
4868                 filter:
4869                     kind: [fire_station, grass, peak, police, tram_stop]
4870                     $zoom: { max: 16 }
4871                 draw:
4872                     icons:
4873                         visible: false
4874             hide-until-z16-no-area:
4875                 filter:
4876                     area: false
4877                     kind: [allotments, college, garden, university]
4878                     $zoom: { max: 16 }
4879                 draw:
4880                     icons:
4881                         visible: false
4882             # no POIs for commercial, residential
4883             hide-until-z17-any:
4884                 filter:
4885                     $zoom: { max: 17 }
4886                     kind: [bank, bus_stop, car_sharing, wood, platform]
4887                 draw:
4888                     icons:
4889                         visible: false
4890             hide-until-z17-with-area:
4891                 filter:
4892                     area: true
4893                     $zoom: { max: 17 }
4894                     kind: [common, grass, houseboat, pedestrian, pitch, railway, ship, wetland]
4895                 draw:
4896                     icons:
4897                         visible: false
4898             hide-until-z17-no-area:
4899                 filter:
4900                     area: false
4901                     $zoom: { max: 17 }
4902                     # note: atm and drinking_water appear hear and in area versions
4903                     kind: [accountant, administrative, advertising_agency, animal, architect, association, atm, bakery, bed_and_breakfast, bicycle, bicycle_parking, bicycle_rental_station, books, butcher, car, car_repair, chalet, clothes, company, computer, consulting, convenience, doityourself, drinking_water, dry_cleaning, educational_institution, emergency_phone, employment_agency, estate_agent, fashion, financial, florist, foundation, gift, government, greengrocer, guest_house, hairdresser, hostel, hotel, insurance, it, jewelry, lawyer, mast, memorial, mobile_phone, motel, newspaper, ngo, notary, optician, parking, pet, physician, playground, political_party, post_box, religion, research, subway_entrance, tax_advisor, telecommunication, telephone, theatre, therapist, toilets, traffic_signals, travel_agent, water_tower]
4904                 draw:
4905                     icons:
4906                         visible: false
4907             hide-until-z18-any:
4908                 filter:
4909                     kind: [atm, bus_stop, drinking_water]
4910                     $zoom: { max: 18 }
4911                 draw:
4912                     icons:
4913                         visible: false
4914             hide-until-z18-no-area:
4915                 filter:
4916                     $zoom: { max: 18 }
4917                     area: false
4918                     kind: [bench, parking, waste_basket]
4919                 draw:
4920                     icons:
4921                         visible: false
4922             hide-until-z19-any:
4923                 filter:
4924                     $zoom: { max: 19 }
4925                     kind: [bicycle_parking, burial_vault, car_sharing]
4926                 draw:
4927                     icons:
4928                         visible: false
4929
4930             # hide based on kind and area filters
4931             military-early:
4932                 filter:
4933                     kind: [military]
4934                     any:
4935                         # show labels for smaller landuse areas at higher zooms
4936                         - { $zoom: [8], area: { max: 50000000 } }
4937                 draw:
4938                     icons:
4939                         visible: false
4940             university-early:
4941                 filter:
4942                     kind: [university, college]
4943                     any:
4944                         # show labels for smaller landuse areas at higher zooms
4945                         - { $zoom: [11], area: { max: 2000000 } }
4946                         - { $zoom: [12], area: { max: 500000 } }
4947                 draw:
4948                     icons:
4949                         visible: false
4950             school-early:
4951                 filter:
4952                     kind: [school, kindergarten]
4953                     any:
4954                         # show labels for smaller landuse areas at higher zooms
4955                         - { $zoom: [13], area: { max: 100000 } }
4956                         - { $zoom: [14], area: { max: 50000 } }
4957                         - { $zoom: [15], area: { max: 10000 } }
4958                         - { $zoom: [16], area: { max: 5000 } }
4959                         - { $zoom: [17], area: { max: 2000 } }
4960                 draw:
4961                     icons:
4962                         visible: false
4963             garden-area-early:
4964                 filter:
4965                     kind: [garden, allotments]
4966                     any:
4967                         # limit show smaller landuse areas to higher zooms
4968                         - { $zoom: [12], area: { max: 500000 } }
4969                         - { $zoom: [13], area: { max: 100000 } }
4970                         - { $zoom: [14], area: { max: 10000 } }
4971                         - { $zoom: [15], area: { max: 5000 } }
4972                 draw:
4973                     icons:
4974                         visible: false
4975             cemetery-early:
4976                 filter:
4977                     kind: [cemetery]
4978                     # limit show smaller landuse areas to higher zooms
4979                     any:
4980                         - { $zoom: [12], area: { max: 3000000 } }
4981                 draw:
4982                     icons:
4983                         visible: false
4984             golf_course-early:
4985                 filter:
4986                     kind: golf_course
4987                     any:
4988                         - { $zoom: [12], area: { max: 2500000 } }
4989                 draw:
4990                     icons:
4991                         visible: false
4992             office-early:
4993                 filter:
4994                     - { kind: [insurance, office, company], $zoom: [15], area: { max: 10000 } }
4995                     - { kind: [insurance, office, company], $zoom: [16], area: { max: 5000 } }
4996                 draw:
4997                     icons:
4998                         visible: false
4999             landuse-labels-green-areas-not-national-park:
5000                 filter:
5001                     kind: [park, conservation, protected_area, nature_reserve, forest, grass]
5002                     any:
5003                     # show labels for smaller landuse areas at higher zooms
5004                     - { $zoom: { max: 6 }, area: true }
5005                     - { $zoom: [6],    area: { max: 5000000000 } }
5006                     - { $zoom: [7],    area: { max: 5000000000 } }
5007                     - { $zoom: [8],    area: { max: 1000000000 } }
5008                     - { $zoom: [9],    area: { max: 100000000 } }
5009                     - { $zoom: [10],   area: { max: 50000000 } }
5010                     - { $zoom: [11],   area: { max: 25000000 } }
5011                     - { $zoom: [12],   area: { max: 5000000 } }
5012                     - { $zoom: [13],   area: { max: 200000 } }
5013                     - { $zoom: [14],   area: { max: 50000 } }
5014                     - { $zoom: [15],   area: { max: 10000 } }
5015                     - { $zoom: [16],   area: { max: 1000 } }
5016                 draw:
5017                     icons:
5018                         visible: false
5019                 wilderness-areas-early:
5020                     filter: function() { return $zoom < 9 && feature.name && (feature.name.indexOf("Wilderness") > -1 || feature.name.indexOf("BLM") > -1 || feature.protect_class == '1' || feature.protect_class == '1a' || feature.protect_class == '1b' ); }
5021                     draw:
5022                         icons:
5023                             visible: false
5024                 not-national-park:
5025                     filter: function() { return feature.name && !((feature.name.indexOf("National Park") > -1) || feature.name.indexOf("National Monument") > -1); }
5026                     early:
5027                         filter: { $zoom: { max: 8 } }
5028                         draw:
5029                             icons:
5030                                 visible: false
5031             landuse-labels-not-any-above:
5032                 filter:
5033                     $zoom: { max: 6 }
5034                     not: { kind: [aerodrome, airport, allotments, aquarium, attraction, battlefield, beach, cemetery, college, conservation, forest, garden, glacier, golf_course, grass, kindergarten, landmark, maze, national_park, nature_reserve, park, playground, protected_area, resort, school, stadium, station, theme_park, university, winery, winter_sports, zoo] }
5035                 draw:
5036                     icons:
5037                         visible: false
5038             glacier:
5039                 filter: { $zoom: { max: 14 }, kind: glacier, area: false }
5040                 draw:
5041                     icons:
5042                         visible: false
5043
5044         # set special priority, sprite, and text styles per kind
5045         # has-area:
5046         #     filter: { area: true }
5047         #     draw:
5048         #         icons:
5049         #             priority: 41
5050
5051         national-park-protected-areas:
5052             filter:
5053                 kind: [national_park, battlefield]
5054             draw:
5055                 icons:
5056                     visible: global.icon_visible_landuse_green
5057                     size: global.icon_size_green
5058                     sprite: park
5059                     text:
5060                         visible: global.text_visible_landuse_green
5061                         font:
5062                             fill: [0.200,0.409,0.398] #*text_fill_park
5063                             style: italic
5064             z14-parks:
5065                 filter: { $zoom: { min: 14 } }
5066                 draw:
5067                     icons:
5068                         sprite: park-l
5069                         size: global.icon_size_green_l
5070         parks:
5071             filter:
5072                 - kind: [park, conservation, grass]
5073                 - { kind: protected_area, not: { protect_class: [6, '6'] } }
5074             draw:
5075                 icons:
5076                     visible: global.icon_visible_landuse_green
5077                     size: global.icon_size_green
5078                     sprite: park
5079                     text:
5080                         visible: global.text_visible_landuse_green
5081                         font:
5082                             fill: [0.181,0.370,0.361]
5083                             style: italic
5084             only-text-later:
5085                 filter: { kind: [grass], $zoom: { min: 16 } }
5086                 draw:
5087                     icons:
5088                         size: 0px
5089                         text:
5090                             font:
5091                                 style: italic
5092         forest:
5093             filter:
5094                 - kind: forest
5095                 - { kind: protected_area, protect_class: [6, '6'] }
5096             draw:
5097                 icons:
5098                     visible: global.icon_visible_landuse_green
5099                     size: global.icon_size_green
5100                     sprite: forest
5101                     text:
5102                         visible: global.text_visible_landuse_green
5103                         font:
5104                             fill: [0.181,0.370,0.361]
5105                             style: italic
5106         beach:
5107             filter:
5108                 kind: [beach]
5109             draw:
5110                 icons:
5111                     visible: global.icon_visible_landuse_green
5112                     size: global.icon_size_green
5113                     text:
5114                         visible: global.text_visible_landuse_green
5115                         font:
5116                             fill: global.text_fill_beach
5117         airport:
5118             filter:
5119                 kind: [airport, aerodrome]
5120             draw:
5121                 icons:
5122                     visible: global.icon_visible_landuse_green
5123                     size: global.icon_size_green
5124                     priority: 42
5125                     text:
5126                         visible: global.text_visible_landuse_green
5127                         text_source: global.ux_language_text_source_iata
5128             early:
5129                 filter: { $zoom: [9,10,11] }
5130                 draw: { icons: { text: { text_source: iata } } }
5131
5132         enclosure-related:
5133             filter:
5134                 kind: [enclosure, animal]
5135             draw:
5136                 icons:
5137                     priority: 43
5138                     size: 0px
5139                     #: dot-black
5140                     text:
5141                         text_wrap: 10
5142                         font:
5143                             style: italic
5144                             weight: normal
5145         glacier:
5146             filter:
5147                 kind: glacier
5148             draw:
5149                 icons:
5150                     size: 0px
5151                     #visible: false
5152                     text:
5153                         visible: true
5154                         priority: 44
5155                         text_wrap: 10
5156                         font:
5157                             weight: normal
5158                             style: italic
5159                             fill: '#4ba3c5'
5160
5161         # landuse-labels-not-any-above:
5162         #     filter:
5163         #         not: { kind: [aerodrome, airport, allotments, aquarium, attraction, battlefield, beach, cemetery, college, conservation, forest, garden, glacier, golf_course, grass, kindergarten, landmark, maze, national_park, nature_reserve, park, playground, protected_area, resort, school, stadium, station, theme_park, university, winery, winter_sports, zoo] }
5164         #     draw:
5165         #         icons:
5166         #             priority: 43
5167
5168         building-like:
5169             filter: { kind: [commercial,residential,warehouse,public,dormitory], osm_relation: false }
5170             draw:
5171                 icons:
5172                     sprite: building
5173
5174         station-train-subway:
5175             filter: { kind: [station, train_station] }
5176             draw:
5177                 icons:
5178                     visible: global.icon_visible_station
5179                     size: [[13, 12px], [14, 12px], [15, 16px], [17, 18px], [18, 20px]]
5180                     priority: 42
5181                     text:
5182                         visible: global.text_visible_station
5183             station-early:
5184                 filter:
5185                     $zoom: { max: 11 }
5186                 draw:
5187                     icons:
5188                         visible: false
5189             # for a transit style we'd want to see **all**, so don't move this above (it's special to this style)
5190             low-priority-early:
5191                 filter: { kind_tile_rank: { min: 5 }, $zoom: { min: 0, max: 13 } }
5192                 draw:
5193                     icons:
5194                         visible: false
5195             low-priority-early-z13:
5196                 filter: { kind_tile_rank: { min: 5 }, $zoom: [13] }
5197                 draw:
5198                     icons:
5199                         visible: false
5200             low-priority-early-z14:
5201                 filter: { kind_tile_rank: { min: 7 }, $zoom: [14] }
5202                 draw:
5203                     icons:
5204                         text: { visible: false }
5205
5206         garden-no-area-early:
5207             filter: { kind: [garden, allotments], $zoom: [16], area: false }
5208             draw:
5209                 icons:
5210                     priority: 45
5211                     size: 14px
5212                     text:  { font: { size: 10px, style: italic } }
5213         garden-no-area-later:
5214             filter: { kind: [garden, allotments], $zoom: { min: 17 }, area: false }
5215             draw:
5216                 icons:
5217                     priority: 45
5218                     size: 16px
5219                     text:  { font: { size: 11px, style: italic } }
5220         gate:
5221             filter: { kind: gate, name: true  }
5222             draw: { icons: { sprite: generic } }
5223
5224         parking-labels:
5225             filter:
5226                 kind: [parking]
5227                 $zoom: { min: 18 }
5228             draw:
5229                 icons:
5230                     text:
5231                         visible: global.text_visible_poi_landuse
5232                         font:
5233                             size: 10px
5234         tower:
5235             filter: { kind: [tower], label_placement: true }
5236             draw:
5237                 icons:
5238                     size: 0px
5239                     #visible: false
5240                     text:
5241                         font:
5242                             style: italic
5243
5244         # TODO: this isn't working, should see small icons near the transbay terminal in SF
5245         bus_stop:
5246             filter:
5247                 kind: [bus_stop]
5248             draw:
5249                 icons:
5250                     size: 14px
5251                     text:
5252                         font:
5253                             size: 11px
5254                             weight: normal
5255             later:
5256                 filter: { $zoom: { max: 19 } }
5257                 draw:
5258                     icons:
5259                         text:
5260                             visible: false
5261
5262         airport-gate:
5263             filter: { kind: aeroway_gate }
5264             draw:
5265                 icons:
5266                     visible: false
5267                 text-blend-order:
5268                     visible: global.text_visible_airport_gate
5269                     text_source: ref
5270                     priority: 63
5271                     font:
5272                         fill: global.text_fill_exits
5273                         size: [[16,9px],[17,12px],[20,14px]]
5274             later:
5275                 filter: { $zoom: { min: 19 } }
5276                 draw:
5277                     icons:
5278                         text:
5279                             font:
5280                                 weight: 600
5281
5282         highway-exit:
5283             filter: { kind: motorway_junction, $zoom: { min: 14 } }
5284             draw:
5285                 icons:
5286                     visible: false
5287                 text-blend-order:
5288                     visible: global.text_visible_exits
5289                     text_source: ref
5290                     priority: 63
5291                     font:
5292                         family: Montserrat
5293                         fill: global.text_fill_exits
5294                         size: [[12,9px],[15,12px],[17,14px]]
5295                         stroke: { color: global.text_stroke, width: [[12,2px],[14,3px],[15,3px]] }
5296             later:
5297                 filter: { $zoom: { min: 16 } }
5298                 draw:
5299                     icons:
5300                         text:
5301                             font:
5302                                 weight: 600
5303
5304     earth-labels:
5305         data: { source: mapzen, layer: earth }
5306         filter: { name: true }
5307         draw:
5308             text-blend-order:
5309                 text_source: global.ux_language_text_source
5310         continent:
5311             filter: { kind: [continent], $zoom: { max: 5 } }
5312             draw:
5313                 text-blend-order:
5314                     visible: global.text_visible_continent
5315                     text_source: global.ux_language_text_source_continent_stacked_only
5316                     text_wrap: false
5317                     font:
5318                         family: Varela
5319                         size: [[1,11px],[3,14px]]
5320                         fill: [0.762,0.525,0.428]
5321                         transform: uppercase
5322             continent-spacer:
5323                 filter: { $zoom: { min: 2 } }
5324                 draw:
5325                     text-blend-order:
5326                         text_source: global.ux_language_text_source_continent
5327         island:
5328             filter: { kind: [archipelago, island, islet] }
5329             draw:
5330                 text-blend-order:
5331                     visible: global.text_visible_island
5332                     text_wrap: 10
5333                     font:
5334                         size: 12px
5335                         style: italic
5336                         fill: global.text_fill
5337                         weight: normal
5338                         stroke: { color: global.text_stroke, width: 4 }
5339                         #transform: uppercase
5340
5341     landuse:
5342         data: { source: mapzen }
5343         draw:
5344             dots:
5345                 order: global.feature_order
5346                 visible: false
5347             dots-rev:
5348                 order: global.feature_order
5349                 visible: false
5350             polygons:
5351                 order: global.feature_order
5352                 #debug for polygon merging
5353                 #order: |
5354 #                   function() {
5355 #                       if( feature.id ) {
5356 #                           return 1001;
5357 #                       } else {
5358 #                           return 1000;
5359 #                       }
5360 #                   }
5361                 #debug for polygon merging
5362                 #color: |
5363 #                   function() {
5364 #                       if( feature.id ) {
5365 #                           return [
5366 #                               0.7 * (parseInt(feature.id, 16) / 100 % 1),     // jshint ignore:line
5367 #                               0.7 * (parseInt(feature.id, 16) / 10000 % 1),   // jshint ignore:line
5368 #                               0.7 * (parseInt(feature.id, 16) / 1000000 % 1), // jshint ignore:line
5369 #                               1
5370 #                           ];
5371 #                       } else {
5372 #                           if( feature.scale_rank == 6 ) {
5373 #                               return [1.,0.,0.,1];
5374 #                           } else if( feature.scale_rank == 5 ) {
5375 #                               return [0.,1.,0.,1];
5376 #                           } else if( feature.scale_rank == 4 ) {
5377 #                               return [0.,0.,1.,1];
5378 #                           } else if( feature.scale_rank == 3 ) {
5379 #                               return [0.,0.,0.5,1];
5380 #                           } else if( feature.scale_rank == 2 ) {
5381 #                               return [0.,0.5,0.,1];
5382 #                           } else if( feature.scale_rank == 1 ) {
5383 #                               return [0.,0.5,0.,1];
5384 #                           } else if( feature.scale_rank == 0 ) {
5385 #                               return [0.5,0.,0.,1];
5386 #                           } else {
5387 #                               return [0.5,0.5,0.5,1];
5388 #                           }
5389 #                       }
5390 #                   }
5391             lines:
5392                 order: global.feature_order
5393
5394         landuse-labels:
5395             filter:
5396                 all:
5397                     - label_placement: true
5398                     - name: true
5399                     - function() { return global.text_visible_landuse_generic; }
5400             draw:
5401                 text-blend-order:
5402                     text_source: global.ux_language_text_source
5403                     interactive: global.sdk_interactive
5404                     move_into_tile: true
5405                     priority: 100
5406                     font:
5407                         fill: '#666'
5408                         family: global.text_font_family
5409                         style: italic
5410                         size: 11px
5411                         stroke: { color: global.text_stroke_address, width: 1 }
5412
5413         #TIER 1
5414         national_park:
5415             filter:
5416                 all:
5417                     - kind: [national_park, battlefield, protected_area]
5418                 any:
5419                     - not: { operator: [ "United States Forest Service" ] }
5420                     - protect_class: ['2','3','5']
5421             draw:
5422                 dots:
5423                     color: [[4,[0.655,0.800,0.796]],[8,[0.588,0.780,0.773]]]
5424                     # todo: what is this?
5425                     order: 18
5426                     visible: true
5427             us_national_park:
5428                 # yosemite national park, death valley national park, grand canyon national park
5429                 filter:
5430                     any:
5431                         - operator: [ "United States National Park Service" ]
5432                         - protect_class: ['2','3','5']
5433                 draw:
5434                     dots:
5435                         color: [[4,[0.525,0.765,0.686]],[9,[0.416,0.737,0.631]]]
5436                         order: 19
5437                         visible: true
5438                         # color: [[4,[0.242,0.737,0.712]],[12,[0.224,0.682,0.659]]]
5439         #TIER 2
5440         conservation:
5441             filter:
5442                 all:
5443                     - $zoom: { min: 4 }
5444                     - kind: [protected_area, nature_reserve, national_park]
5445                     - not: { protect_class: ['2','3','5'] }
5446             draw:
5447                 dots:
5448                     # effectively the wilderness color
5449                     color: [[0,[0.442,0.960,0.865]],[11,[0.2,0.850,0.765]]] #red #[0.420,0.808,0.698]
5450                     visible: true
5451                     order: 33
5452         national_forest_level_6:
5453             filter:
5454                 all:
5455                     - kind: forest
5456                 any:
5457                     - protect_class: ['6']
5458                     - operator: ['United States Forest Service']
5459             draw:
5460                 dots:
5461                     color: [0.442,0.960,0.865] #*green7
5462                     visible: true
5463
5464         # gotta be a protected area to draw green, not just a landcover type
5465         farm:
5466             filter:
5467                 kind: [farm, farmland]
5468                 $zoom: { min: 10}
5469             draw:
5470                 dots:
5471                     color: [0.600,0.790,0.714]
5472                     visible: global.green4_v
5473         forest-landcover:
5474             filter: { kind: [forest, natural_forest, wood, natural_wood, natural_park], $zoom: { min: 10 }, not: { operator: "United States Forest Service" } }
5475             draw:
5476                 dots:
5477                     color: [0.70,0.990,0.92] #[0.486,0.839,0.722]
5478                     visible: true
5479
5480         parks-and-national-forests-not-national-park:
5481             filter:
5482                 all:
5483                     - $zoom: { min: 4 }
5484                     - kind: [park, national_park]
5485                 any:
5486                     - not: { operator: [ "United States National Park Service", "United States Forest Service" ] }
5487                     - not: { protect_class: ['2','3','5','6'] }
5488             # default for national forests and more?
5489             draw:
5490                 dots:
5491                     # color: [[4,[0.655,0.800,0.796]],[11,[0.588,0.780,0.773]],[12,[0.242,0.737,0.712]],[14,[0.412,0.733,0.718]],[15,[0.635,0.792,0.788]]]
5492                     color: [[4,[0.655,0.800,0.796]],[11,[0.588,0.780,0.773]],[12,[0.635,0.792,0.788]]]
5493                     visible: true
5494             national_park:
5495                 #filter: function() { return feature.name && (feature.name.indexOf('National Park') > -1); }
5496                 filter:
5497                     all:
5498                         - kind: national_park
5499                         - not: [ protect_class: ['2','3','5','6'], operator: [ "United States National Park Service"] ]
5500                 draw:
5501                     dots:
5502                         color: [[4,[0.525,0.765,0.686]],[9,[0.416,0.737,0.631]]]
5503         urban:
5504             filter: { kind: [urban, rural, residential] }
5505             visible: global.earth2_v
5506             draw:
5507                 dots:
5508                     color: [[0, global.earth2],[9, global.earth2]]
5509                     visible: global.earth2_v
5510         #TIER 3
5511         airport:
5512             filter:
5513                 kind: aerodrome
5514             draw:
5515                 dots:
5516                     color: [0.805,0.805,0.825]
5517                     visible: true
5518         military:
5519             filter:
5520                 kind: military
5521             draw:
5522                 dots:
5523                     color: [0.722,0.769,0.827]
5524                     visible: true
5525         university:
5526             filter:
5527                 kind: [university, college]
5528             draw:
5529                 dots:
5530                     color: [0.827,0.753,0.682]
5531                     visible: true
5532         #TIER 4
5533         cemetery:
5534             filter:
5535                 kind: cemetery
5536             draw:
5537                 dots:
5538                     color: global.green2
5539                     visible: true
5540         commercial:
5541             filter:
5542                 kind: commercial
5543             draw:
5544                 dots:
5545                     color: [0.855,0.748,0.667]
5546                     visible: global.grey1_v
5547         golf_course:
5548             filter:
5549                 kind: golf_course
5550             draw:
5551                 dots:
5552                     color: [0.353,0.812,0.545]
5553                     visible: true
5554         hospital:
5555             filter:
5556                 kind: hospital
5557             draw:
5558                 dots:
5559                     color: [0.843,0.624,0.647]
5560                     visible: true
5561         industrial:
5562             filter:
5563                 kind: industrial
5564             draw:
5565                 dots-rev:
5566                     color: [[8,[0.845,0.845,0.845]],[14,[0.835,0.835,0.835]],[15,[0.780,0.780,0.780]]]
5567                     visible: true
5568         power:
5569             filter: { kind: [plant, generator, substation] }
5570             draw:
5571                 dots:
5572                     color: [0.679,0.679,0.679]
5573                     visible: true
5574         railway:
5575             filter:
5576                 kind: railway
5577             draw:
5578                 dots-rev:
5579                     color: [0.898,0.910,0.918]
5580                     visible: true
5581         sports_centre:
5582             filter:
5583                 kind: sports_centre
5584             draw:
5585                 dots:
5586                     color: global.green10
5587         recreation_ground:
5588             filter:
5589                 kind: recreation_ground
5590             draw:
5591                 dots:
5592                     color: global.green1
5593                     visible: true
5594         retail:
5595             filter:
5596                 kind: retail
5597             draw:
5598                 dots:
5599                     color: [0.955,0.752,0.650]
5600                     visible: global.grey1_v
5601         stadium:
5602             filter:
5603                 kind: stadium
5604             draw:
5605                 dots:
5606                     color: [0.624,0.690,0.761]
5607                     visible: true
5608         zoo:
5609             filter:
5610                 kind: [zoo, wildlife_park]
5611             draw:
5612                 dots:
5613                     color: [0.498,1.000,0.851]
5614                     visible: true
5615         winter_sports:
5616             filter:
5617                 kind: winter_sports
5618             draw:
5619                 dots:
5620                     color: global.grey8
5621                     visible: global.grey8_v
5622         man-made:
5623             filter: { kind: [pier,wastewater_plant,works,bridge,tower,breakwater,water_works,groyne,dike,cutline] }
5624             draw:
5625                 dots:
5626                     color: [0.690,0.690,0.690]
5627                     visible: true
5628             pier:
5629                 filter: { kind: [pier,bridge,breakwater,groyne,dike,cutline] }
5630                 draw:
5631                     dots:
5632                         color: [0.679,0.679,0.679]
5633                         visible: true
5634         #TIER 5
5635         tourism-related:
5636             filter:
5637                 kind:
5638                     - theme_park
5639                     - resort
5640                     - aquarium
5641                     - winery
5642                     - maze
5643             draw:
5644                 dots:
5645                     color: global.grey10
5646                     visible: true
5647         beach:
5648            filter:
5649                kind: beach
5650            draw:
5651                dots:
5652                    color: [0.780,0.740,0.538]
5653                    visible: true
5654         #TIER 6
5655         garden:
5656             filter:
5657                 kind: [garden, allotments]
5658             draw:
5659                 dots:
5660                     color: [0.604,0.973,0.722]
5661                     visible: true
5662         parking:
5663             filter:
5664                 all:
5665                     - kind: parking
5666                     - $zoom: { min: 14 }
5667                 any:
5668                     - { $zoom: { min: 14 }, area: { min: 10000 } }
5669                     - { $zoom: { min: 15 }, area: { min: 5000 } }
5670             draw:
5671                 dots:
5672                     color: [0.765,0.765,0.765]
5673                     visible: global.grey1_v
5674             early:
5675                 filter: { $zoom: { max: 15 } }
5676                 draw:
5677                     dots:
5678                         color: global.grey1_e
5679                         visible: true
5680         pedestrian:
5681             filter:
5682                 kind: [pedestrian,common]
5683             draw:
5684                 dots:
5685                     color: [0.740,0.740,0.740]
5686                     visible: global.grey1_v
5687             green-stuff:
5688                 filter:
5689                     surface: [grass]
5690                 draw:
5691                     dots:
5692                         color: [0.584,0.843,0.792]
5693         # glacier:
5694         #     filter:
5695         #         kind: glacier
5696         #     draw:
5697         #         terrain:
5698         #             color: [0.890,0.970,1.000]
5699         #             # color: [0.975,0.975,0.828]
5700         #             visible: true
5701
5702         pitch:
5703             filter: { kind: pitch }
5704             draw:
5705                 dots:
5706                     color: [0.490,0.812,0.631]
5707                     visible: true
5708         place_of_worship:
5709             filter:
5710                 kind: place_of_worship
5711             draw:
5712                 dots:
5713                     color: [0.910,0.972,1.000]
5714                     visible: global.grey1_v
5715         playground:
5716             filter:
5717                 kind: playground
5718             draw:
5719                 dots-rev:
5720                     color: [0.584,0.843,0.792]
5721                     visible: true
5722         school:
5723             filter:
5724                 kind: school
5725             draw:
5726                 dots:
5727                     color: [0.749,0.722,0.694]
5728                     visible: true
5729
5730         minor-landuse:
5731             filter:
5732                 kind:
5733                     - attraction
5734                     - artwork
5735                     - wilderness_hut
5736                     - hanami
5737             draw:
5738                 dots:
5739                     color: [0.765,0.765,0.765]
5740                     visible: true
5741
5742         # GO MELLOW
5743         # 18/41.19776/-8.68722
5744         tree_row:
5745             filter:
5746                 kind: tree_row
5747             draw:
5748                 lines:
5749                     order: 501 # function() { return feature.sort_rank; }
5750                     color: [0.602,0.860,0.722]
5751                     width: [[16,1px],[17,2px],[19,1.5m]]
5752
5753         # GO MELLOW
5754         # 20/37.76779/-122.40096
5755         hedge:
5756             filter:
5757                 kind: hedge
5758             draw:
5759                 lines:
5760                     order: 500 # function() { return feature.sort_rank; }
5761                     color: [0.602,0.860,0.722]
5762                     width: [[16,0.5px],[17,1px],[19,1m]]
5763
5764         landuse-not-filtered:
5765             # runways and taxiways are also in the roads layer as lines
5766             # these ones are probably duplicate features, but have AREA (a good thing)
5767             filter:
5768                 kind:
5769                     - runway
5770                     - apron
5771                     - beach
5772                     - roller_coaster
5773                     - amusement_ride
5774                     - summer_toboggan
5775                     - trail_riding_station
5776                     - water_slide
5777                     - carousel
5778                     - animal
5779                     - enclosure
5780                     - petting_zoo
5781                     - aviary
5782             draw:
5783                 dots:
5784                     order: global.feature_order
5785                     visible: false
5786                 dots-rev:
5787                     order: global.feature_order
5788                     visible: false
5789                 polygons:
5790                     visible: false
5791                     order: global.feature_order
5792             runway:
5793                 filter:
5794                     kind: runway
5795                 draw:
5796                     polygons:
5797                         visible: true
5798                         color: [[10,[0.4,0.4,0.4]],[11,[0.50,0.50,0.50]],[12,[0.7,0.7,0.7]],[13,[0.75,0.75,0.75]],[14,[0.95,0.95,0.95]]]
5799                 early:
5800                     filter: { $zoom: [9] }
5801                     draw:
5802                         polygons:
5803                             visible: false
5804             apron:
5805                 filter:
5806                     kind: apron
5807                     $zoom: { min: 15}
5808                 draw:
5809                     dots-rev:
5810                         visible: true
5811                         color: [0.820,0.820,0.820]
5812             minor-amusement-park-landuse:
5813                 filter:
5814                     kind:
5815                         - roller_coaster
5816                         - amusement_ride
5817                         - summer_toboggan
5818                         - trail_riding_station
5819                         - water_slide
5820                         - carousel
5821                 draw:
5822                     dots:
5823                         color: global.grey12
5824                         visible: true
5825             minor-zoo-landuse:
5826                 filter:
5827                     kind:
5828                         - animal
5829                         - enclosure
5830                         - petting_zoo
5831                         - aviary
5832                 draw:
5833                     dots:
5834                         color: global.green11
5835                         visible: true
5836
5837         landuse_urban_area-early:
5838             filter:
5839                 # This is from Natural Earth and only shows up from zoom(0,9)
5840                 kind: urban_area
5841             draw:
5842                 dots:
5843                     visible: global.earth2_ev
5844                     order: global.feature_order
5845                     color: [[4,[0.965,0.600,0.882]],[6,[0.965,0.600,0.882]],[7,[0.882,0.639,0.827]],[8,[0.757,0.729,0.753]]]
5846
5847     transit-overlay-rail-lines:
5848         data: { source: mapzen, layer: transit }
5849         filter:
5850             all:
5851                 - not: { kind: [platform, railway] }
5852                 - function() { return global.sdk_transit_overlay; }
5853         draw:
5854             lines:
5855                 order: 499
5856                 color: purple
5857                 width: [[5,1.5px],[6,2px],[11,3px],[18,4px]]
5858                 outline:
5859                     color: [1.,1.,1.,.8]
5860                     width: [[7,0px],[8,0.25px],[9,0.5px],[12,1.0px],[13,1.75px],[14,2px]]
5861                     #width: [[12,1.0px],[13,1.75px],[14,2px]]
5862         train-sizing-color:
5863             filter: { kind: train }
5864             draw:
5865                 lines:
5866                     color: purple
5867                     width: [[5,1.0px],[6,1.0px],[7,1.25px],[11,2.0px],[13,2.5px],[18,3.5px]]
5868                     outline:
5869                         width: [[12,1.0px],[13,1.75px],[14,2px]]
5870             stack-below-other-transit-later-zooms:
5871                 filter: { $zoom: { min: 9 } }
5872                 draw:
5873                     lines:
5874                         order: 511
5875         subway-sizing:
5876             filter: { kind: subway }
5877             draw:
5878                 lines:
5879                     width: [[9,1px],[11,2px],[12,3px],[13,4px],[15,5px],[16,7px],[17,9px]]
5880                     outline:
5881                         #color: [[10,white],[11,black]]
5882                         width: [[9,0px],[10,0.5px],[12,1.25px],[13,1.5px],[15,2px]]
5883                         #width: [[12,1.5px],[13,2.0px],[14,2.5px]]
5884         light-rail-and-tram-sizing:
5885             filter: { kind: [light_rail, tram] }
5886             draw:
5887                 lines:
5888                     width: [[10,1px],[12,1.5px],[15,2px],[18,3.5px]]
5889                     outline:
5890                         #color: [[11,white],[12,black]]
5891                         width: [[12,0.25px],[13,0.5px],[14,1px],[16,2px]]
5892         has-data-color:
5893             filter: { colour: true }
5894             draw:
5895                 lines:
5896                     order: 510
5897                     width: [[9,2px],[11,3px],[12,4px]]
5898                     color: function() { return feature.colour || 'purple'; }
5899                     #outline:
5900                         #color: function() { if(feature.colour == 'silver') { return 'black'; } else { return [0.,0.,0.,.1]; } }
5901                         #width: [[12,1.0px],[13,1.75px],[14,2px]]
5902             train-with-color:
5903                 filter: { kind: train }
5904                 draw:
5905                     lines:
5906                         order: 514
5907             subway-with-color:
5908                 filter: { kind: subway }
5909                 draw:
5910                     lines:
5911                         order: 513
5912             light-rail-and-tram-with-color:
5913                 filter: { kind: [light_rail, tram] }
5914                 draw:
5915                     lines:
5916                         order: 512
5917         missing-colour:
5918             filter: { colour: false }
5919             train-missing-color:
5920                 filter: { kind: train, colour: false }
5921                 draw:
5922                     lines:
5923                         #width: [[5,1.25px],[6,1.75px],[11,2.0px],[13,2.5px],[18,2.5m]]
5924                         order: 506
5925             subway-missing-color:
5926                 filter: { kind: subway, colour: false }
5927                 draw:
5928                     lines:
5929                         order: 505
5930                         #outline:
5931 #                            width: [[12,1.5px],[13,2.0px],[14,2.5px]]
5932             light-rail-and-tram-missing-color:
5933                 filter: { kind: [light_rail, tram], colour: false }
5934                 draw:
5935                     lines:
5936                         order: 504
5937         labels-transit-lines:
5938             filter:
5939                 all:
5940                     - function() { return global.sdk_transit_overlay; }
5941                     - all:
5942                         - $zoom: { min: 13 }
5943                         - ref: true
5944             draw:
5945                 icons:
5946                     priority: 20
5947                     # you need to match any custom shield to the vector tile `network` values
5948                     sprite: function() { return ('sdk_shield-' + feature.ref.length + 'char'); }
5949                     sprite_default: sdk_shield_5char
5950                     color: function() { if ( feature.kind === 'train') { return 'purple' } else { return feature.colour || 'purple'; } }
5951                     # Size is specified below, and limited to 5 char in another filter
5952                     repeat_group: shields
5953                     repeat_distance: [[8,90px],[10,40px],[13,30px]]
5954                     placement: midpoint
5955                     placement_min_length_ratio:
5956                         - [8, 0.1]
5957                         - [9, 0.25]
5958                         - [10, 0.25]
5959                         - [11, 0.15]
5960                         - [12, 1]
5961                         - [13, 1.50]
5962                         - [14, 2.0]
5963                     cull_from_tile: true
5964 #                    visible: false
5965                     text:
5966                         offset: [0px, -0.5px]
5967                         repeat_distance: 200px
5968                         anchor: center
5969                         text_source: function() { if( feature.ref.length < 6 ) { return feature.ref; } else { return ''; } }
5970                         font:
5971                             family: Montserrat
5972                             fill: function() { if(feature.colour == 'yellow') { return '#555'; } else { return 'white'; } }
5973                             style: bold
5974                             size: [[7,7px],[12,8px],[16,11px]]
5975
5976             width_1char:
5977                 filter: function() { return (feature.ref.length === 1); }
5978                 draw:
5979                     icons:
5980                         size: [[6,[16px,16px]],[13,[18px,18px]],[16,[21px,21px]]]
5981             width_2char:
5982                 filter: function() { return (feature.ref.length === 2); }
5983                 draw:
5984                     icons:
5985                         size: [[6,[21px,16px]],[13,[24px,18px]],[16,[28px,21px]]]
5986             width_3char:
5987                 filter: function() { return (feature.ref.length === 3); }
5988                 draw:
5989                     icons:
5990                         size: [[6,[27px,16px]],[13,[31px,18px]],[16,[36px,21px]]]
5991             width_4char:
5992                 filter: function() { return (feature.ref.length === 4); }
5993                 draw:
5994                     icons:
5995                         size: [[6,[32px,16px]],[13,[36px,18px]],[16,[41px,21px]]]
5996                 # London sucks
5997                 early:
5998                     filter: { $zoom: { max: 14 } }
5999                     draw:
6000                         icons:
6001                             visible: false
6002             width_5char:
6003                 filter: function() { return (feature.ref.length === 5); }
6004                 draw:
6005                     icons:
6006                         size: [[6,[37px,16px]],[13,[41px,18px]],[16,[48px,21px]]]
6007                 # London sucks
6008                 early:
6009                     filter: { $zoom: { max: 14 } }
6010                     draw:
6011                         icons:
6012                             visible: false
6013             # this is kinda a hack
6014             width_longggggg:
6015                 filter: function() { return (feature.ref.length > 5); }
6016                 draw:
6017                     icons:
6018                         visible: false
6019
6020         z19-show-long-route-name:
6021                 filter:
6022                     all:
6023                         - function() { return global.sdk_transit_overlay; }
6024                         - $zoom: { min: 19 }
6025                 draw:
6026                     text:
6027                         font:
6028                             fill: black
6029                             style: italic
6030                             stroke: { color: white, width: 3px }
6031
6032 #    transit-bus-roads:
6033 #        data: { source: mapzen, layer: roads }
6034 #        filter: { is_bus_route: true }
6035 #        draw:
6036 #            lines:
6037 #                visible: global.sdk_transit_overlay
6038 #                interactive: false
6039 #                color: [[13,[0,0,1,0.5]],[15,blue]]
6040 #                width: [[11,0.5px],[12,0.8px],[16,1.25px],[18,1m]]
6041 #                # let roads sort themselves past zoom 14
6042 #                order: 488
6043 #                # but give them all the same outline
6044 #                outline:
6045 #                    order: 487
6046
6047     transit-overlay-station-labels:
6048         data: { source: mapzen, layer: pois }
6049         filter:
6050             kind: [station, tram_stop, bus_station, subway_entrance, halt, stop, platform, bus_stop, stop_position ]
6051             any:
6052                 - area: false
6053                   all:
6054                 - area: true
6055                   all:
6056                       - $geometry: point
6057                       - kind: true
6058         draw:
6059             icons:
6060                 visible: global.sdk_transit_overlay
6061                 size: [[13, 12px], [16, 16px], [19, 20px]]
6062                 interactive: global.sdk_interactive
6063                 priority: 15
6064                 text:
6065                     buffer: 4px
6066                     move_into_tile: false # preserves text alignment w/icons in JS
6067                     #anchor: bottom
6068                     #offset: [[13, [0, 6px]], [16, [0, 8px]], [19, [0, 10px]]] # offset tracks alongside icon size (half icon height)
6069                     interactive: global.sdk_interactive
6070                     priority: 16
6071                     font:
6072                         fill: black
6073                         weight: normal
6074                         size: 11px
6075                         stroke: { color: white, width: 3 }
6076         poi_labels-z14:
6077             filter: { $zoom: [14] }
6078             draw: { icons: { text: { font: { size: 11px } } } }
6079         poi_labels-z15:
6080             filter: { $zoom: [15,16,17] }
6081             draw: { icons: { text: { font: { size: 12px, stroke: { width: 2 } } } } }
6082         poi_labels-z18:
6083             filter: { $zoom: [18,19] }
6084             draw: { icons: { text: { font: { size: 12px, weight: 600, stroke: { width: 3 } } } } }
6085         poi_labels-z20-up:
6086             filter: { $zoom: { min: 20 } }
6087             draw: { icons: { text: { font: { size: 14px, weight: 600, stroke: { width: 3 }  } } } }
6088         station-train-subway:
6089             filter: { kind: [station, train-station, train_station] } #, $zoom: { min: 13 }
6090             draw:
6091                 icons:
6092                     sprite: train_station
6093                     size: [[13, 12px], [14, 14px], [15, 16px], [17, 20px]]
6094                     priority: 11
6095                     text:
6096                         #offset: [[13, [0, 6px]], [14, [0, 7px]],[15, [0, 8px]], [17, [0, 10px]]]
6097                         priority: 12
6098             low-priority-early:
6099                 filter: { kind_tile_rank: { min: 3 }, $zoom: { min: 0, max: 12 } }
6100                 draw:
6101                     icons:
6102                         size: [[12, 5px], [14, 6px], [15, 16px]]
6103                         text:
6104                             visible: false
6105                 long-tail:
6106                     filter: { kind_tile_rank: { min: 10 }, $zoom: [10] }
6107                     draw:
6108                         icons:
6109                             visible: false
6110             low-priority-early-z12:
6111                 filter: { kind_tile_rank: { min: 8 }, $zoom: [12] }
6112                 draw:
6113                     icons:
6114 #                        visible: false
6115                         size: [[12, 5px], [14, 6px], [15, 16px]]
6116                         text:
6117                             visible: false
6118             low-priority-early-z13:
6119                 filter: { kind_tile_rank: { min: 8 }, $zoom: [13] }
6120                 draw:
6121                     icons:
6122                         #visible: false
6123                         size: [[12, 8px], [14, 6px], [15, 16px]]
6124                         text:
6125                             visible: false
6126             low-priority-early-z14:
6127                 filter: { kind_tile_rank: { min: 7 }, $zoom: [14] }
6128                 draw:
6129                     icons:
6130                         size: [[12, 10px], [14, 11px], [15, 16px]]
6131                         #visible: false
6132                         text:
6133                             visible: false
6134             late:
6135                 filter: { $zoom: { min: 16 } }
6136                 draw:
6137                     icons:
6138                         text:
6139                             font:
6140                                 weight: 600
6141                                 size: 12px
6142         subway-early:
6143             filter: { is_subway: true, is_train: false, $zoom: { max: 12 } }
6144             draw:
6145                 icons:
6146                     visible: false
6147                     text:
6148                         visible: false
6149         halt-early:
6150             filter: { kind: [halt,stop], $zoom: { max: 15 } }
6151             draw:
6152                 icons:
6153                     size: [[15, 8px], [16, 18px]]
6154                     visible: global.sdk_transit_overlay
6155                     sprite: light_rail
6156                     text:
6157                         visible: false
6158         platform-early:
6159             filter: { kind: [platform] }
6160             draw:
6161                 icons:
6162                     size: [[15, 8px], [16, 18px]]
6163                     visible: global.sdk_transit_overlay
6164                     sprite: generic
6165                     text:
6166                         visible: false
6167         tram-stop-early:
6168             filter: { kind: [tram_stop], $zoom: { max: 16 } }
6169             draw:
6170                 icons:
6171                     size: [[13, 0px], [14, 7px], [15, 8px]]
6172                     visible: global.sdk_transit_overlay
6173                     sprite: light_rail
6174                     text:
6175                         visible: false
6176         tram-stop:
6177             filter: { kind: tram_stop, $zoom: { min: 16 } }
6178             draw:
6179                 icons:
6180                     size: [[16, 12px], [17, 14px], [18, 18px]]
6181                     sprite: light_rail
6182                     #text:
6183                         #offset: [[13, [0, 6px]], [16, [0, 9px]]]
6184         bus-like-labels:
6185             filter:
6186                 kind: [platform, stop_position]
6187             draw:
6188                 icons:
6189                     size: [[13, 8px], [16, 10px], [17, 12px], [18, 18px]]
6190                     sprite: bus_station
6191                     text:
6192                         interactive: global.sdk_interactive
6193                         font:
6194                             fill: black
6195                             size: 12px
6196                             stroke: { color: white, width: 4 }
6197         bus-station-labels:
6198             filter:
6199                 kind: [bus_station, bus_stop]
6200                 $zoom: { min: 16 }
6201             draw:
6202                 icons:
6203                     size: [[13, 12px], [16, 18px]]
6204                     sprite: bus_station
6205                     priority: 17
6206                     text:
6207                         interactive: global.sdk_interactive
6208                         priority: 18
6209                         font:
6210                             fill: black
6211                             size: 12px
6212                             stroke: { color: white, width: 4 }
6213             bus_stop:
6214                 filter:
6215                     kind: [bus_stop]
6216                     $zoom: { max: 19 }
6217                 draw:
6218                     icons:
6219                         size: [[13, 8px], [19, 18px]]
6220                         text:
6221                             visible: false
6222         subway-entrance:
6223             filter:
6224                 kind: [subway_entrance]
6225             draw:
6226                 icons:
6227                     sprite: subway_entrance
6228                     size: [[17, 12px], [19, 14px]]
6229                     priority: 19
6230                     text:
6231                         #offset: [[17, [0, 6px]], [19, [0, 7px]]] # offset tracks alongside icon size (half icon height)
6232                         priority: 20
6233                         interactive: global.sdk_interactive
6234                         text_source: function() { if( feature.ref || feature.name ) { if( feature.ref && feature.name ) { return '[' + feature.ref + ']\n' + feature.name; } else { return feature.name; } } else { return "Entrance"; } }
6235                         font:
6236                             fill: black
6237                             size: 12px
6238                             stroke: { color: white, width: 4 }
6239
6240 #    transit-platforms:
6241 #        data: { source: mapzen, layer: transit }
6242 #        filter: { kind: platform, $zoom: { min: 15 }, $geometry: [polygon,line] }
6243 #        draw:
6244 #            lines:
6245 #                visible: global.sdk_transit_overlay
6246 #                color: '#bc8f96'
6247 #                width: 10m          # something fishy here with the #include syntax in v0.7 tangram?
6248 #                order: 1000         # this selection should sort above basemap, but grey Zinc color still applies
6249 #                outline:
6250 #                    order: 1002
6251 #            polygons:
6252 #                visible: global.sdk_transit_overlay
6253 #                order: 1001
6254 #        polygon_geom:
6255 #            filter: { $geometry: polygon }
6256 #            draw:
6257 #                polygons:
6258 #                    color: '#bc8f96'
6259 #                    outline:
6260 #                        color: '#bc8f96'
6261 #                        width: [[15,0px],[16,0.5px],[17,1px],[19,2px]]
6262 #                lines:
6263 #                    visible: false