-
Notifications
You must be signed in to change notification settings - Fork 21
/
bubble-wrap-style.yaml
5779 lines (5631 loc) · 243 KB
/
bubble-wrap-style.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
Author: Geraldine Sarmiento, Nathaniel V. Kelso, Patricio Gonzalez Vivo, Brett Camper, Peter Richardson
import:
- themes/bubble-wrap-icons.yaml
- themes/label-5.yaml
# NOTE: As of v10, USA and international shields are no longer included by default. Instead import each theme.
global:
# Sign up for a Mapzen API key to enjoy higher rate limits
# https://mapzen.com/documentation/overview/#developer-accounts-and-api-keys
sdk_api_key: '' # set this value to your Mapzen API key
#ux/ui
ux_point_of_view: false # 2-char ISO country code (generally)
ux_point_of_view_fallback: false # 2-char ISO country code (generally)
ux_point_of_view_kind: |
function(feature) { return (global.ux_point_of_view && feature['kind:'+global.ux_point_of_view]) || (global.ux_point_of_view_fallback && feature['kind:'+global.ux_point_of_view_fallback]) || feature.kind }
ux_point_of_view_kind_filter_country: |
function() {
// if a ux_point_of_view has been defined use that, else fallback POV, else use the feature's default kind
var kind = global.ux_point_of_view_kind(feature);
switch( kind ) {
case( 'country' ):
case( 'indefinite' ):
return true;
default:
return false;
}
}
ux_point_of_view_kind_filter_disputed_etc: |
function() {
// if a ux_point_of_view has been defined use that, else fallback POV, else use the feature's default kind
var kind = global.ux_point_of_view_kind(feature);
switch( kind ) {
case( 'disputed' ):
case( 'indeterminate' ):
case( 'lease_limit' ):
case( 'line_of_control' ):
case( 'overlay_limit' ):
case( 'disputed_breakaway' ):
case( 'disputed_claim' ):
case( 'disputed_elusive' ):
case( 'disputed_reference_line' ):
return true;
default:
return false;
}
}
ux_point_of_view_kind_filter_disputed_star: |
function() {
// if a ux_point_of_view has been defined use that, else fallback POV, else use the feature's default kind
var kind = global.ux_point_of_view_kind(feature);
switch( kind ) {
case( 'disputed' ):
case( 'line_of_control' ):
case( 'disputed_breakaway' ):
case( 'disputed_claim' ):
case( 'disputed_elusive' ):
case( 'disputed_reference_line' ):
return true;
default:
return false;
}
}
ux_point_of_view_kind_filter_unrecognized: |
function() {
// if a ux_point_of_view has been defined use that, else fallback POV, else use the feature's default kind
var kind = global.ux_point_of_view_kind(feature);
switch( kind ) {
case( 'unrecognized' ):
return true;
case( 'unrecognized_country' ):
return true;
case( 'unrecognized_region' ):
return true;
default:
return false;
}
}
ux_point_of_view_kind_filter_country_capital: |
function() {
// if a ux_point_of_view has been defined use that, else fallback POV, else use the feature's default country capital boolean
if (global.ux_point_of_view && feature['country_capital:'+global.ux_point_of_view] != null) {
return feature['country_capital:'+global.ux_point_of_view];
}
else if (global.ux_point_of_view_fallback && feature['country_capital:'+global.ux_point_of_view_fallback] != null) {
return feature['country_capital:'+global.ux_point_of_view_fallback];
}
else {
return feature.country_capital;
}
}
ux_language: false # 2-char l10n language code (generally)
ux_language_fallback: false # 2-char l10n language code (generally)
ux_language_text_source: |
function() {
// 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
return (global.ux_language && feature['name:'+global.ux_language]) || (global.ux_language_fallback && feature['name:'+global.ux_language_fallback]) || feature.name;
}
ux_language_text_source_left: |
function() {
// 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
return (global.ux_language && feature['name:left:'+global.ux_language]) || (global.ux_language_fallback && feature['name:left:'+global.ux_language_fallback]) || feature['name:left'];
}
ux_language_text_source_right: |
function() {
// 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
return (global.ux_language && feature['name:right:'+global.ux_language]) || (global.ux_language_fallback && feature['name:right:'+global.ux_language_fallback]) || feature['name:right'];
}
ux_language_text_source_boundary_lines_left_right:
left: global.ux_language_text_source_left
right: global.ux_language_text_source_right
ux_language_text_source_boundary_lines: |
function() {
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'];
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'];
if( right && left ) {
//if( right.includes(' ') || left.includes(' ') ) {
return left + " - " + right;
//} else {
// return right + '\n' + left;
//}
} else {
return (global.ux_language && feature['name:'+global.ux_language]) || (global.ux_language_fallback && feature['name:'+global.ux_language_fallback]) || feature.name;
}
}
ux_language_text_source_short: |
function() {
return (global.ux_language && feature['name:short:'+global.ux_language]) || (global.ux_language_fallback && feature['name:short:'+global.ux_language_fallback]) || feature['name:short'];
}
ux_language_text_source_short_proxy_name: |
function() {
var name = (global.ux_language && feature['name:'+global.ux_language]) || (global.ux_language_fallback && feature['name:'+global.ux_language_fallback]) || feature['name'] || '';
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'];
return short ? name : '';
}
ux_language_text_source_abbreviation: |
function() {
var name = (global.ux_language && feature['name:'+global.ux_language]) || (global.ux_language_fallback && feature['name:'+global.ux_language_fallback]) || feature['name'] || '';
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'];
return abbrev || name;
}
ux_language_text_source_iata: |
function() {
var name = (global.ux_language && feature['name:'+global.ux_language]) || (global.ux_language_fallback && feature['name:'+global.ux_language_fallback]) || feature['name'];
if(feature.iata) {
if (name) {
return name + ' (' + feature.iata + ')';
}
else {
return feature.iata;
}
} else {
return name;
}
}
ux_language_text_source_ocean: |
function() {
var name = (global.ux_language && feature['name:'+global.ux_language]) || (global.ux_language_fallback && feature['name:'+global.ux_language_fallback]) || feature['name'] || '';
name = name.split(' ').join('\n');
return name.split('').join(' ');
}
ux_language_text_source_sea: |
function() {
var name = (global.ux_language && feature['name:'+global.ux_language]) || (global.ux_language_fallback && feature['name:'+global.ux_language_fallback]) || feature['name'] || '';
name = name.split(' ').join('\n');
return name.split('').join(' ');
}
ux_language_text_source_continent_stacked_only: |
function() {
var name = (global.ux_language && feature['name:'+global.ux_language]) || (global.ux_language_fallback && feature['name:'+global.ux_language_fallback]) || feature['name'] || '';
return name.split(' ').join('\n');
}
ux_language_text_source_continent: |
function() {
var name = (global.ux_language && feature['name:'+global.ux_language]) || (global.ux_language_fallback && feature['name:'+global.ux_language_fallback]) || feature['name'] || '';
name = name.split(' ').join('\n');
return name.split('').join(' ');
}
ux_language_text_source_road_ref_and_name: |
function() {
// 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
return (global.ux_language && feature['name:'+global.ux_language]) || (global.ux_language_fallback && feature['name:'+global.ux_language_fallback]) || feature.name;
/*
var name = (global.ux_language && feature['name:'+global.ux_language]) || (global.ux_language_fallback && feature['name:'+global.ux_language_fallback]) || feature['name'];
if(feature.ref && name) {
return (feature.ref + ' ' + name);
} else {
return name;
}
*/
}
ux_language_text_source_road_ref_and_name_short: |
function() {
// 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
return (global.ux_language && feature['name:'+global.ux_language]) || (global.ux_language_fallback && feature['name:'+global.ux_language_fallback]) || feature.name;
/*
var name = (global.ux_language && feature['name:'+global.ux_language]) || (global.ux_language_fallback && feature['name:'+global.ux_language_fallback]) || feature['name'];
if (feature.ref && (feature.ref.length < 6) && name) {
return feature.ref + ' ' + name;
} else {
return name;
}
*/
}
ux_language_text_source_piste_advanced: |
function() {
var name = (global.ux_language && feature['name:'+global.ux_language]) || (global.ux_language_fallback && feature['name:'+global.ux_language_fallback]) || feature['name'];
return name ? ('◆ ' + name) : '◆';
}
ux_language_text_source_piste_expert: |
function() {
var name = (global.ux_language && feature['name:'+global.ux_language]) || (global.ux_language_fallback && feature['name:'+global.ux_language_fallback]) || feature['name'];
return name ? ('◆◆ ' + name) : '◆◆';
}
ux_language_text_source_construction: |
function() {
var name = (global.ux_language && feature['name:'+global.ux_language]) || (global.ux_language_fallback && feature['name:'+global.ux_language_fallback]) || feature['name'];
return name ? (name + ' (construction)') : '(construction)';
}
ux_language_text_source_building_and_address: |
function() {
var name = (global.ux_language && feature['name:'+global.ux_language]) || (global.ux_language_fallback && feature['name:'+global.ux_language_fallback]) || feature['name'];
if (name && feature.addr_housenumber) {
return name + '\n' + feature.addr_housenumber;
} else {
return name;
}
}
# To facilitate data visualizations several recommended sort orders are provided
#
# Your classic raster map overlay.
# Over all line and polygon features.
# Under map labels (icons and text), under UI elements
# (like routeline and search result pins).
sdk_order_over_everything_but_text_0: 490
sdk_order_over_everything_but_text_1: 491
sdk_order_over_everything_but_text_2: 492
sdk_order_over_everything_but_text_3: 493
sdk_order_over_everything_but_text_4: 494
sdk_order_over_everything_but_text_5: 495
sdk_order_over_everything_but_text_6: 496
sdk_order_over_everything_but_text_7: 497
sdk_order_over_everything_but_text_8: 498
sdk_order_over_everything_but_text_9: 499
#
# Your classic "underlay"
# Under roads. Above borders, water, landuse, and earth.
sdk_order_under_roads_0: 290
sdk_order_under_roads_1: 291
sdk_order_under_roads_2: 292
sdk_order_under_roads_3: 293
sdk_order_under_roads_4: 294
sdk_order_under_roads_5: 295
sdk_order_under_roads_6: 296
sdk_order_under_roads_7: 297
sdk_order_under_roads_8: 298
sdk_order_under_roads_9: 299
#
# Under water.
# Above earth and most landuse.
sdk_order_under_water_0: 190
sdk_order_under_water_1: 191
sdk_order_under_water_2: 192
sdk_order_under_water_3: 193
sdk_order_under_water_4: 194
sdk_order_under_water_5: 195
sdk_order_under_water_6: 196
sdk_order_under_water_7: 197
sdk_order_under_water_8: 198
sdk_order_under_water_9: 199
#
# Under everything.
# Tip: disable earth layer.
sdk_order_under_everything_0: 0
sdk_order_under_everything_1: 1
sdk_order_under_everything_2: 2
sdk_order_under_everything_3: 3
sdk_order_under_everything_4: 4
sdk_order_under_everything_5: 5
sdk_order_under_everything_6: 6
sdk_order_under_everything_7: 7
sdk_order_under_everything_8: 8
sdk_order_under_everything_9: 9
#
# TRANSIT OVERLAY
# should default to "auto", with SDK overriding it to true or false,
# or app logic sets other booleans that triggers auto behavior later
sdk_transit_overlay: false
#
# TOLL ROAD OVERLAY
# should default to "false", with SDK overriding it to true or false,
# or app logic sets other booleans that triggers auto behavior later
sdk_toll_road_overlay: false
#
# HEAVY GOODS VEHICLE OVERLAY
# should default to "false", with SDK overriding it to true or false,
# or app logic sets other booleans that triggers auto behavior later
sdk_hgv_overlay: false
#
# SHIELDS
sdk_shield_color: [0.506,0.192,0.169]
sdk_shield_text_color: white
#
# enable interactivity for key features
sdk_interactive: true
#
# default order for basemap features
feature_order: function() { return feature.sort_rank; }
#
#
#label styling
text_fill: [0.300, 0.300, 0.300] # BLACK
text_fill2: '#555' # WHITE
text_fill_road_e: '#555' # WHITE
text_fill_exits: [0.920,0.398,0.340] # motorway junctions, highway_casing1
text_fill_building: '#ccc' # WHITE
text_fill_address: '#aaa' # HUH
text_fill_water: '#4c89b5' # blue
text_fill_park: [0.35,0.35,0.35] # black
text_fill_beach: [0.35,0.35,0.35] # black
text_fill_piste: '#444' # dark gray
text_fill_piste_e: '#666' # dark gray early
text_fill_shield: white # road shield fill color
text_stroke: [0.870,0.870,0.870] # land color
text_stroke_water: [0.9, 0.9, 0.9] # water stroke color
text_stroke_park: '#bddec5' # park stroke color
text_stroke_building: [0.83, 0.83, 0.83] # building stroke color
text_stroke_address: [0.85, 0.85, 0.85] # address stroke color
text_stroke_road1: [0.9, 0.9, 0.9] # road stroke color highway
text_stroke_road2: [0.9, 0.9, 0.9] # road stroke color major road
text_stroke_road3: [0.9, 0.9, 0.9] # road stroke color major road route
text_stroke_road4: [0.9, 0.9, 0.9] # road stroke color minor road
text_stroke_shield: '#D16768' # road shield stroke color &highway_casing1
townspot_sprite: townspot-m-rev # depends on land color and text settings
text_font_family: 'Open Sans' # branding in asperational Unicode, yo (or Helvetica)
#
#roads
highway1: [0.988,0.495,0.439]
highway1_e: [0.988,0.495,0.439]
highway_link1: [1.000,0.631,0.590]
highway_casing1: [0.859,0.859,0.859]
highway_tunnel1: [0.800,0.800,0.800]
highway_tunnel_casing1: [0.870,0.870,0.870]
highway_link_tunnel_casing1: [0.8, 0.8, 0.7]
ferry1: '#8bb5e4'
rail1: '#999'
rail1_e: '#bbb'
rail2: '#777' # less important rail (service, sidings)
major_road1: [1, 1, 1]
major_road1b: [1.0,1.0,1.0]
major_road1c: white #15%
major_road2: [1.0,1.0,1.0]
major_road2a: [1.0,1.0,1.0]
major_road2b: [1.0,1.0,1.0]
major_road3: [1.0,1.0,1.0]
major_road4: white
major_road5: white
major_casing1: [0.859,0.859,0.859] # same as highway_casing1
major_casing2: [0.859,0.859,0.859] # zoomed out
major_tunnel1: [.870,0.870,0.870] # light orange (major_route1)
major_tunnel_casing1: [0.780,0.780,0.780]
major_route1: [1.000,0.631,0.590]
major_route2: [1.000,0.752,0.730] # zoomed out
minor_route: [1.000,0.631,0.590] # same as major_route
minor_road1: [0.9,0.9,0.9] # natural earth
minor_road2: [0.9,0.9,0.9] # natural earth, same as major_road2
minor_road3: [0.9,0.9,0.9]
minor_road4: [0.9,0.9,0.9] # zoomed out
minor_road5: [0.9,0.9,0.9] # zoomed out, again
minor_casing1: white # same as highway_casing1
minor_casing2: white # zoomed out
minor_tunnel1: [0.8, 0.8, 0.7]
minor_tunnel_casing1: white
service_road1: white
service_road2: white
service_road_casing1: [0.770,0.770,0.770]
service_road_casing2: white
path1: [0.91,0.91,0.91]
path2: [0.91,0.91,0.91] # zoomed out
path_casing1: [0.875,0.875,0.875]
path_bridge_casing1: [0.870,0.870,0.870]
path_bridge_casing2: [0.870,0.870,0.870] # zoomed out
path_steps1: [0.91,0.91,0.91]
path_steps1_b: '#f0ebeb'
piste_easy: [0.367,0.750,0.622]
piste_intermediate: [0.420,0.678,0.863]
piste_advanced: [0.450,0.450,0.450]
piste_expert: [0.450,0.450,0.450]
#
#boundaries
country_boundary: [1.0,1.0,1.0]
region_boundary: [0.96,0.96,0.96]
subregion_boundary: '#bbb'
city_wall: [0.682,0.682,0.682]
retaining_wall: [0.827,0.808,0.780]
snow_fence: [0.827,0.808,0.780]
fence: [0.827,0.808,0.780]
#
#landuse
water1: [0.83, 0.83, 0.83] # water
water2: [0.83, 0.83, 0.83] # playa
water3: [0.83, 0.83, 0.83] # intermittent water (not full playa)
water1_o: '#9dc3de' # water stroke
water2_o: '#9dc3de' # water stroke 2
earth1: [0.870,0.870,0.870] # land color, used to set scene background color
earth1_r: '#666' # land color road
earth2: '#e9e4e0' # urban
earth2_v: false # urban
earth2_e: '#b3b3b3' # urban early
earth2_e2: '#b3b3b3' # urban early fade in
earth2_e3: '#bbbbbb' # urban early fade in 3
earth2_ev: true # urban early visibility
green1: [0.140,0.843,0.824] # park
green1_r: [0.140,0.843,0.824] # roads in parks
green1_b: '#94d8d6' # buildings in parks
green1_bo: '#7fc3c1' # buildings in parks, outlines
green1_w: '#b7d7bf' # wilderness area
green1_ws: '#aed0b6' # wilderness area stroke
green1b: [0.80,0.80,0.80] # park
green2: [0.547,0.760,0.590] # cemetery
green2_r: [0.7,0.7,0.7] # cemetery road
green3: [0.000,0.779,0.328] # golf course
green4: '#526054' # farm faint
green4_v: true # farm faint
green5: '#5a695c' # farm
green6: '#648560' # nature reserve
green7: [0.169,0.651,0.631] # forest
green8: [0.123,0.770,0.587] # conservation
green9: '#cfe3d4' # forest (landcover)
green9_e: '#cfe3d4' # forest (landcover) early
green9_v: true # forest (landcover) visibility
green10: '#c7d4c0' # sports_centre
green11: '#d8ddd0' # minor zoo related AOIs
green11_o: '#aec7b5' # minor zoo related AOIs outline
orange1: '#bfb08e' # stadium
orange2: '#d8ccb0' # pitch (play field)
orange3: '#b9a597' # racetrack (play field)
brown1: [0.814,0.692,0.570] # university
brown1_r: [0.814,0.692,0.570] # roads in university
brown1_b: [.65, .65, .65] # university buildings
brown1_bo: [.8, .8, .8] # university building outlines
brown2: '#ada497' # school
brown3: '#c7b7a2' # playground
red1: [0.840,0.503,0.541] # hospital
red1_r: [0.840,0.503,0.541] # roads in hospital
red1_b: [.65, .65, .65] # hospital buildings
red1_bo: [.8, .8, .8] # hospital building outlines
grey1: '#717171' # pedestrian, retail, airport apron, parking, church
grey1_e: '#cac6c4' # pedestrian, retail, airport apron, parking, church early zoom 14
grey1_v: true # pedestrian, retail, airport apron, parking, church
grey2: [0.5, 0.5, 0.5] # airport runway
grey3: grey # railway
grey4: '#ffc52a' # airport taxiway
grey5: '#ffc52a' # airport taxiway
grey6: '#c6c6c6' # industrial
grey6_b: [.65, .65, .65] # industrial buildings
grey6_bo: [.8, .8, .8] # industrial building outlines
grey7: '#ecebe9' # pedestrian, match minor road / path color
grey7_v: true # pedestrian visibility
grey8: '#ecebe9' # winter sports
grey8_v: true # winter sports visibility
grey9: [.7, .0, .0, 0.5] # [.7, .7, .7] # transit platform
grey9_o: [.5, .5, .5] # transit platform outline
grey9_v: true # transit platform visibility
grey10: '#d4cce6' # generic major landuse (theme park, resort, aquarium, winery)
grey10_o: '#bcb9c5' # generic major landuse outline
grey11: '#d7d7d7' # generic minor landuse (attraction, artwork)
grey11_o: '#cccccc' # generic minor landuse outline
grey12: '#cfcfcf' # generic minor amusements (roller coasters, rides, slide, carousel)
grey12_o: '#c5c5c5' # generic minor amusements
purple: '#f0e1e1' # airport
purple_v: false # airport
purple_b: '#c2c3c4' # airport buildings
purple_bo: '#969798' # airport buildings outline
mystry1: '#bfb08e' # recreation ground
yellow1: '#e7eda8' # beach
building1: [0.784, 0.784, 0.784] # building
building2: [.860, .860, .860] # building stroke
building_o: 5 # building stroke order
building_e: true # building stroke order early
sdk_building_extrude: true # building extrusion toggle
building_extrude_height: | # building extrude height logic
function() { return feature.height || 20; }
# TODO: Some of this should optimized server side by dropping names and shield_text
# in a similar way (and even changing min_zoom). We'd still need the
# collision_priority function here, though.
collision_priority: | # label collision priority logic
function() {
if (feature['collision_rank'] != null) {
if (feature['name'] != null) {
return feature['min_zoom'] + (1 - 1 / feature['collision_rank']) * 0.1;
}
// TODO: This should be moved server side. See the peak and
// park icons in Alta Plaza Park in San Francisco CA
return feature['min_zoom'] + 2 + (1 - 1 / feature['collision_rank']) * 0.1;
}
return feature['min_zoom'] + 0.9999;
}
collision_priority_road_shields: | # show labels later in the lines
function() {
if (feature['collision_rank'] != null) {
// We want to effectively adjust the min_zoom for the shields separate
// from their line/polygon visibility by giving them a WORSE collision
// than POIs, but still better than general road text labels
return feature['min_zoom'] + 5 + (1 - 1 / feature['collision_rank']) * 0.1;
}
return feature['min_zoom'] + 4.9999;
}
collision_priority_roads: | # show labels later in the lines
function() {
if (feature['collision_rank'] != null) {
// We want to effectively adjust the min_zoom for the labels separate
// from their line/polygon visibility by giving them a WORSE collision
return feature['min_zoom'] + 8 + (1 - 1 / feature['collision_rank']) * 0.1;
}
return feature['min_zoom'] + 7.9999;
}
collision_priority_water: | # show labels later in the lines and polys
function() {
if (feature['collision_rank'] != null) {
return feature['min_zoom'] + 3 + (1 - 1 / feature['collision_rank']) * 0.1;
}
return feature['min_zoom'] + 2.9999;
}
collision_priority_transit_pois: | # show labels earlier than normal
function(feature, default_priority) {
if (feature['collision_rank'] != null) {
// We want to give transit POIs (for the overlay) a BETTER collision
return feature['min_zoom'] - 3 +
(1 - 1 / (default_priority +
(feature['tile_kind_rank'] || 100) * 0.1 + feature['collision_rank'] * 0.01) * 0.1);
}
return feature['min_zoom'] + 0.9999;
}
textures:
building-grid:
url: images/building-grid.gif
#url: https://raw.githubusercontent.com/tangrams/bubble-wrap/gh-pages/images/building-grid.gif
filtering: mipmap
fonts:
Open Sans:
- weight: 300 # Light
url: fonts/OpenSans-Light.woff
- weight: normal # Regular
url: fonts/OpenSans-Regular.woff
- weight: normal # Regular
style: italic
url: fonts/OpenSans-Italic.woff
- weight: 600 # Semi Bold
url: fonts/OpenSans-Semibold.woff
- weight: 600 # Semi Bold
style: italic
url: fonts/OpenSans-SemiboldItalic.woff
- weight: bold
url: fonts/OpenSans-Bold.woff
Montserrat:
- weight: normal
#url: https://fonts.gstatic.com/s/montserrat/v7/zhcz-_WihjSQC0oHJ9TCYL3hpw3pgy2gAi-Ip7WPMi0.woff
url: fonts/Montserrat-Regular.woff
- weight: 500
#url: https://fonts.gstatic.com/s/montserrat/v10/BYPM-GE291ZjIXBWrtCweqLy3K7m9xj_O5xwN3SdQNs.woff
url: fonts/Montserrat-Medium.woff
- weight: 700
#url: https://fonts.gstatic.com/s/montserrat/v10/IQHow_FEYlDC4Gzy_m8fcnbFhgvWbfSbdVg11QabG8w.woff
url: fonts/Montserrat-Bold.woff
Varela:
- weight: normal
#url: https://fonts.gstatic.com/s/varela/v7/maB5vWJo0EAVzvHPjBkLM-vvDin1pK8aKteLpeZ5c0A.woff
url: fonts/Varela-Regular.woff
Quicksand:
- weight: normal
#url: https://fonts.gstatic.com/s/quicksand/v6/sKd0EMYPAh5PYCRKSryvW7O3LdcAZYWl9Si6vvxL-qU.woff
url: fonts/Quicksand-Regular.woff
sources:
mapzen:
type: MVT #TopoJSON
url: https://tile.nextzen.org/tilezen/vector/v1/512/all/{z}/{x}/{y}.mvt
#url: https://dev-tile.nextzen.org/tilezen/vector/v1/512/all/{z}/{x}/{y}.mvt
#url: http://localhost:8050/tilezen/vector/v1/512/all/{z}/{x}/{y}.mvt?api_key=&
#url: https://xyz.api.here.com/tiles/herebase.02/{z}/{x}/{y}/omv
url_params:
api_key: global.sdk_api_key
tile_size: 512
max_zoom: 16
# # Only enable this for local debug, should not be enabled for prod (app inserts these at runtime)
# # These are all in San Francisco, California
# #
# # Current location gem
# mz_current_location:
# type: GeoJSON
# url: https://gist.githubusercontent.com/anonymous/9e9588228b0a604264a2/raw/b28be49bea0b7feb859eb65b588c28e9fee5ae2c/map.geojson
# # Route line
# mz_route_line:
# type: GeoJSON
# # sf to ny
# # url: https://gist.githubusercontent.com/anonymous/30c6c1a75c168d91d90c/raw/92bfe55e622766d250b1f2f5d17bdc7c26acb956/map.geojson
# # local sf trip
# url: https://gist.githubusercontent.com/anonymous/9a610ebda6fe4be7bccc/raw/8d217e43f2412d48d01534ba115f1e42dac72e68/map.geojson
# # Dashed route line
# mz_dash_line:
# type: GeoJSON
# url: https://gist.githubusercontent.com/anonymous/d73b851c64c3e5fbfc2754aa32f44c10/raw/938ae435776e176919c4797bed1465a92e403ef3/map.geojson
# # Transit route line
# mz_route_line_transit:
# type: GeoJSON
# url: https://gist.githubusercontent.com/anonymous/71ae88cbc6d62c4d141ecd6a61060050/raw/2254bbc18243f5dc609e663a580c9412a7447936/map.geojson
# # Pin at start of route
# mz_route_start:
# type: GeoJSON
# url: https://gist.githubusercontent.com/anonymous/5262969cb7549ea69221/raw/be03f233fa323d9b5cf50ef1d8e89a1faa3750f1/map.geojson
# # Pin at end of route
# mz_route_destination:
# type: GeoJSON
# url: https://gist.githubusercontent.com/anonymous/dbae9635dfe46796490e/raw/df55c318635a7d91b309ed40754d4738a292fd38/map.geojson
# # Arrow for current route location
# mz_route_location:
# type: GeoJSON
# url: https://gist.githubusercontent.com/anonymous/36613092be6e2aa004fd/raw/f753d13069425199e1dea1b449ef67d723f6510e/map.geojson
# # Dots for transit stops in route preview
# mz_route_transit_stop:
# type: GeoJSON
# url: https://gist.githubusercontent.com/anonymous/b9f16bca4a804f50faf71277d52ee4ab/raw/db13e4e765fa1ac8844b8ba02f4a0f66fe772907/map.geojson
# # Pins showing search result locations
# mz_search_result:
# type: GeoJSON
# url: https://gist.githubusercontent.com/anonymous/57dc09eeb120919f76de/raw/43426217da3c2bae0522dc4257aaa61e4df3981e/map.geojson
# # Default point styling (SDK)
# mz_default_point:
# type: GeoJSON
# url: https://gist.githubusercontent.com/anonymous/16324c771edfce45be0721390389b878/raw/7dbaebf17da7da8562e6c6f8768bc8cff83efa88/map.geojson
# # Default shield styling (SDK)
# mz_default_shield:
# type: GeoJSON
# url: https://gist.githubusercontent.com/nvkelso/3c08dba1eced4d01df98c1a9a7801162/raw/d83a5a396fc7b22309b8ca89336ad2dcfff6c452/map.geojson
# # Default line styling (SDK)
# mz_default_line:
# type: GeoJSON
# url: https://gist.githubusercontent.com/anonymous/26f4e8b6b34b2617b5d5533d89decb39/raw/df8e180ab4f7f19448014dccc4a755f7cfa20003/map.geojson
# # Default polygon styling (SDK)
# mz_default_polygon:
# type: GeoJSON
# url: https://gist.githubusercontent.com/anonymous/88235c795bb44b8c45150bdd5561f947/raw/71d4fab97b6513833bf1a589167119e6169ef86d/map.geojson
cameras:
isometric:
type: isometric
styles:
dashed:
base: lines
dash: [1.25, 1.25]
dash_background_color: [0.808,0.860,0.851]
dashed_big:
base: lines
dash: [2.0, 1.0]
dash_background_color: [0.808,0.860,0.851]
dashed_steps:
base: lines
dash: [0.5, 0.5]
dash_background_color: [0.867, 0.867, 0.867]
tools-tilecoords:
shaders:
blocks:
global: |
// Varying to be added to both vertex and fragment shaders
varying vec2 v_pos;
#ifdef TANGRAM_FRAGMENT_SHADER
vec2 TileCoords() {
return fract(v_pos);
}
#endif
position: |
v_pos = modelPosition().xy;
tools-aastep:
shaders:
extensions: OES_standard_derivatives
blocks:
global: |
float aastep(float threshold, float value) {
#ifdef TANGRAM_FRAGMENT_SHADER
#ifdef TANGRAM_EXTENSION_OES_standard_derivatives
float afwidth = length(vec2(dFdx(value), dFdy(value))) * 0.70710678118654757;
return smoothstep(threshold - afwidth, threshold + afwidth, value);
#else
return step(threshold, value);
#endif
#else
return step(threshold, value);
#endif
}
tools-grid:
mix: tools-tilecoords
shaders:
blocks:
global: |
#ifdef TANGRAM_FRAGMENT_SHADER
bool grid(vec2 st, float res, float press) {
vec2 grid = fract(st * res);
return (grid.x < res * press) || (grid.y < res * press);
}
float TileGrid(float res) {
vec2 st = TileCoords() * 100. * res;
float pct = 0.0;
float press = 0.4 + (1.0 - fract(u_map_position.z)) * 0.1;
if (grid(st, 0.01, press)) { pct += 0.5; }
if (grid(st, 0.1, press)) { pct += 0.15; }
return pct;
}
float TileGrid() {
return mix(TileGrid(1.), TileGrid(2.), fract(u_map_position.z));
}
#endif
grid:
base: polygons
mix: [tools-grid]
shaders:
blocks:
filter: |
color.rgb = vec3(0.899, 0.95, 1.0);
color.rgb = mix(color.rgb, vec3(0.654,0.856,0.896), TileGrid());
water_border:
base: lines
texcoords: true
mix: tools-aastep
shaders:
blocks:
global: |
float pulse(float x, float p, float w) {
x = abs(x - p);
if (x > w) { return 0.0; }
x /= w;
return (1.0 - x * x * (3.0 - 2.0 * x));
}
width: |
// Comment/Uncomment to fix the line to the border
width *= 1.0 - v_texcoord.x;
color: |
vec2 st = v_texcoord.xy;
float pattern = aastep(.5, pulse(st.x, .75, .15) + pulse(st.x, .4, .10) + pulse(st.x, .1, .1));
color.rgb = mix(color.rgb, vec3(0.675,0.855,0.886), pattern);
shapes-circle:
shaders:
blocks:
global: |
// get distance field of a Circle
// ================================
float circleDF (vec2 st) {
return dot(st,st);
}
tiling-brick:
shaders:
blocks:
global: |
// Repeats a coordinate space (st) in diferent brick-like tiles
// ================================
vec2 brick(vec2 st, float zoom){
st *= zoom;
// Here is where the offset is happening
st.x += step(1., mod(st.y, 2.0)) * 0.5;
return fract(st);
}
pattern-dots:
mix: [tools-tilecoords, tiling-brick, shapes-circle, tools-aastep]
shaders:
blocks:
global: |
#ifdef TANGRAM_FRAGMENT_SHADER
float TileDots(float scale, float size) {
// controls
float DOT_SIZE = 1.8; // bigger value = smaller dots
float SPEED = 10.; // bigger value = faster transition
vec2 tc = TileCoords() * scale * exp2(floor(u_map_position.z) - abs(u_tile_origin.z));
vec2 IN = brick(tc, 2.);
float A = circleDF(vec2(0.5) - IN) * DOT_SIZE;
vec2 OUT = brick(tc, 4.);
float B = circleDF(vec2(0.5) - OUT) * DOT_SIZE;
float transition = pow(fract(u_map_position.z), SPEED);
// keep B dots big as they fade in, to maintain density
B *= transition;
float d = mix(A, B, transition);
return aastep(size, d);
}
#endif
dots:
base: polygons
mix: pattern-dots
shaders:
blocks:
color: |
color.rgb = mix(color.rgb, vec3(0.850), TileDots(45., 0.1));
// size was set to 35 previously, now 45
dots-rev:
base: polygons
mix: pattern-dots
shaders:
blocks:
color: |
color.rgb = mix(vec3(0.850), color.rgb, TileDots(45., .21));
# HSV/RGB functions
hsv:
shaders:
blocks:
global: |
vec3 rgb2hsv(vec3 c)
{
vec4 K = vec4(0.0, -1.0 / 3.0, 2.0 / 3.0, -1.0);
vec4 p = mix(vec4(c.bg, K.wz), vec4(c.gb, K.xy), step(c.b, c.g));
vec4 q = mix(vec4(p.xyw, c.r), vec4(c.r, p.yzx), step(p.x, c.r));
float d = q.x - min(q.w, q.y);
float e = 1.0e-10;
return vec3(abs(q.z + (q.w - q.y) / (6.0 * d + e)), d / (q.x + e), q.x);
}
vec3 hsv2rgb(vec3 c)
{
vec4 K = vec4(1.0, 2.0 / 3.0, 1.0 / 3.0, 3.0);
vec3 p = abs(fract(c.xxx + K.xyz) * 6.0 - K.www);
return c.z * mix(K.xxx, clamp(p - K.xxx, 0.0, 1.0), c.y);
}
scale-buildings:
shaders:
blocks:
position: |
// scale buildings based on zoom
float zoom = u_map_position.z;
float min = .1; // minimum building scale
float midpoint = 16.; // middle of zoom range
float inspeed = .1; // number of zooms to scale buildings up
float outspeed = 2.; // number of zooms to scale buildings back down
float e = 0.;
if (zoom >= midpoint) {
e = (zoom - midpoint) / (outspeed * .2);
} else {
e = abs(zoom - midpoint) / inspeed;
}
position.z *= ((1. - min) / (1. + (exp(e)))) + min;
building-grid:
base: polygons
lighting: false
mix: [hsv, scale-buildings]
texcoords: true
shaders:
uniforms:
u_tex_grid: building-grid
defines:
WALL_TINT: vec3(1., 3., .800)
blocks:
color: |
if (dot(vec3(0., 0., 1.), worldNormal()) < .5) {
// If it's a wall
color.rgb = hsv2rgb(rgb2hsv(color.rgb) * WALL_TINT);
color.rgb = mix(color.rgb, vec3(0.),
texture2D(u_tex_grid, v_texcoord).a);
}
building-lines:
base: lines
mix: scale-buildings
lines_transparent:
base: lines
blend: overlay
outline_transparent:
base: lines
blend: overlay
polygons_transparent:
base: polygons
blend: overlay
text-blend-order:
base: text
blend_order: 1
ux-route-line-overlay:
base: lines
blend: overlay
blend_order: 0
ux-route-line-dash-overlay:
base: lines
blend: overlay
blend_order: 0
dash: [2, 1]
ux-transit-line-overlay:
base: lines
blend: overlay
blend_order: 0
ux-location-gem-overlay:
base: points
texture: mapzen_icon_library
blend: overlay
blend_order: 2
ux-icons-overlay:
base: points
texture: mapzen_icon_library
blend: overlay
blend_order: 3
sdk-point-overlay:
base: points
texture: mapzen_icon_library
blend: overlay
blend_order: 3
sdk-shield-overlay:
base: points
texture: mapzen_icon_library
blend: overlay
blend_order: 3
sdk-line-overlay:
base: lines
blend: overlay
blend_order: 0
sdk-polygon-overlay:
base: polygons
blend: overlay
blend_order: 0
scene:
background:
color: global.earth1
layers:
# Map overlays for styling the server response (using special source layer names) for route line, current location, and search result pins
mz_route_line:
data: { source: mz_route_line }
draw:
ux-route-line-overlay:
interactive: global.sdk_interactive
color: '#06a6d4'
order: 500
width: [[0,3.5px],[5,5px],[9,7px],[10,6px],[11,6px],[13,8px],[14,9px],[15,10px],[16,11px],[17,12px],[18,10px]]
mz_route_line_dash:
data: { source: mz_dash_line }
draw:
ux-route-line-dash-overlay:
interactive: global.sdk_interactive
color: '#06a6d4'
order: 500
width: [[2,2px],[5,2.5px],[11,3px],[16,7px],[17,9px]]
mz_route_line_transit:
data: { source: mz_route_line_transit }
draw:
ux-transit-line-overlay:
# each transit route segment could be a different "line" each with it's own color
# but some transit lines don't define a color, in those cases default to blue
# and since the color is coming from Transit.land they call it "color" instead of "colour"
interactive: global.sdk_interactive
color: function() { return feature.color || '#06a6d4'; }
order: 500
width: [[0,3.5px],[5,5px],[9,7px],[10,6px],[11,6px],[13,8px],[14,9px],[15,10px],[16,11px],[17,12px],[18,10px]]
mz_current_location_gem:
data: { source: mz_current_location }
draw:
ux-location-gem-overlay:
interactive: global.sdk_interactive
sprite: ux-current-location
size: 36px
collide: false
transition: { show: { time: 0s }, hide: { time: 0s } }
mz_route_location:
data: { source: mz_route_location }
draw:
ux-location-gem-overlay:
interactive: global.sdk_interactive
sprite: ux-route-arrow
size: [60px,60px]
collide: false
transition: { show: { time: 0s }, hide: { time: 0s } }
mz_route_start:
data: { source: mz_route_start }
draw:
ux-icons-overlay:
interactive: global.sdk_interactive
priority: 1
sprite: ux-route-start
size: [36px,46px]
collide: false
anchor: top
transition: { show: { time: 0s }, hide: { time: 0s } }
mz_route_destination:
data: { source: mz_route_destination }
draw:
ux-icons-overlay:
interactive: global.sdk_interactive