Skip to content

Commit e8cbe56

Browse files
authored
Merge pull request #85 from tangrams/sensescape/more-shields
updated icons and more shields
2 parents 2aaf35b + 6b88c5e commit e8cbe56

File tree

6 files changed

+1170
-354
lines changed

6 files changed

+1170
-354
lines changed

VERSION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
10.0.0
1+
11.0.0

index.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222

2323
<!-- Main tangram library -->
2424
<!-- production -->
25-
<script src="https://mapzen.com/tangram/0.14/tangram.min.js"></script>
25+
<script src="https://www.nextzen.org/tangram/0.14/tangram.min.js"></script>
2626
<!-- <script src="https://precog.mapzen.com/tangrams/tangram/master/dist/tangram.min.js"></script> -->
2727
<!-- production debug -->
2828
<!-- <script src="https://mapzen.com/tangram/0.14/tangram.debug.js"></script> -->
@@ -384,7 +384,7 @@
384384
if( dev_or_prod == 'dev' ) {
385385
url += 'dev.';
386386
}
387-
url += 'mapzen.com/mapzen/vector/v1/all/' + zoom + '/' + tileCoords.x + '/' + tileCoords.y + '.topojson' + '?api_key=' + mapzen_api_key;
387+
url += 'nextzen.org/tilezen/vector/v1/all/' + zoom + '/' + tileCoords.x + '/' + tileCoords.y + '.topojson' + '?api_key=' + mapzen_api_key;
388388
return url;
389389
}
390390

refill-style.yaml

Lines changed: 189 additions & 75 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ import:
1818
global:
1919
# Sign up for a Mapzen API key to enjoy higher rate limits
2020
# https://mapzen.com/documentation/overview/#developer-accounts-and-api-keys
21-
sdk_mapzen_api_key: '' # set this value to your Mapzen API key
21+
sdk_api_key: '' # set this value to your Mapzen API key
2222

2323
#ux/ui
2424
ux_language: false # l10n language code, trusting OSM in v0.10 tiles, fixed in v1.0 tiles
@@ -254,20 +254,18 @@ textures:
254254

255255
sources:
256256
mapzen:
257-
type: TopoJSON #GeoJSON, MVT, TopoJSON
258-
url: https://tile.mapzen.com/mapzen/vector/v1/512/all/{z}/{x}/{y}.topojson
257+
type: MVT #GeoJSON, MVT, TopoJSON
258+
url: https://tile.nextzen.org/tilezen/vector/v1/512/all/{z}/{x}/{y}.mvt
259259
url_params:
260-
api_key: global.sdk_mapzen_api_key
261-
#url: https://tile.dev.mapzen.com/mapzen/vector/v1/all/{z}/{x}/{y}.topojson
262-
# url: //localhost:8080/vector/all/{z}/{x}/{y}.topojson
260+
api_key: global.sdk_api_key
263261
tile_size: 512
264262
max_zoom: 16
265263
normals: # normals
266264
type: Raster
267265
# prod
268-
url: https://tile.mapzen.com/mapzen/terrain/v1/512/normal/{z}/{x}/{y}.png
266+
url: https://tile.nextzen.org/tilezen/terrain/v1/512/normal/{z}/{x}/{y}.png
269267
url_params:
270-
api_key: global.sdk_mapzen_api_key
268+
api_key: global.sdk_api_key
271269
tile_size: 512
272270
max_zoom: 14
273271

@@ -2317,6 +2315,7 @@ layers:
23172315
}
23182316
}
23192317
sprite_default: generic_shield_5char
2318+
size: [[7,[90%,90%]],[12,[100%,100%]],[15,[110%,110%]]]
23202319
priority: 58
23212320
repeat_group: shields
23222321
repeat_distance: [[8, 90px],[10, 40px],[13, 30px]]
@@ -2407,42 +2406,42 @@ layers:
24072406
# draw:
24082407
# mapzen_icon_library:
24092408
# visible: false
2410-
width_1char:
2411-
filter: |
2412-
function() {
2413-
if( feature.shield_text ) {
2414-
return (feature.shield_text.length === 1)
2415-
} else {
2416-
return (feature.ref.length === 1)
2417-
}
2418-
}
2419-
draw:
2420-
mapzen_icon_library:
2421-
size: [[6,[14px,14px]],[13,[16px,16px]],[16,[18px,18px]]]
2422-
width_2char:
2423-
filter: |
2424-
function() {
2425-
if( feature.shield_text ) {
2426-
return (feature.shield_text.length === 2)
2427-
} else {
2428-
return (feature.ref.length === 2)
2429-
}
2430-
}
2431-
draw:
2432-
mapzen_icon_library:
2433-
size: [[6,[18px,14px]],[13,[20px,15px]],[16,[24px,18px]]]
2434-
width_3char:
2435-
filter: |
2436-
function() {
2437-
if( feature.shield_text ) {
2438-
return (feature.shield_text.length === 3)
2439-
} else {
2440-
return (feature.ref.length === 3)
2441-
}
2442-
}
2443-
draw:
2444-
mapzen_icon_library:
2445-
size: [[6,[25px,14px]],[13,[27px,15px]],[16,[33px,18px]]]
2409+
# width_1char:
2410+
# filter: |
2411+
# function() {
2412+
# if( feature.shield_text ) {
2413+
# return (feature.shield_text.length === 1)
2414+
# } else {
2415+
# return (feature.ref.length === 1)
2416+
# }
2417+
# }
2418+
# draw:
2419+
# mapzen_icon_library:
2420+
# size: [[6,[14px,14px]],[13,[16px,16px]],[16,[18px,18px]]]
2421+
# width_2char:
2422+
# filter: |
2423+
# function() {
2424+
# if( feature.shield_text ) {
2425+
# return (feature.shield_text.length === 2)
2426+
# } else {
2427+
# return (feature.ref.length === 2)
2428+
# }
2429+
# }
2430+
# draw:
2431+
# mapzen_icon_library:
2432+
# size: [[6,[18px,14px]],[13,[20px,15px]],[16,[24px,18px]]]
2433+
# width_3char:
2434+
# filter: |
2435+
# function() {
2436+
# if( feature.shield_text ) {
2437+
# return (feature.shield_text.length === 3)
2438+
# } else {
2439+
# return (feature.ref.length === 3)
2440+
# }
2441+
# }
2442+
# draw:
2443+
# mapzen_icon_library:
2444+
# size: [[6,[25px,14px]],[13,[27px,15px]],[16,[33px,18px]]]
24462445
width_4char:
24472446
filter: |
24482447
function() {
@@ -2453,8 +2452,8 @@ layers:
24532452
}
24542453
}
24552454
draw:
2456-
mapzen_icon_library:
2457-
size: [[6,[29px,14px]],[13,[31px,15px]],[16,[38px,18px]]]
2455+
# mapzen_icon_library:
2456+
# size: [[6,[29px,14px]],[13,[31px,15px]],[16,[38px,18px]]]
24582457
# London sucks
24592458
early:
24602459
filter: { $zoom: { max: 14 } }
@@ -2471,8 +2470,8 @@ layers:
24712470
}
24722471
}
24732472
draw:
2474-
mapzen_icon_library:
2475-
size: [[6,[34px,14px]],[13,[37px,15px]],[16,[45px,18px]]]
2473+
# mapzen_icon_library:
2474+
# size: [[6,[34px,14px]],[13,[37px,15px]],[16,[45px,18px]]]
24762475
# London sucks
24772476
early:
24782477
filter: { $zoom: { max: 14 } }
@@ -2502,17 +2501,27 @@ layers:
25022501
#
25032502
# Now for the good stuff
25042503
#
2505-
legit-shields:
2506-
filter: { shield_text: true }
2504+
z-legit-shields:
2505+
filter: |
2506+
function() {
2507+
return feature.shield_text ||
2508+
/^A.*$/.test(feature.ref) ||
2509+
/^B.*$/.test(feature.ref) ||
2510+
/^D.*$/.test(feature.ref) ||
2511+
/^N.*$/.test(feature.ref) ||
2512+
/^MEX.*$/.test(feature.ref)
2513+
}
25072514
# draw:
25082515
# mapzen_icon_library:
25092516
# color: red
2517+
25102518
# US Interstate roads
25112519
US-I:
25122520
filter:
25132521
network: 'US:I'
25142522
draw:
25152523
mapzen_icon_library:
2524+
texture: mapzen_icon_library_shields_usa
25162525
# you need to match any custom shield to the vector tile `network` values
25172526
sprite: function() { return (feature.network + '-' + feature.shield_text.length + 'char'); }
25182527
priority: 46
@@ -2554,6 +2563,7 @@ layers:
25542563
$zoom: { min: 7 }
25552564
draw:
25562565
mapzen_icon_library:
2566+
texture: mapzen_icon_library_shields_usa
25572567
# you need to match any custom shield to the vector tile `network` values
25582568
sprite: |
25592569
function() { return ('US:US-' + feature.shield_text.length + 'char'); }
@@ -2619,6 +2629,7 @@ layers:
26192629
}
26202630
draw:
26212631
mapzen_icon_library:
2632+
texture: mapzen_icon_library_shields_usa
26222633
sprite: function() { return (feature.network + '-' + feature.shield_text.length + 'char'); }
26232634
text:
26242635
offset: [0px, 1px]
@@ -2675,6 +2686,7 @@ layers:
26752686
}
26762687
draw:
26772688
mapzen_icon_library:
2689+
texture: mapzen_icon_library_shields_usa
26782690
sprite: |
26792691
function() { return ( 'US:NY-' + feature.shield_text.length + 'char'); }
26802692
text:
@@ -2716,6 +2728,7 @@ layers:
27162728
}
27172729
draw:
27182730
mapzen_icon_library:
2731+
texture: mapzen_icon_library_shields_usa
27192732
sprite: |
27202733
function() { return ( 'US:PA-' + feature.shield_text.length + 'char'); }
27212734
text:
@@ -2783,6 +2796,7 @@ layers:
27832796
}
27842797
draw:
27852798
mapzen_icon_library:
2799+
texture: mapzen_icon_library_shields_usa
27862800
# you need to match any custom shield to the vector tile `network` values
27872801
sprite: function() { return ('county_shield-' + feature.shield_text.length + 'char'); }
27882802
# priority: 19
@@ -2796,31 +2810,131 @@ layers:
27962810
# draw:
27972811
# mapzen_icon_library:
27982812
# visible: false
2799-
width_1char:
2800-
filter: function() { return (feature.shield_text.length === 1) }
2801-
draw:
2802-
mapzen_icon_library:
2803-
size: [[6,[14px,14px]],[13,[16px,16px]],[15,[18px,18px]]]
2804-
width_2char:
2805-
filter: function() { return (feature.shield_text.length === 2) }
2806-
draw:
2807-
mapzen_icon_library:
2808-
size: [[6,[16px,14px]],[13,[18px,16px]],[15,[22px,18px]]]
2809-
width_3char:
2810-
filter: function() { return (feature.shield_text.length === 3) }
2811-
draw:
2812-
mapzen_icon_library:
2813-
size: [[6,[20px,14px]],[13,[21px,15px]],[15,[26px,18px]]]
2814-
width_4char:
2815-
filter: function() { return (feature.shield_text.length === 4) }
2816-
draw:
2817-
mapzen_icon_library:
2818-
size: [[6,[25px,14px]],[13,[28px,15px]],[15,[34px,18px]]]
2819-
width_5char:
2820-
filter: function() { return (feature.shield_text.length === 5) }
2821-
draw:
2822-
mapzen_icon_library:
2823-
size: [[6,[30px,14px]],[13,[33px,15px]],[15,[40px,18px]]]
2813+
# width_1char:
2814+
# filter: function() { return (feature.shield_text.length === 1) }
2815+
# draw:
2816+
# mapzen_icon_library:
2817+
# size: [[6,[14px,14px]],[13,[16px,16px]],[15,[18px,18px]]]
2818+
# width_2char:
2819+
# filter: function() { return (feature.shield_text.length === 2) }
2820+
# draw:
2821+
# mapzen_icon_library:
2822+
# size: [[6,[16px,14px]],[13,[18px,16px]],[15,[22px,18px]]]
2823+
# width_3char:
2824+
# filter: function() { return (feature.shield_text.length === 3) }
2825+
# draw:
2826+
# mapzen_icon_library:
2827+
# size: [[6,[20px,14px]],[13,[21px,15px]],[15,[26px,18px]]]
2828+
# width_4char:
2829+
# filter: function() { return (feature.shield_text.length === 4) }
2830+
# draw:
2831+
# mapzen_icon_library:
2832+
# size: [[6,[25px,14px]],[13,[28px,15px]],[15,[34px,18px]]]
2833+
# width_5char:
2834+
# filter: function() { return (feature.shield_text.length === 5) }
2835+
# draw:
2836+
# mapzen_icon_library:
2837+
# size: [[6,[30px,14px]],[13,[33px,15px]],[15,[40px,18px]]]
2838+
2839+
US-OTHER:
2840+
filter: |
2841+
function() {
2842+
return feature.shield_text &&
2843+
/^US:AK$/.test(feature.network) ||
2844+
/^US:AL$/.test(feature.network) ||
2845+
/^US:AR$/.test(feature.network) ||
2846+
/^US:AZ$/.test(feature.network) ||
2847+
/^US:BIA$/.test(feature.network) ||
2848+
/^US:BLM$/.test(feature.network) ||
2849+
/^US:CO$/.test(feature.network) ||
2850+
/^US:DC$/.test(feature.network) ||
2851+
/^US:FL$/.test(feature.network) ||
2852+
/^US:FSH$/.test(feature.network) ||
2853+
/^US:FSR$/.test(feature.network) ||
2854+
/^US:GA$/.test(feature.network) ||
2855+
/^US:HI$/.test(feature.network) ||
2856+
/^US:ID$/.test(feature.network) ||
2857+
/^US:KS$/.test(feature.network) ||
2858+
/^US:LA$/.test(feature.network) ||
2859+
/^US:MA$/.test(feature.network) ||
2860+
/^US:CT$/.test(feature.network) ||
2861+
/^US:IL$/.test(feature.network) ||
2862+
/^US:TX$/.test(feature.network) ||
2863+
/^US:IN$/.test(feature.network) ||
2864+
/^US:RI$/.test(feature.network) ||
2865+
/^US:ME$/.test(feature.network) ||
2866+
/^US:WV$/.test(feature.network) ||
2867+
/^US:MT$/.test(feature.network) ||
2868+
/^US:MD$/.test(feature.network) ||
2869+
/^US:MN$/.test(feature.network) ||
2870+
/^US:MO$/.test(feature.network) ||
2871+
/^US:NC$/.test(feature.network) ||
2872+
/^US:MI$/.test(feature.network) ||
2873+
/^US:ND$/.test(feature.network) ||
2874+
/^US:NE$/.test(feature.network) ||
2875+
/^US:NH$/.test(feature.network) ||
2876+
/^US:NJ$/.test(feature.network) ||
2877+
/^US:IA$/.test(feature.network) ||
2878+
/^US:DE$/.test(feature.network) ||
2879+
/^US:KY$/.test(feature.network) ||
2880+
/^US:MS$/.test(feature.network) ||
2881+
/^US:NM$/.test(feature.network) ||
2882+
/^US:NV$/.test(feature.network) ||
2883+
/^US:OH$/.test(feature.network) ||
2884+
/^US:OK$/.test(feature.network) ||
2885+
/^US:OR$/.test(feature.network) ||
2886+
/^US:SC$/.test(feature.network) ||
2887+
/^US:SD$/.test(feature.network) ||
2888+
/^US:TN$/.test(feature.network) ||
2889+
/^US:UT$/.test(feature.network) ||
2890+
/^US:VA$/.test(feature.network) ||
2891+
/*TODO: US:VA:secondary*/
2892+
/^US:VT$/.test(feature.network) ||
2893+
/^US:WA$/.test(feature.network) ||
2894+
/^US:WI$/.test(feature.network) ||
2895+
/^US:WY$/.test(feature.network)
2896+
/*US:CA*/
2897+
/*US:I*/
2898+
/*US:NY*/
2899+
/*US:PA*/
2900+
/*US:US*/
2901+
/*county_shield*/
2902+
}
2903+
draw:
2904+
mapzen_icon_library:
2905+
texture: mapzen_icon_library_shields_usa
2906+
sprite: |
2907+
function() { return ( feature.network + '-' + feature.shield_text.length + 'char'); }
2908+
text:
2909+
# offset: [0px, 1px]
2910+
font:
2911+
fill: global.black_color
2912+
#size: [[7,7px],[13,9px],[15,10px]]
2913+
# width_1char:
2914+
# filter: function() { return (feature.shield_text.length === 1) }
2915+
# draw:
2916+
# mapzen_icon_library:
2917+
# size: [[6,[13px,17px]],[13,[15px,19px]],[15,[18px,22px]]]
2918+
# width_2char:
2919+
# filter: function() { return (feature.shield_text.length === 2) }
2920+
# draw:
2921+
# mapzen_icon_library:
2922+
# size: [[6,[17px,17px]],[13,[19px,19px]],[15,[22px,22px]]]
2923+
# width_3char:
2924+
# filter: function() { return (feature.shield_text.length === 3) }
2925+
# draw:
2926+
# mapzen_icon_library:
2927+
# size: [[6,[20px,17px]],[13,[22px,19px]],[15,[27px,22px]]]
2928+
# width_4char:
2929+
# filter: function() { return (feature.shield_text.length === 4) }
2930+
# draw:
2931+
# mapzen_icon_library:
2932+
# size: [[6,[21px,17px]],[13,[24px,19px]],[15,[29px,22px]]]
2933+
# width_5char:
2934+
# filter: function() { return (feature.shield_text.length === 5) }
2935+
# draw:
2936+
# mapzen_icon_library:
2937+
# size: [[6,[22px,17px]],[13,[25px,19px]],[15,[30px,22px]]]
28242938

28252939

28262940
winter_sport_pistes:
215 KB
Loading

themes/images/refill@2x.png

128 KB
Loading

0 commit comments

Comments
 (0)