This repository has been archived by the owner on Jan 10, 2020. It is now read-only.
forked from tangrams/cinnabar-style
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcinnabar-style.yaml
6081 lines (5926 loc) · 266 KB
/
cinnabar-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
# Cinnabar is a classic look and should be your go-to for general mapping applications.
# Give OpenStreetMap data a refined basemap skin using the Tangram graphics library and
# Mapzen's versatile Vector Tiles.
#
# This style is a High Road influenced evolution of the Traditional style Stamen created
# for Mapzen's Open Android app in 2014. Please use and adapt the open source scene file
# in your own projects!
#
# Authors: Nathaniel V. Kelso, Geraldine Sarmiento
# Read more: https://github.com/tangrams/cinnabar-style
#
labels-global:
- &text_visible_continent true
- &text_visible_admin true
- &text_visible_populated_places true
- &icon_visible_populated_places true
- &text_visible_neighbourhoods true
- &text_visible_neighbourhoods_e true
- &text_visible_building true
- &text_visible_address true
- &text_visible_water_labels true
- &label_visible_landuse_green true
- &icon_visible_landuse_green false
- &text_visible_landuse_green true
- &label_visible_poi_landuse true
- &icon_visible_poi_landuse true
- &text_visible_poi_landuse false
- &label_visible_poi_landuse_e true
- &icon_visible_poi_landuse_e false
- &text_visible_poi_landuse_e true
- &label_visible_station false
- &icon_visible_station false
- &text_visible_station false
- &text_visible_highway true
- &text_visible_highway_e false
- &text_visible_trunk_primary true
- &text_visible_trunk_primary_e2 false
- &text_visible_trunk_primary_e false
- &text_visible_secondary true
- &text_visible_secondary_e false
- &text_visible_tertiary true
- &text_visible_tertiary_e false
- &text_visible_minor_road true
- &text_visible_minor_road_e true
- &text_visible_service_road true
- &text_visible_path true
- &text_visible_piste true
- &text_visible_steps true
- &text_visible_aerialway true
- &text_visible_shields true
- &text_visible_exits true
- &text_visible_exits_e false
- &text_visible_airport_gate true
cinnabar-colors:
cameras:
- &camera_settings { type: isometric, axis: [0, .1], vanishing_point: [0, -500] }
lights:
- &light_settings { type: directional, direction: [1, 1, -.9], diffuse: 0.5, ambient: 0.85 }
roads:
- &highway1 '#f8c2c2'
- &highway1_e '#eeb1b1'
- &highway_link1 '#D19596'
- &highway_casing1 '#D16768'
- &highway_tunnel1 '#D19596' #85%
- &highway_tunnel_casing1 [0.3, 0.3, 0.3] #95%
- &highway_link_tunnel_casing1 '#D16768' #95%
- &ferry1 '#7caacb'
- &rail1 '#777'
- &rail1_e '#bbb'
- &rail2 '#999' # less important rail (service, sidings)
- &major_road1 '#fbf2f2' #80%
- &major_road1b '#faeeee' #10%
- &major_road1c white #15%
- &major_road2 white #20%
- &major_road2a white #17%
- &major_road2b white #25%
- &major_road3 white #30%
- &major_road4 white
- &major_road5 '#e3989a'
- &major_casing1 '#d19596' # same as highway_casing1
- &major_casing2 '#d19596' # zoomed out
- &major_tunnel1 grey # light orange (major_route1)
- &major_tunnel_casing1 [0.3, 0.3, 0.3]
- &major_route1 '#f8d8d9'
- &major_route2 '#e3989a' # zoomed out
- &minor_route '#d19596' # same as major_route
- &minor_road1 white # natural earth
- &minor_road2 white # natural earth, same as major_road2
- &minor_road3 white
- &minor_road4 white # zoomed out
- &minor_road5 white # zoomed out, again
- &minor_casing1 white # same as highway_casing1
- &minor_casing2 grey # zoomed out
- &minor_tunnel1 white
- &minor_tunnel_casing1 [0.3, 0.3, 0.3]
- &service_road1 white
- &service_road2 white
- &service_road_casing1 white
- &service_road_casing2 white
- &path1 '#fff'
- &path2 '#fff' # zoomed out
- &path_casing1 grey
- &path_bridge_casing1 black
- &path_bridge_casing2 grey # zoomed out
- &path_steps1 '#bcc19e'
- &path_steps1_b '#e3e2e0'
- &piste_easy '#d0d0d0'
- &piste_intermediate '#d0d0d0'
- &piste_advanced '#b3b3b3'
- &piste_expert '#a6a6a6'
boundaries:
- &country_boundary '#fff'
- ®ion_boundary '#eee'
- &subregion_boundary '#eee'
- &city_wall '#ccb38f'
- &retaining_wall '#d9c4a5'
- &snow_fence '#d9c4a5'
- &fence '#555555'
areas:
- &scene1 false # map background, water
- &water1 false # water
- &water2 [.75,.75,.75] # playa
- &water1_o false # water stroke
- &water2_o false # water stroke 2
- &earth1 false # land color
- &earth1_r '#666' # land color road
- &earth2 '#d8d3ca' # urban
- &earth2_v false # urban visibility
- &earth2_e '#d8d3ca' # urban early
- &earth2_e2 '#d4cfc6' # urban early fade in
- &earth2_e3 '#dbd8d3' # urban early fade in 3
- &earth2_ev true # urban early visibility
- &green1 '#aed0b6' # park (national park, local parks)
- &green1_r '#bddec5' # park roads
- &green1_b '#9caca0' # park buildings
- &green1_bo [.20, .20, .20] # park building outlines
- &green1_w '#b7d7bf' # wilderness area
- &green1_ws '#aed0b6' # wilderness area stroke
- &green1b [0.80,0.80,0.80] # park
- &green2 '#b8d2bf' # cemetery
- &green2_r [0.7,0.7,0.7] # cemetery road
- &green2_b '#9caca0' # cemetery, zoo buildings
- &green2_bo [.20, .20, .20] # cemetery, zoo building outline
- &green3 '#b8d2bf' # golf course
- &green4 '#e3e2e0' # farm faint
- &green4_v false # farm faint
- &green5 '#e3e2e0' # farm
- &green6 '#94d59f' # nature reserve
- &green7 '#bddec5' # forest
- &green8 '#bddec5' # 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
- &green12 [0.584,0.843,0.792] # grass (common areas)
- &orange1 '#bfb08e' # stadium
- &orange2 '#d8ccb0' # pitch (play field)
- &orange3 '#b9a597' # racetrack (play field)
- &brown1 '#D9CFC3' # university
- &brown1_r '#cec1b2' # university roads
- &brown1_b '#b1aca4' # university buildings
- &brown1_bo [.30, .30, .30] # university building outlines
- &brown2 '#D9CFC3' # school
- &brown3 '#c7b7a2' # playground
- &red1 '#d9c3c3' # hospital
- &red1_r '#d9c3c3' # hospital roads
- &red1_b '#b5a7a7' # hospital buildings
- &red1_bo [.30, .30, .30] # hospital building outlines
- &grey1 '#d7d7d7' # retail, airport apron, parking, church
- &grey1_e '#cacaca' # retail, airport apron, parking, church early zoom 14
- &grey1_v true # retail, airport apron, parking, church
- &grey2 orange # airport runway
- &grey3 '#d7d7d7' # railway
- &grey4 '#ffc52a' # airport taxiway
- &grey5 '#ffc52a' # airport taxiway
- &grey6 '#d1d1d1' # industrial
- &grey6_b [.70, .70, .70] # industrial buildings
- &grey6_bo [.20, .20, .20] # 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 [.569,.69,.722,.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 '#d2d1cd' # airport
- &purple_v true # airport visibility
- &purple_b '#c2c3c4' # airport buildings
- &purple_bo '#969798' # airport buildings outline
- &mystry1 '#d9d7c3' # recreation ground
- &yellow1 '#e7eda8' # beach
- &building1 [.8, .8, .8] # building
- &building2 [.6, .6, .6] # building stroke
- &building_o 5 # building stroke order
- &building_e true # building stroke order
labels:
- &text_fill '#333' # WHITE
- &text_fill2 '#000' # WHITE
- &text_fill_road_e '#555' # WHITE
- &text_fill_exits '#D16768' # motorway junctions, highway_casing1
- &text_fill_building '#ccc' # WHITE
- &text_fill_address '#aaa' # HUH
- &text_fill_water '#4c89b5' # blue
- &text_fill_park '#43a254' # green
- &text_fill_beach '#99905c' # green
- &text_fill_piste '#444' # dark gray
- &text_fill_piste_e '#666' # dark gray early
- &text_fill_shield white # road shield fill color
- &text_stroke '#e4e1de' # land color
- &text_stroke_water [0.9, 0.9, 0.9] # water stroke color
- &text_stroke_park '#bddec5' # park stroke color
- &text_stroke_building [.8, .8, .8] # building stroke color
- &text_stroke_address [0.85, 0.85, 0.85] # address stroke color
- &text_stroke_road1 '#f8c2c2' # road stroke color highway
- &text_stroke_road2 '#fbf2f2' # road stroke color major road
- &text_stroke_road3 '#f8d8d9' # road stroke color major road route
- &text_stroke_road4 white # road stroke color minor road
- &text_stroke_shield '#D16768' # road shield stroke color &highway_casing1
- &townspot_sprite townspot-l-rev # depends on land color and text settings
- &text_font_family 'Open Sans' # branding in asperational Unicode, yo (or Helvetica)
textures:
pois:
url: images/[email protected]
filtering: mipmap
sprites:
# define sprites: [x origin, y origin, width, height]
airport: [870, 0, 38, 38]
aquarium: [732, 168, 38, 38]
art-gallery: [640, 168, 38, 38]
athletics-sports: [184, 168, 38, 38]
atm: [918, 126, 38, 38]
automotive-shop: [0, 168, 38, 38]
bakery: [548, 168, 38, 38]
bank: [964, 126, 38, 38]
bar: [230, 168, 38, 38]
baseball-field: [506, 84, 38, 38]
basketball-court: [460, 84, 38, 38]
beach: [644, 84, 38, 38]
beer-garden: [276, 210, 38, 38]
bench: [548, 0, 38, 38]
bicycle-parking: [644, 126, 38, 38]
bike-shop: [872, 126, 38, 38]
boat-ferry: [824, 0, 38, 38]
boat-ramp: [138, 84, 40, 38]
bookstore: [826, 126, 38, 38]
bridge: [920, 84, 38, 38]
buddhism: [782, 84, 38, 38]
building: [414, 168, 34, 34]
burger: [138, 210, 38, 38]
bus-station: [778, 0, 38, 38]
butcher: [920, 42, 38, 38]
campground: [828, 84, 38, 38]
candy-store: [0, 210, 38, 38]
capital-l: [514, 210, 16, 16]
capital-m: [494, 210, 12, 12]
capital-s: [474, 210, 10, 10]
capital-xl: [538, 210, 20, 20]
capital-xs: [460, 210, 8, 8]
car-dealership: [780, 126, 38, 38]
castle: [414, 42, 38, 38]
cemetery: [736, 84, 38, 38]
church: [230, 126, 38, 38]
clothing-store: [824, 168, 38, 38]
coffee-shop: [502, 168, 38, 38]
college-university: [870, 168, 38, 38]
convenience-store: [46, 84, 38, 38]
courthouse: [364, 0, 38, 38]
current-location: [80, 342, 88, 88]
department-store: [734, 126, 38, 38]
drinking-water: [230, 210, 38, 38]
dry-cleaning: [0, 84, 38, 38]
electronics-store: [598, 126, 38, 38]
factory: [368, 168, 38, 38]
fire-station: [318, 0, 38, 38]
fitness: [874, 42, 38, 38]
flower-shop: [184, 126, 38, 38]
forest: [46, 210, 38, 38]
fountain: [322, 126, 38, 38]
garden: [690, 84, 38, 38]
gas-station: [960, 168, 38, 38]
generic: [414, 210, 38, 38]
gift-shop: [138, 126, 38, 38]
golf-course: [414, 84, 38, 38]
government-building: [138, 168, 38, 38]
grocery-store: [552, 126, 38, 38]
harbor-marina: [92, 168, 40, 38]
hardware-store: [828, 42, 38, 38]
historic-site: [92, 126, 38, 38]
hospital: [184, 0, 34, 34]
hotel: [732, 0, 38, 38]
ice-cream-shop: [322, 210, 38, 38]
information: [368, 210, 38, 38]
jewelry-store: [736, 42, 38, 38]
landmark: [272, 0, 38, 38]
laundry: [690, 42, 38, 38]
library: [0, 0, 38, 38]
light-rail: [686, 0, 38, 38]
lighthouse: [276, 84, 38, 38]
liquor-store: [506, 126, 38, 38]
locate-off: [414, 342, 72, 72]
locate-on: [334, 342, 72, 72]
mall: [644, 42, 38, 38]
market: [598, 42, 38, 38]
mine: [782, 42, 40, 38]
mobile-phone-shop: [506, 42, 38, 38]
mosque: [92, 0, 38, 38]
mountain: [230, 84, 38, 38]
movie-theatre: [778, 168, 38, 38]
museum: [46, 126, 38, 38]
music-store: [368, 42, 38, 38]
newsstand: [322, 42, 38, 38]
office: [598, 84, 38, 38]
optical-shop: [276, 42, 38, 38]
park: [276, 126, 38, 38]
parking: [690, 126, 38, 38]
performing-arts: [594, 168, 38, 38]
pet-store: [230, 42, 38, 38]
pharmacy: [966, 42, 38, 38]
photography-lab: [184, 42, 38, 38]
pier: [640, 0, 38, 38]
playground: [460, 42, 38, 38]
police: [226, 0, 38, 38]
pool: [184, 84, 38, 38]
post-office: [322, 168, 38, 38]
real-estate: [138, 42, 38, 38]
recycling-facility: [92, 42, 38, 38]
rental-car: [594, 0, 38, 38]
restaurant: [92, 210, 38, 38]
route-arrow: [776, 210, 128, 128]
route-start: [0, 342, 72, 92]
route-stop: [912, 210, 72, 92]
ruin: [502, 0, 38, 38]
salon-barber: [46, 42, 38, 38]
school: [552, 84, 38, 38]
search-active: [174, 342, 72, 108]
search-inactive: [254, 342, 72, 108]
shoe-store: [552, 42, 38, 38]
ski-area: [368, 126, 38, 38]
soccer-field: [368, 84, 38, 38]
spiritual-center: [276, 168, 38, 38]
sporting-goods-shop: [0, 42, 38, 38]
spring: [322, 84, 38, 38]
stadium: [460, 126, 38, 38]
subway-entrance: [456, 0, 38, 38]
synagogue: [46, 0, 38, 38]
tailor-shop: [962, 0, 38, 38]
tennis: [414, 126, 38, 38]
theme-park: [0, 126, 38, 38]
toilets: [874, 84, 38, 38]
townspot-l: [724, 210, 16, 16]
townspot-l-rev: [618, 210, 16, 16]
townspot-m: [704, 210, 12, 12]
townspot-m-rev: [598, 210, 12, 12]
townspot-s: [686, 210, 10, 10]
townspot-s-rev: [580, 210, 10, 10]
townspot-xl: [748, 210, 20, 20]
townspot-xl-rev: [642, 210, 20, 20]
townspot-xs: [670, 210, 8, 8]
townspot-xs-rev: [566, 210, 6, 6]
toy-game-store: [916, 0, 38, 38]
traffic-signal: [916, 168, 36, 34]
train-station: [410, 0, 38, 38]
veterinarian: [138, 0, 38, 38]
view-point: [686, 168, 40, 38]
vineyard: [46, 168, 40, 38]
volcano: [92, 84, 38, 38]
wine-bar: [184, 210, 38, 38]
winery: [456, 168, 38, 38]
zoo: [966, 84, 38, 38]
sources:
osm:
type: TopoJSON #GeoJSON, MVT, TopoJSON
url: //vector.mapzen.com/osm/all/{z}/{x}/{y}.topojson?api_key=vector-tiles-NuhNJ11
#url: '//vector.dev.mapzen.com/osm/all/{z}/{x}/{y}.topojson'
#url: //localhost:8080/osm/all/{z}/{x}/{y}.json
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
# # 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_stop:
# 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
# # 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 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
camera:
type: isometric
axis: [0, .1] # very small building extrusion
#lights:
# light1:
# type: directional
# direction: [1, 1, -.9]
# diffuse: .5
# ambient: .85
styles:
dashedline:
base: lines
texcoords: true
shaders:
blocks:
global: |
vec2 mirrorTile(vec2 _st, vec2 _zoom){
_st *= _zoom;
if (fract(_st.y * 0.5) > 0.5){
_st.x = _st.x+0.5;
_st.y = 1.0-_st.y;
}
return fract(_st);
}
float fillY(vec2 _st, float _pct,float _antia){
return smoothstep( _pct-_antia, _pct, _st.y);
}
float chevron(vec2 st){
st = mirrorTile(st,vec2(1.,6.));
float x = st.x*2.;
float a = floor(1.+sin(x*3.14));
float b = floor(1.+sin((x+1.)*3.14));
float f = fract(x);
return fillY(st,mix(a,b,f),0.01);
}
float stripes(vec2 st){
st = st*10.;
return step(.5,1.0-smoothstep(.3,1.,abs(sin(st.y*3.1415))));
}
float xMargin(vec2 st,float margin){
return 1.0-clamp(step(margin*.5,st.x)*step(margin*.5,1.0-st.x),0.,1.);
}
// Function from Iñigo Quiles
// https://www.shadertoy.com/view/MsS3Wc
vec3 hsb2rgb( in vec3 c ){
vec3 rgb = clamp(abs(mod(c.x*6.0+vec3(0.0,4.0,2.0),
6.0)-3.0)-1.0,
0.0,
1.0 );
rgb = rgb*rgb*(3.0-2.0*rgb);
return c.z * mix(vec3(1.0), rgb, c.y);
}
color: |
vec2 st = v_texcoord;
vec4 foreground = vec4(0.400,0.400,0.400,1.0);
vec3 color1 = hsb2rgb(vec3(color.r,1.,1.));
vec3 color2 = hsb2rgb(vec3(color.g,1.,1.));
// Nathaniel un-comment the following lines
color = mix(v_color,foreground, chevron(st) - xMargin(st,.25) );
color = mix(v_color,foreground, stripes(st) );
// color = mix(v_color,foreground, clamp(stripes(st)-xMargin(st,.9),0.,1.) ) ;
tools:
base: polygons
shaders:
extensions: OES_standard_derivatives
blocks:
global: |
// GridTile
//=============================
varying vec3 v_pos;
#ifdef TANGRAM_FRAGMENT_SHADER
vec2 TileCoords() {
return fract(v_pos.xy*0.0002445);
}
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.1;
return pct;
}
float TileGrid() {
return mix(TileGrid(1.),TileGrid(2.),fract(u_map_position.z));
}
float aastep(float threshold, float value) {
#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
}
vec2 tile(vec2 _st, float _zoom){
_st *= _zoom;
return fract(_st);
}
vec2 brickTile(vec2 st, float zoom){
st *= zoom;
if (fract(st.y * 0.5) > 0.5){
st.x += 0.5;
}
return fract(st);
}
float circleDF(vec2 st){
vec2 pos = vec2(0.5)-st;
return dot(pos,pos)*3.14;
}
float circle(vec2 st, float radius){
radius *= 0.75;
return 1.-aastep(radius,circleDF(st));
}
float dots(vec2 st, float size){
st = brickTile(st, 2.);
return circle(st, size);
}
float dotsDF(vec2 st){
st = brickTile(st, 2.);
return circleDF(st);
}
float TileDots(float scale, float size) {
vec2 IN = TileCoords()*scale;
vec2 OUT = TileCoords()*scale*2.;
float pct = fract(u_map_position.z);
pct = pow(pct,6.);
// return mix(dots(fract(IN),size*(1.-pct)), dots(fract(OUT),size*pct), pct);
return mix(dots(fract(IN),size*(1.-pct)), dots(fract(OUT),size*pct), pct);
}
float TileDotsDF(float scale, float size) {
vec2 IN = TileCoords()*scale;
vec2 OUT = TileCoords()*scale*2.;
float pct = fract(u_map_position.z);
pct = pow(pct,15.);
float d = 0.0;
d = dotsDF(fract(IN))*(1.-pct) + dotsDF(fract(OUT))*pct;
d = 1.-aastep(size,d);
return d;
}
// Grain
//=============================
float random(vec2 p) {
return fract(1e4 * sin(17.0 * p.x + p.y * 0.1) * (0.1 + abs(sin(p.y * 13.0 + p.x))));
}
float noise(vec2 x) {
vec2 i = floor(x);
vec2 f = fract(x);
float a = random(i);
float b = random(i + vec2(1.0, 0.0));
float c = random(i + vec2(0.0, 1.0));
float d = random(i + vec2(1.0, 1.0));
vec2 u = f * f * (3.0 - 2.0 * f);
return mix(a, b, u.x) + (c - a) * u.y * (1.0 - u.x) + (d - b) * u.x * u.y;
}
float fbm(in vec2 p) {
float s = 0.0;
float m = 0.0;
float a = 0.5;
for(int i=0; i<2; i++ ){
s += a * noise(p);
m += a;
a *= 0.5;
p *= 2.0;
}
return s/m;
}
float grain(vec2 pos) {
vec2 st = pos/u_resolution.xy-vec2(.5);
return dot(st,st)+(fbm(pos*0.6)*0.1);
}
#endif
position: |
// GridTile
v_pos = modelPosition().xyz * 32767.;
grid:
base: polygons
mix: tools
shaders:
blocks:
filter: |
vec2 st = (TileCoords()+vec2(.4))*1000.;
color.rgb = mix(vec3(0.899,0.95,1.0), vec3(0.899,0.95,1.0), gl_FragCoord.x / u_resolution.x);
color.rgb -= grain(gl_FragCoord.xy)*0.1;
color.rgb = mix(color.rgb, vec3(0.639,0.886,0.906), TileGrid());
//float g = grain(st);
//color.rgb = mix(color.rgb, vec3(0.475,0.853,0.853),pow(g,3.5));
ground:
base: polygons
mix: tools
shaders:
blocks:
filter: |
color.rgb -= grain(gl_FragCoord.xy)*0.5;
ground2:
base: polygons
mix: tools
shaders:
blocks:
filter: |
color.rgb -= grain(gl_FragCoord.xy)*0.2;
lines_transparent:
base: lines
blend: overlay
outline_transparent:
base: lines
blend: overlay
polygons_transparent:
base: polygons
blend: overlay
icons:
base: points
texture: pois
interactive: true
blend_order: 1
text-blend-order:
base: text
blend_order: 1
ui-lines-overlay:
base: lines
blend: overlay
blend_order: 0
ui-location-gem-overlay:
base: points
texture: pois
interactive: true
blend: overlay
blend_order: 2
ui-icons-overlay:
base: points
texture: pois
interactive: true
blend: overlay
blend_order: 3
sdk-point-overlay:
base: points
texture: pois
interactive: true
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: *scene1
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:
ui-lines-overlay:
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:
ui-location-gem-overlay:
interactive: true
sprite: current-location
size: 36px
collide: false
transition:
[show, hide]:
time: 0s
mz_route_location:
data: { source: mz_route_location }
draw:
ui-location-gem-overlay:
interactive: true
sprite: route-arrow
size: [60px,60px]
collide: false
transition:
[show, hide]:
time: 0s
mz_route_start:
data: { source: mz_route_start }
draw:
ui-icons-overlay:
interactive: true
priority: 1
sprite: route-start
size: [36px,46px]
collide: false
anchor: top
transition:
[show, hide]:
time: 0s
mz_route_stop:
data: { source: mz_route_stop }
draw:
ui-icons-overlay:
interactive: true
priority: 1
sprite: route-stop
size: [36px,46px]
collide: false
anchor: top
transition:
[show, hide]:
time: 0s
mz_search_result:
data: { source: mz_search_result }
draw:
ui-icons-overlay:
interactive: true
sprite: search-active
size: [36px,54px]
collide: false
anchor: top
transition:
[show, hide]:
time: 0s
inactive:
filter: { state: inactive }
draw:
ui-icons-overlay:
sprite: search-inactive
mz_dropped_pin:
data: { source: mz_dropped_pin }
draw:
ui-icons-overlay:
interactive: true
sprite: search-active
size: [36px,54px]
collide: false
anchor: top
transition:
[show, hide]:
time: 0s
# Used by the SDK to place point, line, and polygon overlays on the map
mz_default_point:
data: { source: mz_default_point }
draw:
sdk-point-overlay:
interactive: true
sprite: search-active
size: [36px,54px]
collide: false
anchor: top
transition:
[show, hide]:
time: 0s
mz_default_line:
data: { source: mz_default_line }
draw:
sdk-line-overlay:
color: '#06a6d4'
order: 503
width: 3px
mz_default_polygon:
data: { source: mz_default_polygon }
draw:
sdk-polygon-overlay:
color: [0.02,0.65,0.82,0.5] #'#06b1e2'
order: 501
sdk-line-overlay:
color: '#06a6d4'
order: 502
width: 0px
# Basemap styling
earth:
data: { source: osm, layer: earth }
draw:
polygons:
order: function() { return feature.sort_key; }
color: *earth1
ocean-water:
data: { source: osm, layer: water }
# don't filter ocean polys because OSM ocean split tiles don't have coherent areas
filter: { kind: ocean }
draw:
polygons:
order: function() { return feature.sort_key; }
color: *water1
water_boundaries-ocean:
filter: { boundary: yes, $zoom: { min: 10 } }
draw:
lines:
order: function() { return feature.sort_key; }
color: *water1_o
width: [[10,1px],[12,2px]]
join: round
water-not-ocean:
data: { source: osm, layer: water }
filter: { not: { kind: ocean } }
draw:
polygons:
order: function() { return feature.sort_key; }
#color: *water1
inland-water:
filter:
all:
- kind: [lake, water, riverbank, reservoir, playa, swimming_pool]
any:
# limit show smaller landuse areas to higher zooms
- { $zoom: { min: 1 }, area: { min: 40000000000 } }
- { $zoom: { min: 2 }, area: { min: 20000000000 } }
# some weird natural earth scale set transition
- { $zoom: { min: 3 }, area: { min: 80000000000 } }
- { $zoom: { min: 4 }, area: { min: 5000000000 } }
- { $zoom: { min: 5 }, area: { min: 700000000 } }
- { $zoom: { min: 6 }, area: { min: 500000000 } }
- { $zoom: { min: 7 }, area: { min: 160000000 } }
- { $zoom: { min: 8 }, area: { min: 40000000 } }
- { $zoom: { min: 9 }, area: { min: 10000000 } }
- { $zoom: { min: 10 }, area: { min: 8000000 } }
- { $zoom: { min: 11 }, area: { min: 2000000 } }
- { $zoom: { min: 12 }, area: { min: 200000 } }
- { $zoom: { min: 13 }, area: { min: 100000 } }
- { $zoom: { min: 14 }, area: { min: 2000 } }
- { $zoom: { min: 15 } }
draw:
polygons:
color: *water1
other-water-areas:
filter: { not: { kind: [lake, water, reservoir, playa] }, $zoom: { min: 11 }, area: { min: 100 } }
draw:
polygons:
color: *water1
playas:
filter: { kind: playa, $zoom: {min: 6} }
draw:
polygons:
color: *water2
# swimming_pool:
# filter: { kind: swimming_pool }
# draw:
# polygons:
# order: 8
water_boundaries-not-ocean:
filter:
all:
- boundary: yes
- $zoom: { min: 14 }
any:
- { $zoom: { min: 14 }, area: { min: 2000 } }
- { $zoom: { min: 15 } }
draw:
lines:
order: function() { return feature.sort_key; }
color: *water2_o
width: [[14,1.0px],[16,1.5px],[18,2m]]
join: round
river:
filter: { kind: [river,canal,stream,dam,ditch,drain], $zoom: { min: 13 } }
draw:
lines:
order: function() { return feature.sort_key; }
color: *water2_o
width: [[13,0.5px],[14,1.0px],[16,1.5px],[18,4m]]
join: round
subway-light-rail:
data: { source: osm, layer: transit }
filter: { not: { kind: [platform] }, $zoom: { min: 14 } }
draw:
lines:
interactive: true
order: function() { return feature.sort_key || 275; }
railway:
filter: { kind: [railway,train] }
draw:
lines:
color: grey
width: [[14,1px],[16,2px],[18,3m]]
subway:
filter: { kind: subway }
draw:
lines:
color: *rail1
width: [[14,0.5px],[16,1px],[17,1.5px],[18,2m]]
light_rail:
filter: { kind: [light_rail,tram], $zoom: { min: 15 } }
draw:
lines:
order: 415 # We want this to be above roads, below gondolas
color: grey
width: [[14,0.5px],[16,1px],[17,1.5px],[19,1m]]
railway-late:
data: { source: osm, layer: roads }
filter: { kind: rail, not: { railway: [subway,light_rail,tram] } }
draw:
lines:
interactive: true
color: [[14,*rail1_e],[16,*rail1]]
width: [[15,0.5px],[16,0.75px],[18,1m]]
# let roads sort themselves past zoom 14
order: function() { return feature.sort_key; }
# but give them all the same outline
outline:
order: 354
bridges-tunnels:
filter: { any: [is_bridge: yes, is_tunnel: yes] }
draw:
lines:
outline:
# except bridges and tunnels, their outlines should also self-sort
order: function() { return feature.sort_key || 305; }
service:
filter: { service: true }
draw:
lines:
color: *rail2
width: [[14,0px],[15,0.4px],[16,0.6px],[18,0.7m]]
platforms:
data: { source: osm, layer: transit }
filter: { kind: platform, $zoom: { min: 16 } }
draw:
lines_transparent:
color: *grey9
width: 5m
visible: *grey9_v
order: function() { if($zoom<17) { return feature.sort_key; } else { return 435; } }
polygons_transparent: