From 18e3ed7dad0afe7856c579c2370ac3a8107235cc Mon Sep 17 00:00:00 2001 From: "Nathaniel V. KELSO" Date: Wed, 17 Jul 2019 19:11:37 -0700 Subject: [PATCH 01/28] add POV and other v1.8, v1.7 changes --- bubble-wrap-style.yaml | 1765 ++++++++++++++++++++++------------------ index.html | 60 +- themes/label-11.yaml | 111 +-- 3 files changed, 1040 insertions(+), 896 deletions(-) diff --git a/bubble-wrap-style.yaml b/bubble-wrap-style.yaml index fcbfc57..40f2864 100644 --- a/bubble-wrap-style.yaml +++ b/bubble-wrap-style.yaml @@ -12,8 +12,96 @@ global: sdk_api_key: '' # set this value to your Mapzen API key #ux/ui - ux_language: false # l10n language code, trusting OSM in v0.10 tiles, fixed in v1.0 tiles - ux_language_fallback: false # l10n language code, trusting OSM in v0.10 tiles, fixed in v1.0 tiles + 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_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 && feature['kind:'+global.ux_point_of_view]) || (global.ux_point_of_view_fallback && feature['kind:'+global.ux_point_of_view_fallback]) || feature.kind; + 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 && feature['kind:'+global.ux_point_of_view]) || (global.ux_point_of_view_fallback && feature['kind:'+global.ux_point_of_view_fallback]) || feature.kind; + 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 && feature['kind:'+global.ux_point_of_view]) || (global.ux_point_of_view_fallback && feature['kind:'+global.ux_point_of_view_fallback]) || feature.kind; + 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 && feature['kind:'+global.ux_point_of_view]) || (global.ux_point_of_view_fallback && feature['kind:'+global.ux_point_of_view_fallback]) || feature.kind; + 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 + var capital_pov = (global.ux_point_of_view && feature['country_capital:'+global.ux_point_of_view]); + var capital_pov_falback = (global.ux_point_of_view_fallback && feature['country_capital:'+global.ux_point_of_view_fallback]); + var capital_default = feature.country_capital; + var capital = false; + + if( feature['name:en'] === 'Taipei' ) { + console.log( feature['name:en'] + " - " + global.ux_point_of_view + ": " + capital ); + console.log( '\t' + global.ux_point_of_view + ": " + global.ux_point_of_view ); + console.log( '\t' + feature['country_capital:'+global.ux_point_of_view] ); + console.log( '\t' + feature['country_capital:'+global.ux_point_of_view_fallback] ); + console.log( '\t' + feature['country_capital'] ); + } + switch( capital_default ) { + case( 'true' ): + case( true ): + return true; + default: + return false; + } + } + + 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 @@ -137,6 +225,11 @@ global: 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']; @@ -310,6 +403,7 @@ global: #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 @@ -331,7 +425,7 @@ global: 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: false # farm faint + green4_v: true # farm faint green5: '#5a695c' # farm green6: '#648560' # nature reserve green7: [0.169,0.651,0.631] # forest @@ -436,9 +530,14 @@ fonts: 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: 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://t651c12le3.execute-api.us-east-2.amazonaws.com/staging/tilezen/vector/v1/512/all/{z}/{x}/{y}.mvt + #url: https://d3gy1yxv8mxm7h.cloudfront.net/tilezen/vector/v1/512/all/{z}/{x}/{y}.mvt + #url: https://snapzen-dev.sc-jpl.com/tilezen/vector/v1/512/all/{z}/{x}/{y}.mvt + #url: https://snapzen.sc-jpl.com/tilezen/vector/v1/512/all/{z}/{x}/{y}.mvt + #url: https://xyz.api.here.com/tiles/herebase.02/{z}/{x}/{y}/omv url_params: api_key: global.sdk_api_key tile_size: 512 @@ -655,6 +754,16 @@ styles: color.rgb = mix(color.rgb, vec3(0.850), TileDots(45., 0.1)); // size was set to 35 previously, now 45 + dots_transparent: + base: polygons + mix: pattern-dots + blend: overlay + 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 @@ -1032,34 +1141,18 @@ layers: grid: order: global.feature_order #color: global.water1 + ocean: filter: kind: ocean draw: grid: color: global.water1 + inland-water: filter: all: - kind: [lake, water, riverbank, reservoir, 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: grid: color: global.water1 @@ -1118,18 +1211,23 @@ layers: lines: 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]]] width: [[9,0.5px],[10,0.75px],[11,0.75px],[12,0.8px],[13,1px],[14,1px],[15,1px],[16,1px],[17,1.5px]] +# intermittent: +# filter: { intermittent: true } +# draw: +# lines: +# color: water1_o river: #river center lines, not boundaries for polygons - filter: { kind: [river,canal,stream,dam,ditch,drain], $zoom: { min: 11 }, not: { is_tunnel: true } } + filter: { kind: [river,canal,stream,dam,ditch,drain], $zoom: { min: 12 }, not: { is_tunnel: true } } draw: lines: order: global.feature_order - color: [[11,[0.753,0.820,0.835]],[12,[0.710,0.800,0.824]],[13,[0.886,0.937,0.988]]] + color: [[12,[0.753,0.820,0.835]],[13,[0.710,0.800,0.824]],[14,[0.886,0.937,0.988]]] width: [[8,0px],[10,0px],[11,0.75px],[12,1px],[13,1px],[14,2px],[15,3px],[16,4px],[17,5px]] join: round outline: - color: [[11,[0.671,0.788,0.812]],[13,[0.710,0.800,0.824]],[14,[0.635,0.812,0.843]]] - width: [[9,0px],[11,0px],[12,0px],[13,0.5px],[14,0.75px],[15,0.75px],[16,0.75px],[17,1px]] + color: [[12,[0.671,0.788,0.812]],[14,[0.710,0.800,0.824]],[15,[0.635,0.812,0.843]]] + width: [[9,0px],[11,0px],[13,0px],[14,0.5px],[15,0.75px],[16,0.75px],[17,1px]] water-labels: filter: @@ -1175,39 +1273,18 @@ layers: - $geometry: point - not: { kind: [riverbank, dock, playa] } - area: true - any: - # show labels for smaller landuse areas at higher zooms - - { $zoom: { min: 5 }, area: { min: 10000000000 } } - - { $zoom: { min: 6 }, area: { min: 5000000000 } } - - { $zoom: { min: 7 }, area: { min: 400000000 } } - - { $zoom: { min: 8 }, area: { min: 200000000 } } - - { $zoom: { min: 9 }, area: { min: 100000000 } } - - { $zoom: { min: 10 }, area: { min: 100000000 } } - - { $zoom: { min: 11 }, area: { min: 10000000 } } - - { $zoom: { min: 12 }, area: { min: 2000000 } } - - { $zoom: { min: 13 }, area: { min: 1000000 } } - - { $zoom: { min: 14 }, area: { min: 500000 } } - - { $zoom: { min: 15 }, area: { min: 100000 } } - - { $zoom: { min: 15 }, area: { min: 50000 } } - - { $zoom: { min: 16 }, area: { min: 20000 } } - - { $zoom: { min: 17 } } + - not: { kind: [sea, ocean] } default-label-text: draw: text-blend-order: text_source: global.ux_language_text_source + text_wrap: 8 font: fill: [0.314,0.591,0.640] #global.text_fill_water family: global.text_font_family style: italic weight: normal - size: 12px - lakes-labels: - filter: - $zoom: { min: 4 } - draw: - text-blend-order: - font: - size: [[5,9px],[8,12px]] + size: [[6,10px],[11,12px]] ocean-sea-labels: filter: @@ -1263,20 +1340,6 @@ layers: - $geometry: point - kind: playa - area: true - any: - # show labels for smaller landuse areas at higher zooms - - { $zoom: { min: 7 }, area: { min: 1500000000 } } - - { $zoom: { min: 8 }, area: { min: 200000000 } } - - { $zoom: { min: 9 }, area: { min: 100000000 } } - - { $zoom: { min: 10 }, area: { min: 100000000 } } - - { $zoom: { min: 11 }, area: { min: 10000000 } } - - { $zoom: { min: 12 }, area: { min: 2000000 } } - - { $zoom: { min: 13 }, area: { min: 1000000 } } - - { $zoom: { min: 14 }, area: { min: 500000 } } - - { $zoom: { min: 15 }, area: { min: 100000 } } - - { $zoom: { min: 15 }, area: { min: 50000 } } - - { $zoom: { min: 16 }, area: { min: 20000 } } - - { $zoom: { min: 17 } } draw: text-blend-order: text_source: global.ux_language_text_source @@ -1372,6 +1435,7 @@ layers: roads: data: { source: mapzen, layer: roads } + #enabled: false draw: lines: # let roads sort themselves past zoom 14 (using server value) @@ -1382,11 +1446,96 @@ layers: text-blend-order: text_source: global.ux_language_text_source visible: false # labels are enabled by each layer below + priority: | + function() { return (feature['min_zoom'] + (1 - 1 / feature['collision_rank']) * 0.1) || 65; } font: family: global.text_font_family weight: normal fill: global.text_fill +# z_debug: +# filter: { $geometry: line, kind: true, $zoom: { min: 1 }, source: [naturalearthdata.com, openstreetmap.org] } +# draw: +# lines: +# color: | +# function() { +# var letters = '0123456789ABCDEF'; +# var color = '#'; +# for (var i = 0; i < 6; i++ ) { +# color += letters[Math.floor(Math.random() * 16)]; +# } +# return color; +# } +# order: 1000 +# width: 1px +# visible: true +# z-hgv: +# filter: { hgv: true } +# draw: +# lines: +# visible: true +# color: blue +# width: 1.7px +# z-none: +# filter: +# - hgv_restriction: true +# draw: +# lines: +# color: red +# width: 2.5px +# z-restricted: +# filter: +# - hgv_restriction: true +# draw: +# lines: +# color: purple +# width: 2.5px +# z-shields: +# filter: { hgv_restriction_shield_text: true } +# draw: +# mapzen_icon_library: +# # you need to match any custom shield to the vector tile `network` values +# sprite: | +# function() { +# if( feature.hgv_restriction_shield_text ) { +# return ('generic_shield-' + feature.hgv_restriction_shield_text.length + 'char'); +# } +# } +# size: [[7,[75%,75%]],[12,[100%,100%]],[15,[110%,110%]]] +# priority: 1 +# # Size is specified below, and limited to 5 char in another filter +# repeat_group: shields +# repeat_distance: [[8,90px],[10,40px],[13,30px]] +# placement: midpoint +# color: purple +# placement_min_length_ratio: +# - [8, 0.1] +# - [9, 0.25] +# - [10, 0.25] +# - [11, 0.15] +# - [12, 1] +# - [13, 1.50] +# - [14, 2.0] +# #cull_from_tile: true +# visible: true +# text: +# repeat_distance: 200px +# anchor: center +# text_source: hgv_restriction_shield_text +# font: +# family: Montserrat +# weight: 500 +# fill: white +# size: [[7, 7px], [13, 9px], [15, 10px]] +# stroke: { color: global.text_stroke, width: 0px } +# toll: +# filter: { toll: true } +# draw: +# lines: +# outline: +# color: black +# width: 1.5px + arrows: # oneway arrows and shields are distinct groups! filter: { oneway: yes, shield_text: false, not: { kind: rail }, $zoom: { min: 17 } } @@ -1493,7 +1642,7 @@ layers: $zoom: [13,14] draw: text-blend-order: - priority: 50 +# priority: 50 visible: global.text_visible_highway #text_source: ref font: @@ -1505,7 +1654,7 @@ layers: filter: { $zoom: { min: 15 } } draw: text-blend-order: - priority: 50 +# priority: 50 visible: global.text_visible_highway font: fill: [0.0,0.0,0.0] @@ -1584,7 +1733,7 @@ layers: filter: { $zoom: [14, 15] } draw: text-blend-order: - priority: 51 +# priority: 51 #text_source: ref font: fill: [0.0,0.0,0.0] @@ -1595,7 +1744,7 @@ layers: filter: { $zoom: { min: 16 } } draw: text-blend-order: - priority: 51 +# priority: 51 #text_source: global.ux_language_text_source_road_ref_and_name font: fill: [0.0,0.0,0.0] @@ -2482,7 +2631,7 @@ layers: path: filter: all: - - kind: [path, portage_way] + - kind: [path, portage_way, construction] not: - kind_detail: [steps, track, pier] draw: @@ -2492,6 +2641,13 @@ layers: outline: color: [0.799,0.799,0.799] width: [[14, 0], [16, 0.5px], [18, 3px]] + construction: + filter: { kind: construction } + draw: + dashed: + color: [0.7,0.7,0.7] + order: function() { return feature.sort_rank + 1; } + width: 1px pedestrian: filter: { kind_detail: pedestrian } draw: @@ -2593,6 +2749,13 @@ layers: fill: [0.25,0.25,0.25] size: 12px stroke: { color: [1.00,1.00,1.00], width: 1 } + construction: + filter: { kind: construction } + draw: + text-blend-order: + text_source: global.ux_language_text_source_construction + + track: filter: { kind: path, kind_detail: track } draw: @@ -2891,38 +3054,43 @@ layers: # set default footprint and extrusion draw properties, but don't draw by default (rules below will turn visibility on) draw: polygons: - visible: false order: 329 + visible: false color: global.building2 - #color: | -# function() { -# if( feature.id ) { -# return [ -# 0.7 * (parseInt(feature.id, 16) / 100 % 1), // jshint ignore:line -# 0.7 * (parseInt(feature.id, 16) / 10000 % 1), // jshint ignore:line -# 0.7 * (parseInt(feature.id, 16) / 1000000 % 1), // jshint ignore:line -# 1 -# ]; -# } else { -# if( feature.scale_rank == 6 ) { -# return [1.,0.,0.,1]; -# } else if( feature.scale_rank == 5 ) { -# return [0.,1.,0.,1]; -# } else if( feature.scale_rank == 4 ) { -# return [0.,0.,1.,1]; -# } else if( feature.scale_rank == 3 ) { -# return [0.,0.,0.5,1]; -# } else if( feature.scale_rank == 2 ) { -# return [0.,0.5,0.,1]; -# } else if( feature.scale_rank == 1 ) { -# return [0.,0.5,0.,1]; -# } else if( feature.scale_rank == 0 ) { -# return [0.5,0.,0.,1]; -# } else { -# return [0.5,0.5,0.5,1]; -# } -# } -# } + visible: true +# color: | +# function() { +# //if( feature.scale_rank == 6 ) { +# // return [1.,0.,0.,1]; +# //} else if( feature.scale_rank == 5 ) { +# // return [0.,1.,0.,1]; +# //} else if( feature.scale_rank == 4 ) { +# // return [0.,0.,1.,1]; +# //} else if( feature.scale_rank == 3 ) { +# // return [0.,0.,0.5,1]; +# //} else if( feature.scale_rank == 2 ) { +# // return [0.,0.5,0.,1]; +# //} else if( feature.scale_rank == 1 ) { +# // return [0.,0.5,0.,1]; +# //} else if( feature.scale_rank == 0 ) { +# // return [0.5,0.,0.,1]; +# //} else { +# // return 'red'; +# //} +# if( feature.min_zoom == 13 ) { +# return 'yellow'; +# } else if( feature.min_zoom == 14 ) { +# return 'orange'; +# } else if( feature.min_zoom == 15 ) { +# return 'green'; +# } else if( feature.min_zoom == 16 ) { +# return 'pink'; +# } else if( feature.min_zoom == 17 ) { +# return 'red'; +# } else { +# return 'black'; +# } +# } lines: style: lines order: 330 @@ -2930,226 +3098,231 @@ layers: color: [[13,[0.70,0.70,0.70]],[17,[0.65, 0.65, 0.65]]] width: [[13, 0.55px], [15, 0.65px], [16,0.75px], [18, 1.25px]] - # building footprints, pre-extrusion - footprints: - filter: - # show footprints for buildings at least one zoom level before they will be extruded - - { $zoom: 13, scale_rank: [1,2] } - - { $zoom: 14, scale_rank: [1,2,3] } - - { $zoom: 15, height: { min: 100 } } - - { $zoom: 15, area: { min: 500 } } - - { $zoom: 15, volume: { min: 100000 } } - - { $zoom: 16, area: { min: 100 } } - - { $zoom: 16, volume: { min: 50000 } } - - { $zoom: { min: 17 }, area: true } - draw: - polygons: { visible: true } - lines: { visible: true } - - # 3d buildings - extrude: - filter: - all: - - function() { return global.sdk_building_extrude; } - - any: - - { $zoom: 15, height: { min: 190 } } - - { $zoom: 15, area: { min: 5000 } } - - { $zoom: 15, volume: { min: 100000 } } - - { $zoom: 16, height: { min: 100 } } - - { $zoom: 16, area: { min: 3500 } } - - { $zoom: 16, volume: { min: 50000 } } - - { $zoom: 17, area: { min: 500 } } - - { $zoom: 17, volume: { min: 15000 } } - - { $zoom: { min: 18 } } - - not: - - layer: [-1, -2, -3, -4, -5] - draw: - polygons: - order: 438 - style: building-grid - extrude: global.building_extrude_height - lines: - order: 439 - style: building-lines - extrude: global.building_extrude_height - # NOTE: This is a hack to re-enable the building colors per landuse_kind - # Earlier versions before October 2016 didn't need this hack - not_landuse: - filter: { not: { landuse_kind: [station, retail, aerodrome, runway, taxiway, park,forest,nature_reserve,conservation,golf_course,garden, university,school, hospital] } } - draw: - polygons: - color: [0.892,0.880,0.878] - - # landuse-specific rules - in_park: - filter: - landuse_kind: [park,forest,nature_reserve,conservation,golf_course,garden] - draw: - polygons: - color: [0.864,0.910,0.905] - - # golf_course: - # filter: { landuse_kind: golf_course } - # draw: - # polygons: - # color: global.building2 - # nature_reserve: - # filter: { landuse_kind: nature_reserve } - # draw: - # polygons: - # color: global.building2 - # conservation: - # filter: { landuse_kind: conservation } - # draw: - # polygons: - # color: global.building2 - # zoo: - # filter: { landuse_kind: zoo } - # draw: - # polygons: - # color: global.building2 - in_university: - filter: { landuse_kind: [university,school] } - draw: - polygons: - color: [0.950,0.917,0.883] - lines: - color: global.brown1_bo - in_hospital: - filter: { landuse_kind: hospital } - draw: - polygons: - color: [0.976,0.908,0.913] - in_airport: - filter: { landuse_kind: [aerodrome, runway, taxiway] } - draw: - polygons: - color: global.purple_b - lines: - color: global.purple_bo - width: [[14,0.5px],[15,0.5px],[17,0.5px],[18,0.75px],[19,0.25m]] - in_retail: - filter: { landuse_kind: retail } - draw: - polygons: - color: [0.945, 0.898, 0.878] - - transit-overlay-station-buildings: - filter: - all: - - landuse_kind: [station] - - function() { return global.sdk_transit_overlay; } - draw: - polygons: - color: '#bdadbf' - order: 500 - #extrude: function() { return feature.height || 20; } - outline: - style: lines - order: 501 - color: '#d534df' - width: [[14,0.1px],[15,0.5px],[17,0.5px],[18,0.75px],[19,0.25m]] - #extrude: function() { return feature.height || 20; } - - buildings-labels: - filter: - all: - - { $zoom: { min: 17 } } - - $geometry: point - - not: { location: underground, kind: address } - - name: true - - function() { return global.text_visible_building; } - - landuse_kind: [university, college, school, kindergarten] - # - kind: [false, building, university, college, school, kindergarten] - any: - - { $zoom: [16], area: { min: 5000 } } - - { $zoom: [16], area: { min: 5000 } } - - { $zoom: [16], area: { min: 10000 }, landuse_kind: true } - - { $zoom: [16], area: { min: 7000 }, kind_detail: [university, college, school, kindergarten] } - - { $zoom: [16], volume: { min: 50000 }, name: true } - - { $zoom: [17], area: { min: 3000 } } - - { $zoom: [17], area: { min: 2000 }, kind_detail: [university, college, school, kindergarten] } - - { $zoom: [18], area: { min: 1000 } } - - { $zoom: [18], kind_detail: [university, college, school, kindergarten] } - - { $zoom: [19], area: { min: 200 } } - - { $zoom: { min: 19 }, kind_detail: [university, college, school, kindergarten] } - - { $zoom: { min: 20 }, area: true } + parts: + filter: { kind: building_part } draw: - text-blend-order: - text_source: global.ux_language_text_source - move_into_tile: true - priority: 70 - order: 7 - font: - fill: '#666' - family: global.text_font_family - style: italic - size: 11px - stroke: { color: global.text_stroke_address, width: 1 } - building_labels-z15-z16-z17: - filter: { $zoom: [15,16,17] } - draw: { text-blend-order: { font: { size: 12px, stroke: { width: 2 } } } } - building_labels-z18: - filter: { $zoom: [18,19] } - draw: { text-blend-order: { font: { size: 12px, weight: 600, stroke: { width: 3 } } } } - building_labels-z20-up: - filter: { $zoom: { min: 20 } } - draw: { text-blend-order: { font: { size: 14px, weight: 600, stroke: { width: 3 } } } } - building-labels-z16: - filter: function() { if( $zoom == 16 && feature.name.length > 20 ) { return true; } else { return false; } } - draw: - text-blend-order: - visible: false - building-labels-z17: - filter: function() { if( $zoom == 17 && feature.name.length > 30 ) { return true; } else { return false; } } - draw: - text-blend-order: - visible: false - building-labels-z20+: - filter: { $zoom: { min: 20 } } - draw: - text-blend-order: - text_source: global.ux_language_text_source_building_and_address - address-labels: - filter: - $zoom: { min: 20 } - any: - - kind: address - - { label_position: true, addr_housenumber: true, name: false } - all: - - function() { return global.text_visible_address; } - draw: - text-blend-order: - order: 7 - text_source: addr_housenumber - font: - fill: global.text_fill_address - family: global.text_font_family - style: italic - size: 10px - stroke: { color: global.text_stroke_address, width: 4 } - entrance-labels: - filter: - $zoom: { min: 20 } - any: - - kind: entrance - all: - - function() { return global.text_visible_address; } - draw: - mapzen_icon_library: - size: [[13, 95%], [16, 100%], [18, 105%]] - sprite: generic # TODO: add custom entrance/edit icons - interactive: global.sdk_interactive - priority: 65 - repeat_group: abc - buffer: 3px - text: - font: - fill: global.text_fill_address - family: global.text_font_family - style: italic - size: 10px - stroke: { color: global.text_stroke_address, width: 4 } + polygons: + visible: false + # building footprints, pre-extrusion +# footprints: +# filter: +# # show footprints for buildings at least one zoom level before they will be extruded +# - { $zoom: 13, scale_rank: [1,2] } +# - { $zoom: 14, scale_rank: [1,2,3] } +# - { $zoom: 15, height: { min: 100 } } +# - { $zoom: 15, area: { min: 500 } } +# - { $zoom: 15, volume: { min: 100000 } } +# - { $zoom: 16, area: { min: 100 } } +# - { $zoom: 16, volume: { min: 50000 } } +# - { $zoom: { min: 17 }, area: true } +# draw: +# polygons: { visible: true } +# lines: { visible: true } +# +# # 3d buildings +# extrude: +# filter: +# all: +# - function() { return global.sdk_building_extrude; } +# - any: +# - { $zoom: 15, height: { min: 190 } } +# - { $zoom: 15, area: { min: 5000 } } +# - { $zoom: 15, volume: { min: 100000 } } +# - { $zoom: 16, height: { min: 100 } } +# - { $zoom: 16, area: { min: 3500 } } +# - { $zoom: 16, volume: { min: 50000 } } +# - { $zoom: 17, area: { min: 500 } } +# - { $zoom: 17, volume: { min: 15000 } } +# - { $zoom: { min: 18 } } +# - not: +# - layer: [-1, -2, -3, -4, -5] +# draw: +# polygons: +# order: 438 +# style: building-grid +# extrude: global.building_extrude_height +# lines: +# order: 439 +# style: building-lines +# extrude: global.building_extrude_height +# # NOTE: This is a hack to re-enable the building colors per landuse_kind +# # Earlier versions before October 2016 didn't need this hack +# not_landuse: +# filter: { not: { landuse_kind: [station, retail, aerodrome, runway, taxiway, park,forest,nature_reserve,conservation,golf_course,garden, university,school, hospital] } } +# draw: +# polygons: +# color: [0.892,0.880,0.878] +# +# # landuse-specific rules +# in_park: +# filter: +# landuse_kind: [park,forest,nature_reserve,conservation,golf_course,garden] +# draw: +# polygons: +# color: [0.864,0.910,0.905] +# +# # golf_course: +# # filter: { landuse_kind: golf_course } +# # draw: +# # polygons: +# # color: global.building2 +# # nature_reserve: +# # filter: { landuse_kind: nature_reserve } +# # draw: +# # polygons: +# # color: global.building2 +# # conservation: +# # filter: { landuse_kind: conservation } +# # draw: +# # polygons: +# # color: global.building2 +# # zoo: +# # filter: { landuse_kind: zoo } +# # draw: +# # polygons: +# # color: global.building2 +# in_university: +# filter: { landuse_kind: [university,school] } +# draw: +# polygons: +# color: [0.950,0.917,0.883] +# lines: +# color: global.brown1_bo +# in_hospital: +# filter: { landuse_kind: hospital } +# draw: +# polygons: +# color: [0.976,0.908,0.913] +# in_airport: +# filter: { landuse_kind: [aerodrome, runway, taxiway] } +# draw: +# polygons: +# color: global.purple_b +# lines: +# color: global.purple_bo +# width: [[14,0.5px],[15,0.5px],[17,0.5px],[18,0.75px],[19,0.25m]] +# in_retail: +# filter: { landuse_kind: retail } +# draw: +# polygons: +# color: [0.945, 0.898, 0.878] +# +# transit-overlay-station-buildings: +# filter: +# all: +# - landuse_kind: [station] +# - function() { return global.sdk_transit_overlay; } +# draw: +# polygons: +# color: '#bdadbf' +# order: 500 +# #extrude: function() { return feature.height || 20; } +# outline: +# style: lines +# order: 501 +# color: '#d534df' +# width: [[14,0.1px],[15,0.5px],[17,0.5px],[18,0.75px],[19,0.25m]] +# #extrude: function() { return feature.height || 20; } +# +# buildings-labels: +# filter: +# all: +# - { $zoom: { min: 17 } } +# - $geometry: point +# - not: { location: underground, kind: address } +# - name: true +# - function() { return global.text_visible_building; } +# - landuse_kind: [university, college, school, kindergarten] +# # - kind: [false, building, university, college, school, kindergarten] +# any: +# - { $zoom: [16], area: { min: 5000 } } +# - { $zoom: [16], area: { min: 5000 } } +# - { $zoom: [16], area: { min: 10000 }, landuse_kind: true } +# - { $zoom: [16], area: { min: 7000 }, kind_detail: [university, college, school, kindergarten] } +# - { $zoom: [16], volume: { min: 50000 }, name: true } +# - { $zoom: [17], area: { min: 3000 } } +# - { $zoom: [17], area: { min: 2000 }, kind_detail: [university, college, school, kindergarten] } +# - { $zoom: [18], area: { min: 1000 } } +# - { $zoom: [18], kind_detail: [university, college, school, kindergarten] } +# - { $zoom: [19], area: { min: 200 } } +# - { $zoom: { min: 19 }, kind_detail: [university, college, school, kindergarten] } +# - { $zoom: { min: 20 }, area: true } +# draw: +# text-blend-order: +# text_source: global.ux_language_text_source +# move_into_tile: true +# priority: 70 +# order: 7 +# font: +# fill: '#666' +# family: global.text_font_family +# style: italic +# size: 11px +# stroke: { color: global.text_stroke_address, width: 1 } +# building_labels-z15-z16-z17: +# filter: { $zoom: [15,16,17] } +# draw: { text-blend-order: { font: { size: 12px, stroke: { width: 2 } } } } +# building_labels-z18: +# filter: { $zoom: [18,19] } +# draw: { text-blend-order: { font: { size: 12px, weight: 600, stroke: { width: 3 } } } } +# building_labels-z20-up: +# filter: { $zoom: { min: 20 } } +# draw: { text-blend-order: { font: { size: 14px, weight: 600, stroke: { width: 3 } } } } +# building-labels-z16: +# filter: function() { if( $zoom == 16 && feature.name.length > 20 ) { return true; } else { return false; } } +# draw: +# text-blend-order: +# visible: false +# building-labels-z17: +# filter: function() { if( $zoom == 17 && feature.name.length > 30 ) { return true; } else { return false; } } +# draw: +# text-blend-order: +# visible: false +# building-labels-z20+: +# filter: { $zoom: { min: 20 } } +# draw: +# text-blend-order: +# text_source: global.ux_language_text_source_building_and_address +# address-labels: +# filter: +# $zoom: { min: 20 } +# any: +# - kind: address +# - { label_position: true, addr_housenumber: true, name: false } +# all: +# - function() { return global.text_visible_address; } +# draw: +# text-blend-order: +# order: 7 +# text_source: addr_housenumber +# font: +# fill: global.text_fill_address +# family: global.text_font_family +# style: italic +# size: 10px +# stroke: { color: global.text_stroke_address, width: 4 } +# entrance-labels: +# filter: +# $zoom: { min: 20 } +# any: +# - kind: entrance +# all: +# - function() { return global.text_visible_address; } +# draw: +# mapzen_icon_library: +# size: [[13, 95%], [16, 100%], [18, 105%]] +# sprite: generic # TODO: add custom entrance/edit icons +# interactive: global.sdk_interactive +# priority: 65 +# repeat_group: abc +# buffer: 3px +# text: +# font: +# fill: global.text_fill_address +# family: global.text_font_family +# style: italic +# size: 10px +# stroke: { color: global.text_stroke_address, width: 4 } boundaries: data: { source: mapzen, layer: boundaries } @@ -3157,13 +3330,16 @@ layers: draw: lines: order: global.feature_order -# color: red -# width: [[9, 1px], [14, 2px], [16, 3px], [17, 8m]] + #debug: + #order: 1000 + #color: red + #width: [[9, 2px], [14, 2px], [16, 3px], [17, 8m]] country: filter: any: - - kind: country - - admin_level: 2 + #- kind: [country, indefinite, indeterminate] + #- admin_level: 2 + - global.ux_point_of_view_kind_filter_country draw: lines: color: global.country_boundary @@ -3179,7 +3355,9 @@ layers: filter: { name: true, $zoom: { min: 8 } } draw: text-blend-order: - priority: 2 +# priority: 2 + priority: | + function() { return (feature['min_zoom'] + (1 - 1 / feature['collision_rank']) * 0.1) || 65; } visible: global.text_visible_admin text_source: global.ux_language_text_source_boundary_lines_left_right offset: [0px, 5px] @@ -3197,27 +3375,79 @@ layers: text-blend-order: text_source: global.ux_language_text_source_boundary_lines offset: [0px, 0px] + other_country_boundary_disputed_etc: - filter: { kind: [disputed, indefinite, indeterminate, lease_limit, line_of_control, overlay_limit] } - draw: + filter: + global.ux_point_of_view_kind_filter_disputed_etc + #- kind: [disputed, lease_limit, line_of_control, overlay_limit] + #- kind: [disputed_breakaway, disputed_claim, disputed_elusive, disputed_reference_line] + draw: + #lines: +# order: global.feature_order +# visible: true +# color: blue +# width: 2px dashed: + visible: true order: global.feature_order color: global.country_boundary - width: [[1, 0.2px], [2, 0.5px], [4, 1.0px], [9, 1.5px], [14, 2.5px], [16, 3.5px], [17, 10m]] + width: [[1, 0.2px], [2, 0.5px], [5, 1.5px], [6, 2.0px], [8, 2.5px], [16, 3.5px], [17, 10m]] disputed: - filter: { kind: [disputed, line_of_control] } - draw: + filter: + #- kind: [disputed, line_of_control] + #- kind: [disputed_breakaway, disputed_claim, disputed_elusive, disputed_reference_line] + global.ux_point_of_view_kind_filter_disputed_star + draw: + #lines: +# order: global.feature_order +# visible: true +# color: red +# width: 2px dashed: visible: false dashed_big: + visible: true order: global.feature_order color: global.country_boundary #width: [[1, 0.2px], [2, 0.5px], [4, 1.0px], [9, 1.5px], [14, 2.5px], [16, 3.5px], [17, 10m]] width: [[1, 0.5px], [2, 1.0px], [4, 1.5px], [9, 2.5px], [14, 3.5px], [16, 4.5px], [17, 14m]] + #width: 20px +# disputed_star_early: +# filter: +# #kind: [disputed_breakaway, disputed_claim, disputed_elusive, disputed_reference_line] +# global.ux_point_of_view_kind_filter_disputed_star +# $zoom: [5,6] +# draw: +# dashed: +# width: [[4, 0px], [5, 1.0px], [8, 2.5px], [16, 3.5px], [17, 10m]] +# dashed_big: +# width: [[5, 0px], [5, 1.0px], [9, 2.5px], [14, 3.5px], [16, 4.5px], [17, 14m]] + + unrecognized: + filter: + - global.ux_point_of_view_kind_filter_unrecognized + draw: + lines: + visible: false + text-blend-order: + visible: false + dashed: + visible: false + dashed_big: + visible: false + + map_unit: + filter: + kind: map_unit + draw: + lines: + color: global.region_boundary + width: [[0, 0.5px], [2, 1.0px], [6, 1.5px], [8, 2.0px], [9, 3.5px], [14, 5.5px], [16, 6.5px]] + region: filter: any: - - kind: [region,macroregion] + - kind: [region,macroregion,aboriginal_lands] - kind_detail: [3,4] draw: lines: @@ -3235,11 +3465,21 @@ layers: draw: lines: visible: false + + aboriginal_lands: + filter: + kind: aboriginal_lands + draw: + lines: + width: [[8, 1.0px], [9, 1.5px], [14, 2.0px], [16, 3.5px]] + region-labels: filter: { name: true, $zoom: { min: 8 } } draw: text-blend-order: - priority: 3 +# priority: 3 + priority: | + function() { return (feature['min_zoom'] + (1 - 1 / feature['collision_rank']) * 0.1) || 65; } visible: global.text_visible_admin text_source: global.ux_language_text_source_boundary_lines_left_right offset: [0px, 5px] @@ -3257,6 +3497,25 @@ layers: text-blend-order: text_source: global.ux_language_text_source_boundary_lines offset: [0px, 0px] + aboriginal_lands-early: + filter: + kind: aboriginal_lands + $zoom: { max: 10 } + draw: + text-blend-order: + visible: false + unrecognized-region: + filter: + - global.ux_point_of_view_kind_filter_unrecognized + draw: + lines: + visible: false + text-blend-order: + visible: false + dashed: + visible: false + dashed_big: + visible: false places: data: { source: mapzen, layer: places } @@ -3265,6 +3524,8 @@ layers: draw: mapzen_icon_library: visible: false + priority: | + function() { return (feature['min_zoom'] + (1 - 1 / feature['collision_rank']) * 0.1) || 65; } text: text_source: global.ux_language_text_source visible: false # labels are enabled by each layer below @@ -3277,6 +3538,8 @@ layers: text_source: global.ux_language_text_source visible: false # labels are enabled by each layer below buffer: 3px + priority: | + function() { return (feature['min_zoom'] + (1 - 1 / feature['collision_rank']) * 0.1) || 65; } font: family: Varela fill: global.text_fill @@ -3288,7 +3551,7 @@ layers: $zoom: { min: 2, max: 9 } draw: text-blend-order: - priority: 3 +# priority: 3 visible: global.text_visible_admin font: fill: [[2,[0.357,0.243,0.184]],[6,[0.604,0.437,0.427]]] @@ -3298,7 +3561,7 @@ layers: $zoom: [2,3] draw: text-blend-order: - priority: 10 +# priority: 10 buffer: 10px font: size: 10px @@ -3322,7 +3585,7 @@ layers: draw: text-blend-order: buffer: 10px - priority: 8 +# priority: 8 font: size: 11px early-ones-z4: @@ -3336,7 +3599,7 @@ layers: $zoom: [5] draw: text-blend-order: - priority: 8 +# priority: 8 font: size: 13px early-ones-z5: @@ -3352,7 +3615,7 @@ layers: $zoom: [6] draw: text-blend-order: - priority: 8 +# priority: 8 font: size: 16px small-ones-z6: @@ -3383,7 +3646,7 @@ layers: - population: { max: 5000000 } draw: text-blend-order: - priority: 30 +# priority: 30 font: size: 12px @@ -3393,7 +3656,7 @@ layers: $zoom: { min: 4, max: 9 } draw: text-blend-order: - priority: 14 +# priority: 14 visible: false text_source: global.ux_language_text_source_short font: @@ -3476,7 +3739,7 @@ layers: size: [[10,4px],[11,0px]] sprite: townspot-xs-rev buffer: 8px - priority: 30 +# priority: 30 # debug testing #collide: false text: @@ -3581,24 +3844,27 @@ layers: mapzen_icon_library: size: [[4,5px],[8,6px],[9,0px]] sprite: townspot-m-rev - priority: 6 +# priority: 6 text: font: size: [[2,11px],[6,15px],[8,16px],[10,18px],[12,18px],[13,0px]] text-blend-order: - priority: 6 +# priority: 6 font: size: [[2,11px],[6,15px],[8,16px],[10,18px],[12,18px],[13,0px]] capital: # we only want townspots to show as capital dots starting at zoom 5 - filter: { country_capital: true, $zoom: { min: 5 } } + filter: + all: + - global.ux_point_of_view_kind_filter_country_capital + - $zoom: { min: 5 } draw: mapzen_icon_library: size: [[10,8px],[11,0px]] sprite: capital-l - priority: 5 - text-blend-order: - priority: 5 +# priority: 5 +# text-blend-order: +# priority: 5 population-5m-10m: filter: population: { min: 5000000, max: 10000000 } @@ -3606,24 +3872,27 @@ layers: mapzen_icon_library: size: [[4,5px],[8,6px],[9,0px]] sprite: townspot-m-rev - priority: 7 +# priority: 7 text: font: size: [[4,10px],[6,13px],[8,16px],[10,18px],[12,18px],[13,0px]] text-blend-order: - priority: 7 +# priority: 7 font: size: [[4,10px],[6,13px],[8,16px],[10,18px],[12,18px],[13,0px]] capital: # we only want townspots to show as capital dots starting at zoom 5 - filter: { country_capital: true, $zoom: { min: 5 } } + filter: + all: + - global.ux_point_of_view_kind_filter_country_capital + - $zoom: { min: 5 } draw: mapzen_icon_library: size: [[10,8px],[11,0px]] sprite: capital-l - priority: 6 - text-blend-order: - priority: 6 +# priority: 6 +# text-blend-order: +# priority: 6 population-1m-5m: filter: population: { min: 1000000, max: 5000000 } @@ -3631,24 +3900,27 @@ layers: mapzen_icon_library: size: [[4,5px],[8,6px],[9,0px]] sprite: townspot-m-rev - priority: 9 +# priority: 9 text: font: size: [[4,10px],[6,13px],[8,16px],[10,18px],[12,18px],[13,0px]] text-blend-order: - priority: 9 +# priority: 9 font: size: [[4,10px],[6,13px],[8,16px],[10,18px],[12,18px],[13,0px]] capital: # we only want townspots to show as capital dots starting at zoom 5 - filter: { country_capital: true, $zoom: { min: 5 } } + filter: + all: + - global.ux_point_of_view_kind_filter_country_capital + - $zoom: { min: 5 } draw: mapzen_icon_library: size: [[10,8px],[11,0px]] sprite: capital-l - priority: 8 - text-blend-order: - priority: 8 +# priority: 8 +# text-blend-order: +# priority: 8 population-500k-1m: filter: population: { min: 500000, max: 1000000 } @@ -3656,23 +3928,26 @@ layers: mapzen_icon_library: size: [[8,6px],[9,0px]] sprite: townspot-m-rev - priority: 11 +# priority: 11 text: font: size: [[5,10px],[8,14px],[10,14px],[12,16px],[13,0px]] text-blend-order: - priority: 11 +# priority: 11 font: size: [[5,10px],[8,14px],[10,14px],[12,16px],[13,0px]] capital: - filter: { country_capital: true, $zoom: { min: 5 } } + filter: + all: + - global.ux_point_of_view_kind_filter_country_capital + - $zoom: { min: 5 } draw: mapzen_icon_library: size: [[10,6px],[11,0px]] sprite: capital-m - priority: 10 - text-blend-order: - priority: 10 +# priority: 10 +# text-blend-order: +# priority: 10 population-200k-500k: filter: population: { min: 200000, max: 500000 } @@ -3680,23 +3955,26 @@ layers: mapzen_icon_library: size: [[8,6px],[9,6px],[10,6px],[11,0px]] sprite: townspot-m-rev - priority: 13 +# priority: 13 text: font: size: [[6,10px],[8,12px],[10,14px],[12,16px],[13,0px]] text-blend-order: - priority: 13 +# priority: 13 font: size: [[6,10px],[8,12px],[10,14px],[12,16px],[13,0px]] capital: - filter: { country_capital: true, $zoom: { min: 5 } } + filter: + all: + - global.ux_point_of_view_kind_filter_country_capital + - $zoom: { min: 5 } draw: mapzen_icon_library: size: [[10,6px],[11,0px]] sprite: capital-m - priority: 12 - text-blend-order: - priority: 12 +# priority: 12 +# text-blend-order: +# priority: 12 population-100k-200k: filter: population: { min: 100000, max: 200000 } @@ -3704,23 +3982,26 @@ layers: mapzen_icon_library: size: [[8,6px],[9,6px],[10,6px],[11,0px]] sprite: townspot-m-rev - priority: 15 +# priority: 15 text: font: size: [[6,10px],[8,12px],[10,12px],[12,14px],[14,14px],[15,0px]] text-blend-order: - priority: 15 +# priority: 15 font: size: [[6,10px],[8,12px],[10,12px],[12,14px],[14,14px],[15,0px]] capital: - filter: { country_capital: true, $zoom: { min: 5 } } + filter: + all: + - global.ux_point_of_view_kind_filter_country_capital + - $zoom: { min: 5 } draw: mapzen_icon_library: size: [[10,6px],[11,0px]] sprite: capital-m - priority: 14 - text-blend-order: - priority: 14 +# priority: 14 +# text-blend-order: +# priority: 14 population-50k-100k: filter: population: { min: 50000, max: 100000 } @@ -3728,25 +4009,28 @@ layers: mapzen_icon_library: size: [[8,5px],[9,5px],[10,6px],[11,0px]] sprite: townspot-s-rev - priority: 17 +# priority: 17 text: font: fill: [0.30,0.30,0.30] size: [[6,10px],[8,11px],[10,12px],[12,14px],[14,14px],[15,0px]] text-blend-order: - priority: 17 +# priority: 17 font: fill: [0.30,0.30,0.30] size: [[6,10px],[8,11px],[10,12px],[12,14px],[14,14px],[15,0px]] capital: - filter: { country_capital: true, $zoom: { min: 5 } } + filter: + all: + - global.ux_point_of_view_kind_filter_country_capital + - $zoom: { min: 5 } draw: mapzen_icon_library: size: [[10,5px],[11,0px]] sprite: capital-m - priority: 16 - text-blend-order: - priority: 16 +# priority: 16 +# text-blend-order: +# priority: 16 population-20k-50k: filter: population: { min: 20000, max: 50000 } @@ -3754,25 +4038,28 @@ layers: mapzen_icon_library: size: [[8,5px],[9,5px],[10,5px],[11,0px]] sprite: townspot-s-rev - priority: 19 +# priority: 19 text: font: fill: [0.30,0.30,0.30] size: [[9,11px],[12,12px],[14,12px],[15,0px]] text-blend-order: - priority: 19 +# priority: 19 font: fill: [0.30,0.30,0.30] size: [[9,11px],[12,12px],[14,12px],[15,0px]] capital: - filter: { country_capital: true, $zoom: { min: 5 } } + filter: + all: + - global.ux_point_of_view_kind_filter_country_capital + - $zoom: { min: 5 } draw: mapzen_icon_library: size: [[10,5px],[11,0px]] sprite: capital-s - priority: 18 - text-blend-order: - priority: 18 +# priority: 18 +# text-blend-order: +# priority: 18 population-10k-20k: filter: population: { min: 10000, max: 20000 } @@ -3780,25 +4067,28 @@ layers: mapzen_icon_library: size: [[8,4px],[9,4px],[10,4px],[11,0px]] sprite: townspot-xs-rev - priority: 21 +# priority: 21 text: font: fill: [0.35,0.35,0.35] size: [[9,11px],[12,12px],[14,12px],[15,0px]] text-blend-order: - priority: 21 +# priority: 21 font: fill: [0.35,0.35,0.35] size: [[9,11px],[12,12px],[14,12px],[15,0px]] capital: - filter: { country_capital: true, $zoom: { min: 5 } } + filter: + all: + - global.ux_point_of_view_kind_filter_country_capital + - $zoom: { min: 5 } draw: mapzen_icon_library: size: [[10,5px],[11,0px]] sprite: capital-s - priority: 20 - text-blend-order: - priority: 20 +# priority: 20 +# text-blend-order: +# priority: 20 population-5k-10k: filter: population: { min: 5000, max: 10000 } @@ -3806,25 +4096,28 @@ layers: mapzen_icon_library: size: [[8,4px],[9,4px],[10,4px],[11,0px]] sprite: townspot-xs-rev - priority: 23 +# priority: 23 text: font: fill: [0.35,0.35,0.35] size: [[9,10px],[12,12px],[13,12px],[14,12px],[15,0px]] text-blend-order: - priority: 23 +# priority: 23 font: fill: [0.35,0.35,0.35] size: [[9,10px],[12,12px],[13,12px],[14,12px],[15,0px]] capital: - filter: { country_capital: true, $zoom: { min: 5 } } + filter: + all: + - global.ux_point_of_view_kind_filter_country_capital + - $zoom: { min: 5 } draw: mapzen_icon_library: size: [[10,5px],[11,0px]] sprite: capital-s - priority: 22 - text-blend-order: - priority: 22 +# priority: 22 +# text-blend-order: +# priority: 22 population-2k-5k: filter: population: { min: 2000, max: 5000 } @@ -3832,25 +4125,28 @@ layers: mapzen_icon_library: size: [[8,4px],[9,4px],[10,4px],[11,0px]] sprite: townspot-xs-rev - priority: 25 +# priority: 25 text: font: fill: [0.35,0.35,0.35] size: [[9,10px],[12,10px],[13,12px],[14,12px],[15,0px]] text-blend-order: - priority: 25 +# priority: 25 font: fill: [0.35,0.35,0.35] size: [[9,10px],[12,10px],[13,12px],[14,12px],[15,0px]] capital: - filter: { country_capital: true, $zoom: { min: 5 } } + filter: + all: + - global.ux_point_of_view_kind_filter_country_capital + - $zoom: { min: 5 } draw: mapzen_icon_library: size: [[10,5px],[11,0px]] sprite: capital-s - priority: 24 - text-blend-order: - priority: 24 +# priority: 24 +# text-blend-order: +# priority: 24 population-1k-2k: filter: population: { min: 1000, max: 2000 } @@ -3858,25 +4154,28 @@ layers: mapzen_icon_library: size: [[8,4px],[9,4px],[10,4px],[11,0px]] sprite: townspot-xs-rev - priority: 27 +# priority: 27 text: font: fill: [0.35,0.35,0.35] size: [[9,10px],[12,10px],[14,11px],[15,0px]] text-blend-order: - priority: 27 +# priority: 27 font: fill: [0.35,0.35,0.35] size: [[9,10px],[12,10px],[14,11px],[15,0px]] capital: - filter: { country_capital: true, $zoom: { min: 5 } } + filter: + all: + - global.ux_point_of_view_kind_filter_country_capital + - $zoom: { min: 5 } draw: mapzen_icon_library: size: [[10,5px],[11,0px]] sprite: capital-s - priority: 26 - text-blend-order: - priority: 26 +# priority: 26 +# text-blend-order: +# priority: 26 population-200-1k: filter: population: { min: 200, max: 1000 } @@ -3884,25 +4183,41 @@ layers: mapzen_icon_library: size: [[8,4px],[9,4px],[10,4px],[11,0px]] sprite: townspot-xs-rev - priority: 28 +# priority: 28 text: font: fill: [0.35,0.35,0.35] size: [[9,10px],[12,10px],[14,11px],[15,0px]] text-blend-order: - priority: 28 +# priority: 28 font: fill: [0.35,0.35,0.35] size: [[9,10px],[12,10px],[14,11px],[15,0px]] capital: - filter: { country_capital: true, $zoom: { min: 5 } } + filter: + all: + - global.ux_point_of_view_kind_filter_country_capital + - $zoom: { min: 5 } draw: mapzen_icon_library: size: [[10,5px],[11,0px]] sprite: capital-s - priority: 27 - text-blend-order: - priority: 27 +# priority: 27 +# text-blend-order: +# priority: 27 + +# z_country_capital_pov: +# filter: +# draw: +# mapzen_icon_library: +# text: +# font: +# weight: 900 +# color: red +# text-blend-order: +# font: +# weight: 900 +# color: red # #neighborhoods (excluding microhoods, eg the Tendernob) @@ -3923,7 +4238,7 @@ layers: # there are more labels than we want to show, so we hide them, # then selectively reveal in classes below (ultimately a data problem) visible: global.text_visible_neighbourhoods_e - priority: 29 +# priority: 29 buffer: 8px text_wrap: 10 max_lines: 2 @@ -3962,7 +4277,7 @@ layers: min_zoom: { min: 15 } draw: text-blend-order: - priority: 19 +# priority: 19 font: size: 13px @@ -3982,7 +4297,9 @@ layers: sprite: function() { return feature.kind; } sprite_default: generic interactive: global.sdk_interactive - priority: 65 #function() { return (feature.min_zoom && Math.floor(feature.min_zoom * 1000)) || 65; } + #priority: 65 + priority: | + function() { return (feature['min_zoom'] + (1 - 1 / feature['collision_rank']) * 0.1) || 65; } repeat_group: abc buffer: 3px text: @@ -4024,6 +4341,14 @@ layers: mapzen_icon_library: sprite: function() { return feature.religion; } sprite_default: place_of_worship + + generator: + filter: { kind: generator } + draw: + mapzen_icon_library: + sprite: function() { return 'generator_' & feature.kind_detail; } + sprite_default: generator + # TODO: some or all of this may be unnecessary for the sprite, but is necessary for the early filter building-icon: filter: @@ -4045,291 +4370,75 @@ layers: #end different icon sprites #most POI icons without name should be hidden, except these - no-name: - filter: { name: false } - draw: - mapzen_icon_library: - visible: false - # eg park polygons in SF that have area but no name, sigh - no-name-no-area: - filter: - kind: true - name: false - draw: - mapzen_icon_library: - visible: false - sports-pitch: - filter: - $zoom: { min: 17 } - kind: [grass, pitch] - kind_detail: [baseball, basketball, football, hockey, soccer, tennis] - draw: - mapzen_icon_library: - visible: global.icon_visible_poi_landuse_e - priority: 69 - z17: - filter: - $zoom: { min: 17 } - kind: [parking] - draw: { mapzen_icon_library: { visible: global.icon_visible_poi_landuse_e } } - z18: - # for different styles, different sets - # since [picnic_site] doesn't have bubble-wrap icon, it's omitted here - filter: - $zoom: { min: 18 } - kind: [drinking_water, information, playground, toilets, traffic_signals] - draw: { mapzen_icon_library: { visible: global.icon_visible_poi_landuse_e } } - z19: - filter: - $zoom: { min: 19 } - kind: [bicycle_parking] - draw: { mapzen_icon_library: { visible: global.icon_visible_poi_landuse_e } } - - # NOTE: all natural_* should only be in landuse layer - suppress-icon-always: - filter: - kind: [natural_forest, natural_park, natural_wood] - draw: - mapzen_icon_library: - visible: false - priority: 100 - text: - font: - fill: '#666' - family: global.text_font_family - style: italic - size: 11px - suppress-icon-z17: - filter: - $zoom: { min: 17 } - kind: [common, grass, houseboat, pedestrian, railway, ship, wetland] - draw: - mapzen_icon_library: - visible: false - text: { font: { style: italic } } +# no-name: +# filter: { name: false } +# draw: +# mapzen_icon_library: +# visible: false +# # eg park polygons in SF that have area but no name, sigh +# no-name-no-area: +# filter: +# kind: true +# name: false +# draw: +# mapzen_icon_library: +# visible: false +# sports-pitch: +# filter: +# $zoom: { min: 17 } +# kind: [grass, pitch] +# kind_detail: [baseball, basketball, football, hockey, soccer, tennis] +# draw: +# mapzen_icon_library: +# visible: global.icon_visible_poi_landuse_e +# #priority: 69 +# z17: +# filter: +# kind: [parking] +# draw: { mapzen_icon_library: { visible: global.icon_visible_poi_landuse_e } } +# z18: +# # for different styles, different sets +# # since [picnic_site] doesn't have bubble-wrap icon, it's omitted here +# filter: +# $zoom: { min: 18 } +# kind: [drinking_water, information, playground, toilets, traffic_signals] +# draw: { mapzen_icon_library: { visible: global.icon_visible_poi_landuse_e } } +# z19: +# filter: +# $zoom: { min: 19 } +# kind: [bicycle_parking] +# draw: { mapzen_icon_library: { visible: global.icon_visible_poi_landuse_e } } +# +# # NOTE: all natural_* should only be in landuse layer +# suppress-icon-always: +# filter: +# kind: [natural_forest, natural_park, natural_wood] +# draw: +# mapzen_icon_library: +# visible: false +# #priority: 100 +# text: +# font: +# fill: '#666' +# family: global.text_font_family +# style: italic +# size: 11px +# suppress-icon-z17: +# filter: +# $zoom: { min: 17 } +# kind: [common, grass, houseboat, pedestrian, railway, ship, wetland] +# draw: +# mapzen_icon_library: +# visible: false +# text: { font: { style: italic } } - # the server should be setting better values here - z-server-friend: - hide-until-z12-any: - filter: - kind: [landmark, museum, prison] - $zoom: { max: 12 } - draw: - mapzen_icon_library: - visible: false - hide-until-z14-any: - filter: - kind: [natural_forest, natural_park, natural_wood, post_office] - $zoom: { max: 14 } - draw: - mapzen_icon_library: - visible: false - hide-until-z15-any: - filter: - $zoom: { max: 15 } - kind: [cafe, restaurant] - draw: - mapzen_icon_library: - visible: false - hide-until-z15-no-area: - filter: - area: false - $zoom: { max: 15 } - kind: [park] - draw: - mapzen_icon_library: - visible: false - hide-until-z15-with-area: - filter: - area: true - $zoom: { max: 15 } - kind: [nursing_home] - draw: - mapzen_icon_library: - visible: false - hide-until-z16-any: - filter: - kind: [fire_station, grass, peak, police, tram_stop] - $zoom: { max: 16 } - draw: - mapzen_icon_library: - visible: false - hide-until-z16-no-area: - filter: - area: false - kind: [allotments, college, garden, university] - $zoom: { max: 16 } - draw: - mapzen_icon_library: - visible: false - # no POIs for commercial, residential - hide-until-z17-any: - filter: - $zoom: { max: 17 } - kind: [bank, bus_stop, car_sharing, wood, platform] - draw: - mapzen_icon_library: - visible: false - hide-until-z17-with-area: - filter: - area: true - $zoom: { max: 17 } - kind: [common, grass, houseboat, pedestrian, pitch, railway, ship, wetland] - draw: - mapzen_icon_library: - visible: false - hide-until-z17-no-area: - filter: - area: false - $zoom: { max: 17 } - # note: atm and drinking_water appear hear and in area versions - 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] - draw: - mapzen_icon_library: - visible: false - hide-until-z18-any: - filter: - kind: [atm, bus_stop, drinking_water] - $zoom: { max: 18 } - draw: - mapzen_icon_library: - visible: false - hide-until-z18-no-area: - filter: - $zoom: { max: 18 } - area: false - kind: [bench, parking, waste_basket] - draw: - mapzen_icon_library: - visible: false - hide-until-z19-any: - filter: - $zoom: { max: 19 } - kind: [bicycle_parking, burial_vault, car_sharing] - draw: - mapzen_icon_library: - visible: false - - # hide based on kind and area filters - military-early: - filter: - kind: [military] - any: - # show labels for smaller landuse areas at higher zooms - - { $zoom: [8], area: { max: 50000000 } } - draw: - mapzen_icon_library: - visible: false - university-early: - filter: - kind: [university, college] - any: - # show labels for smaller landuse areas at higher zooms - - { $zoom: [11], area: { max: 2000000 } } - - { $zoom: [12], area: { max: 500000 } } - draw: - mapzen_icon_library: - visible: false - school-early: - filter: - kind: [school, kindergarten] - any: - # show labels for smaller landuse areas at higher zooms - - { $zoom: [13], area: { max: 100000 } } - - { $zoom: [14], area: { max: 50000 } } - - { $zoom: [15], area: { max: 10000 } } - - { $zoom: [16], area: { max: 5000 } } - - { $zoom: [17], area: { max: 2000 } } - draw: - mapzen_icon_library: - visible: false - garden-area-early: - filter: - kind: [garden, allotments] - any: - # limit show smaller landuse areas to higher zooms - - { $zoom: [12], area: { max: 500000 } } - - { $zoom: [13], area: { max: 100000 } } - - { $zoom: [14], area: { max: 10000 } } - - { $zoom: [15], area: { max: 5000 } } - draw: - mapzen_icon_library: - visible: false - cemetery-early: - filter: - kind: [cemetery] - # limit show smaller landuse areas to higher zooms - any: - - { $zoom: [12], area: { max: 3000000 } } - draw: - mapzen_icon_library: - visible: false - golf_course-early: - filter: - kind: golf_course - any: - - { $zoom: [12], area: { max: 2500000 } } - draw: - mapzen_icon_library: - visible: false - office-early: - filter: - - { kind: [insurance, office, company], $zoom: [15], area: { max: 10000 } } - - { kind: [insurance, office, company], $zoom: [16], area: { max: 5000 } } - draw: - mapzen_icon_library: - visible: false - landuse-labels-green-areas-not-national-park: - filter: - kind: [park, conservation, protected_area, nature_reserve, forest, grass] - any: - # show labels for smaller landuse areas at higher zooms - - { $zoom: { max: 6 }, area: true } - - { $zoom: [6], area: { max: 5000000000 } } - - { $zoom: [7], area: { max: 5000000000 } } - - { $zoom: [8], area: { max: 1000000000 } } - - { $zoom: [9], area: { max: 100000000 } } - - { $zoom: [10], area: { max: 50000000 } } - - { $zoom: [11], area: { max: 25000000 } } - - { $zoom: [12], area: { max: 5000000 } } - - { $zoom: [13], area: { max: 200000 } } - - { $zoom: [14], area: { max: 50000 } } - - { $zoom: [15], area: { max: 10000 } } - - { $zoom: [16], area: { max: 1000 } } - draw: - mapzen_icon_library: - visible: false - wilderness-areas-early: - 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' ); } - draw: - mapzen_icon_library: - visible: false - not-national-park: - filter: function() { return feature.name && !((feature.name.indexOf("National Park") > -1) || feature.name.indexOf("National Monument") > -1); } - early: - filter: { $zoom: { max: 8 } } - draw: - mapzen_icon_library: - visible: false - landuse-labels-not-any-above: - filter: - $zoom: { max: 6 } - 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] } - draw: - mapzen_icon_library: - visible: false - glacier: - filter: { $zoom: { max: 14 }, kind: glacier, area: false } - draw: - mapzen_icon_library: - visible: false # set special priority, sprite, and text styles per kind - has-area: - filter: { area: true } - draw: - mapzen_icon_library: - priority: 41 +# has-area: +# filter: { area: true } +# draw: +# mapzen_icon_library: +# priority: 41 national-park-protected-areas: filter: @@ -4404,7 +4513,7 @@ layers: mapzen_icon_library: visible: global.icon_visible_landuse_green size: global.icon_size_green - priority: 42 + #priority: 42 text: visible: global.text_visible_landuse_green text_source: global.ux_language_text_source_iata @@ -4417,13 +4526,15 @@ layers: kind: [enclosure, animal] draw: mapzen_icon_library: - priority: 43 visible: false - text: - text_wrap: 10 - font: - style: italic - weight: normal + text: +# priority: 43 + text_wrap: 10 + visible: true + font: + fill: gray + style: italic + weight: normal gate-early: filter: { kind: gate, $zoom: { max: 20 } } @@ -4460,19 +4571,19 @@ layers: visible: false text: visible: true - priority: 44 + #priority: 44 text_wrap: 10 font: weight: normal style: italic fill: '#4ba3c5' - landuse-labels-not-any-above: - filter: - 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] } - draw: - mapzen_icon_library: - priority: 43 +# landuse-labels-not-any-above: +# filter: +# 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] } +# draw: +# mapzen_icon_library: +## priority: 43 building-like: filter: { kind: [commercial,residential,warehouse,public,dormitory], osm_relation: false } @@ -4485,8 +4596,8 @@ layers: draw: mapzen_icon_library: visible: global.icon_visible_station - size: [[13, 80%], [17, 100%], [18, 110%]] - priority: 42 + size: [[13, 60%], [15, 80%], [17, 100%], [18, 110%]] +# priority: 42 text: visible: global.text_visible_station station-early: @@ -4501,6 +4612,11 @@ layers: draw: mapzen_icon_library: visible: false + low-priority-early-z14-icons: + filter: { kind_tile_rank: { min: 50 }, $zoom: [13,14] } + draw: + mapzen_icon_library: + visible: false low-priority-early-z13: filter: { kind_tile_rank: { min: 5 }, $zoom: [13] } draw: @@ -4516,13 +4632,13 @@ layers: filter: { kind: [garden, allotments], $zoom: [16], area: false } draw: mapzen_icon_library: - priority: 45 +# priority: 45 text: { font: { size: 10px, style: italic } } garden-no-area-later: filter: { kind: [garden, allotments], $zoom: { min: 17 }, area: false } draw: mapzen_icon_library: - priority: 45 +# priority: 45 text: { font: { size: 11px, style: italic } } gate: filter: { kind: gate, name: true } @@ -4573,7 +4689,7 @@ layers: text-blend-order: visible: global.text_visible_airport_gate text_source: ref - priority: 63 +# priority: 63 font: fill: global.text_fill_exits size: [[16,9px],[17,12px],[20,14px]] @@ -4593,7 +4709,7 @@ layers: text-blend-order: visible: global.text_visible_exits text_source: ref - priority: 63 +# priority: 63 font: family: Montserrat fill: global.text_fill_exits @@ -4655,45 +4771,45 @@ layers: visible: false polygons: order: global.feature_order - #debug for polygon merging - #order: | -# function() { -# if( feature.id ) { -# return 1001; -# } else { -# return 1000; -# } -# } - #debug for polygon merging - #color: | -# function() { -# if( feature.id ) { -# return [ -# 0.7 * (parseInt(feature.id, 16) / 100 % 1), // jshint ignore:line -# 0.7 * (parseInt(feature.id, 16) / 10000 % 1), // jshint ignore:line -# 0.7 * (parseInt(feature.id, 16) / 1000000 % 1), // jshint ignore:line -# 1 -# ]; -# } else { -# if( feature.scale_rank == 6 ) { -# return [1.,0.,0.,1]; -# } else if( feature.scale_rank == 5 ) { -# return [0.,1.,0.,1]; -# } else if( feature.scale_rank == 4 ) { -# return [0.,0.,1.,1]; -# } else if( feature.scale_rank == 3 ) { -# return [0.,0.,0.5,1]; -# } else if( feature.scale_rank == 2 ) { -# return [0.,0.5,0.,1]; -# } else if( feature.scale_rank == 1 ) { -# return [0.,0.5,0.,1]; -# } else if( feature.scale_rank == 0 ) { -# return [0.5,0.,0.,1]; -# } else { -# return [0.5,0.5,0.5,1]; -# } -# } -# } +# #debug for polygon merging +# order: | +# function() { +# if( feature.id ) { +# return 1001; +# } else { +# return 1000; +# } +# } +# #debug for polygon merging +# color: | +# function() { +# if( feature.id ) { +# return [ +# 0.7 * (parseInt(feature.id, 16) / 100 % 1), // jshint ignore:line +# 0.7 * (parseInt(feature.id, 16) / 10000 % 1), // jshint ignore:line +# 0.7 * (parseInt(feature.id, 16) / 1000000 % 1), // jshint ignore:line +# 1 +# ]; +# } else { +# if( feature.scale_rank == 6 ) { +# return [1.,0.,0.,1]; +# } else if( feature.scale_rank == 5 ) { +# return [0.,1.,0.,1]; +# } else if( feature.scale_rank == 4 ) { +# return [0.,0.,1.,1]; +# } else if( feature.scale_rank == 3 ) { +# return [0.,0.,0.5,1]; +# } else if( feature.scale_rank == 2 ) { +# return [0.,0.5,0.,1]; +# } else if( feature.scale_rank == 1 ) { +# return [0.,0.5,0.,1]; +# } else if( feature.scale_rank == 0 ) { +# return [0.5,0.,0.,1]; +# } else { +# return [0.5,0.5,0.5,1]; +# } +# } +# } lines: order: global.feature_order @@ -4708,7 +4824,7 @@ layers: text_source: global.ux_language_text_source interactive: global.sdk_interactive move_into_tile: true - priority: 100 +# priority: 100 font: fill: '#666' family: global.text_font_family @@ -4771,13 +4887,12 @@ layers: farm: filter: kind: [farm, farmland] - $zoom: { min: 10} draw: dots: color: [0.600,0.790,0.714] visible: global.green4_v forest-landcover: - filter: { kind: [forest, natural_forest, wood, natural_wood, natural_park], $zoom: { min: 10 }, not: { operator: "United States Forest Service" } } + filter: { kind: [forest, natural_forest, wood, natural_wood, natural_park], not: { operator: "United States Forest Service" } } draw: dots: color: [0.70,0.990,0.92] #[0.486,0.839,0.722] @@ -4806,6 +4921,7 @@ layers: draw: dots: color: [[4,[0.525,0.765,0.686]],[9,[0.416,0.737,0.631]]] + # TODO: This seems broken urban: filter: { kind: [urban, rural, residential] } visible: global.earth2_v @@ -4819,8 +4935,9 @@ layers: kind: aerodrome draw: dots: - color: [0.805,0.805,0.825] + color: [0.805,0.805,0.825] #pink visible: true + #order: 74 military: filter: kind: [military,naval_base] @@ -4832,18 +4949,27 @@ layers: filter: kind: danger_area draw: - dots: - color: red #[0.722,0.769,0.827] + polygons_transparent: + color: [0.7,0.2,0.2,0.05] + visible: true + lines_transparent: + color: [0.7,0.2,0.2,0.5] visible: true - order: 255 + width: 1px + dash: [3, 1] range: filter: kind: range draw: - dots: - color: red + polygons_transparent: + color: [0.7,0.2,0.2,0.05] + visible: true + #order: 256 + lines_transparent: + color: [0.7,0.2,0.2,0.5] visible: true - order: 256 + width: 1px + dash: [3, 1] university: filter: @@ -4855,7 +4981,7 @@ layers: #TIER 4 cemetery: filter: - kind: cemetery + kind: [cemetery,grave_yard] draw: dots: color: global.green2 @@ -4963,13 +5089,13 @@ layers: color: [0.8,0.8,0.8,0.5] visible: true # hack the order as the server isn't provided a good value - order: 236 + #order: 236 # hack the order as the server isn't provided a good value - shipyard: - filter: { kind: [shipyard,container_terminal,ferry_terminal,port_terminal] } - draw: - dots: - order: 237 + #shipyard: +# filter: { kind: [shipyard,container_terminal,ferry_terminal,port_terminal] } +# draw: +# dots: +# order: 237 #TIER 5 tourism-related: filter: @@ -5005,7 +5131,7 @@ layers: kind: orchard draw: dots: - color: [0.955,0.752,0.650] + color: [0.600,0.790,0.714] visible: true order: 236 @@ -5016,7 +5142,6 @@ layers: polygons_transparent: color: [0.8,0.8,0.7,0.1] visible: true - order: 235 wetland: filter: @@ -5025,7 +5150,6 @@ layers: polygons_transparent: color: [0.8,0.8,0.7,0.1] visible: true - order: 236 reef: filter: @@ -5075,6 +5199,56 @@ layers: draw: dots: color: [0.584,0.843,0.792] + grass: + filter: + kind: [grassland, grass] + draw: + dots: + color: [0.700,0.890,0.814] + visible: true + heath: + filter: + kind: heath + draw: + dots: + color: [0.700,0.890,0.814] + visible: true + vineyard: + filter: + kind: vineyard + draw: + dots: + color: [0.700,0.890,0.814] + visible: true + sand: + filter: + kind: sand + draw: + dots: + color: [0.870,0.870,0.737] + visible: true + shingle: + filter: + kind: shingle + draw: + dots: + color: [0.870,0.870,0.737] + visible: true + bare_rock: + filter: + kind: bare_rock + draw: + dots: + color: [0.870,0.870,0.737] + visible: true + desert: + filter: + kind: desert + draw: + dots: + color: [0.870,0.870,0.737] + visible: true + # glacier: # filter: # kind: glacier @@ -5124,6 +5298,16 @@ layers: color: [0.765,0.765,0.765] visible: true + all-other-landuse-late: + filter: + $zoom: { min: 13 } + $geometry: polygon + not: { kind: [fence, tree_row] } + draw: + dots: + color: [0.765,0.765,0.765] + visible: true + # GO MELLOW # 18/41.19776/-8.68722 tree_row: @@ -5179,6 +5363,7 @@ layers: draw: polygons: visible: true + #order: 100 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]]] early: filter: { $zoom: [9] } @@ -5221,13 +5406,23 @@ layers: landuse_urban_area-early: filter: # This is from Natural Earth and only shows up from zoom(0,9) - kind: urban_area + kind: [urban_area, residential] + # later zooms are from remapping OSM landuse values to urban_ara draw: dots: visible: global.earth2_ev order: global.feature_order 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]]] - + later: + filter: + $zoom: { min: 12 } + draw: + dots: + visible: false + polygons: + visible: true + color: [0.83,0.83,0.83] + city_wall: filter: { kind: city_wall } draw: @@ -5370,7 +5565,9 @@ layers: - ref: true draw: mapzen_icon_library: - priority: 20 +# priority: 20 + priority: | + function() { return (feature['min_zoom'] + (1 - 1 / feature['collision_rank']) * 0.1) || 65; } # you need to match any custom shield to the vector tile `network` values sprite: function() { return ('sdk_shield-' + feature.ref.length + 'char'); } sprite_default: sdk_shield_5char diff --git a/index.html b/index.html index d3cebb1..84dd291 100755 --- a/index.html +++ b/index.html @@ -22,10 +22,11 @@ - + - + + @@ -223,7 +224,7 @@ var tg_baseScene = 'bubble-wrap-style.yaml'; - var dev_or_prod = 'prod'; + var dev_or_prod = 'dev'; // prod var sdk_api_key = '-ZTNBBKCS5WZa62pfZyUkA'; @@ -391,6 +392,55 @@ }); gui.fallback_button.name('lang fallback'); + // POV (point of view) selector + var pov = { + '(default)': false, + 'ISO': 'iso', + 'Argentina': 'ar', + 'Bangladesh': 'bd', + 'Brazil': 'br', + 'China': 'cn', + 'Egypt': 'eg', + 'France': 'fr', + 'Germany': 'de', + 'Greece': 'gr', + 'India': 'in', + 'Indonesia': 'id', + 'Israel': 'il', + 'Italy': 'it', + 'Japan': 'jp', + 'Morocco': 'ma', + 'Nepal': 'np', + 'Netherlands': 'nl', + 'Pakistan': 'pk', + 'Palestine': 'ps', + 'Poland': 'pl', + 'Portugal': 'pt', + 'Russia': 'ru', + 'Saudi Arabia': 'sa', + 'South Korea': 'ko', + 'South Africa': 'za', // this isn't supported + 'Spain': 'es', + 'Sweden': 'se', + 'Taiwan': 'tw', + 'Turkey': 'tr', + 'Ukraine': 'ua', + 'United Kingdom': 'gb', + 'United States': 'us', + 'Vietnam': 'vn' + }; + // use query language, else default to English + gui.pov = query.pov || false; + gui.add(gui, 'pov', pov).onChange(function(value) { + scene.config.global.ux_point_of_view = value; + scene.updateConfig(); + }); + gui.fallback_pov = query.pov || false; + gui.pov_fallback_button = gui.add(gui, 'fallback_pov', pov).onChange(function(value) { + scene.config.global.ux_point_of_view_fallback = value; + scene.updateConfig(); + }); + gui.pov_fallback_button.name('pov fallback'); // So many themes var all_theme_imports = { color: null, @@ -628,7 +678,9 @@ var layers = selection.feature.layers; label += "Layers:
" layers.forEach(function(val) { - label += " "+val+"
" + if( !val.includes("name:") ) { + label += " "+val+"
" + } }); if (label != '') { diff --git a/themes/label-11.yaml b/themes/label-11.yaml index cc68aee..77a7742 100644 --- a/themes/label-11.yaml +++ b/themes/label-11.yaml @@ -118,111 +118,6 @@ layers: visible: true z-server-friend: - hide-until-z12-any: - draw: - mapzen_icon_library: - visible: true - hide-until-z14-any: - draw: - mapzen_icon_library: - visible: true - hide-until-z15-any: - draw: - mapzen_icon_library: - visible: true - hide-until-z15-no-area: - draw: - mapzen_icon_library: - visible: true - hide-until-z15-with-area: - draw: - mapzen_icon_library: - visible: true - hide-until-z16-any: - draw: - mapzen_icon_library: - visible: true - hide-until-z16-no-area: - draw: - mapzen_icon_library: - visible: true - hide-until-z17-any: - draw: - mapzen_icon_library: - visible: true - hide-until-z17-with-area: - draw: - mapzen_icon_library: - visible: true - hide-until-z17-no-area: - draw: - mapzen_icon_library: - visible: true - hide-until-z18-any: - draw: - mapzen_icon_library: - visible: true - hide-until-z18-no-area: - draw: - mapzen_icon_library: - visible: true - hide-until-z19-any: - draw: - mapzen_icon_library: - visible: true - military-early: - draw: - mapzen_icon_library: - visible: true - university-early: - draw: - mapzen_icon_library: - visible: true - school-early: - draw: - mapzen_icon_library: - visible: true - garden-area-early: - draw: - mapzen_icon_library: - visible: true - cemetery-early: - draw: - mapzen_icon_library: - visible: true - golf_course-early: - draw: - mapzen_icon_library: - visible: true - office-early: - draw: - mapzen_icon_library: - visible: true - landuse-labels-green-areas-not-national-park: - draw: - mapzen_icon_library: - visible: true - wilderness-areas-early: - draw: - mapzen_icon_library: - visible: true - not-national-park: - early: - draw: - mapzen_icon_library: - visible: true - landuse-labels-not-any-above: - draw: - mapzen_icon_library: - visible: true - glacier: - draw: - mapzen_icon_library: - visible: true - - - - - - - + draw: + mapzen_icon_library: + visible: true From e858f7e4a68d89f0bd58ba677509e55e5627ed5a Mon Sep 17 00:00:00 2001 From: "Nathaniel V. KELSO" Date: Wed, 17 Jul 2019 19:19:19 -0700 Subject: [PATCH 02/28] restore missing building style from bad web merge --- bubble-wrap-style.yaml | 211 +++++++++++++++++++++++++++++++++-------- 1 file changed, 174 insertions(+), 37 deletions(-) diff --git a/bubble-wrap-style.yaml b/bubble-wrap-style.yaml index 79439ab..2fb2f67 100644 --- a/bubble-wrap-style.yaml +++ b/bubble-wrap-style.yaml @@ -3052,43 +3052,38 @@ layers: # set default footprint and extrusion draw properties, but don't draw by default (rules below will turn visibility on) draw: polygons: - order: 329 visible: false + order: 329 color: global.building2 - visible: true -# color: | -# function() { -# //if( feature.scale_rank == 6 ) { -# // return [1.,0.,0.,1]; -# //} else if( feature.scale_rank == 5 ) { -# // return [0.,1.,0.,1]; -# //} else if( feature.scale_rank == 4 ) { -# // return [0.,0.,1.,1]; -# //} else if( feature.scale_rank == 3 ) { -# // return [0.,0.,0.5,1]; -# //} else if( feature.scale_rank == 2 ) { -# // return [0.,0.5,0.,1]; -# //} else if( feature.scale_rank == 1 ) { -# // return [0.,0.5,0.,1]; -# //} else if( feature.scale_rank == 0 ) { -# // return [0.5,0.,0.,1]; -# //} else { -# // return 'red'; -# //} -# if( feature.min_zoom == 13 ) { -# return 'yellow'; -# } else if( feature.min_zoom == 14 ) { -# return 'orange'; -# } else if( feature.min_zoom == 15 ) { -# return 'green'; -# } else if( feature.min_zoom == 16 ) { -# return 'pink'; -# } else if( feature.min_zoom == 17 ) { -# return 'red'; -# } else { -# return 'black'; -# } -# } + #color: | +# function() { +# if( feature.id ) { +# return [ +# 0.7 * (parseInt(feature.id, 16) / 100 % 1), // jshint ignore:line +# 0.7 * (parseInt(feature.id, 16) / 10000 % 1), // jshint ignore:line +# 0.7 * (parseInt(feature.id, 16) / 1000000 % 1), // jshint ignore:line +# 1 +# ]; +# } else { +# if( feature.scale_rank == 6 ) { +# return [1.,0.,0.,1]; +# } else if( feature.scale_rank == 5 ) { +# return [0.,1.,0.,1]; +# } else if( feature.scale_rank == 4 ) { +# return [0.,0.,1.,1]; +# } else if( feature.scale_rank == 3 ) { +# return [0.,0.,0.5,1]; +# } else if( feature.scale_rank == 2 ) { +# return [0.,0.5,0.,1]; +# } else if( feature.scale_rank == 1 ) { +# return [0.,0.5,0.,1]; +# } else if( feature.scale_rank == 0 ) { +# return [0.5,0.,0.,1]; +# } else { +# return [0.5,0.5,0.5,1]; +# } +# } +# } lines: style: lines order: 330 @@ -3096,8 +3091,150 @@ layers: color: [[13,[0.70,0.70,0.70]],[17,[0.65, 0.65, 0.65]]] width: [[13, 0.55px], [15, 0.65px], [16,0.75px], [18, 1.25px]] - parts: - filter: { kind: building_part } + # building footprints, pre-extrusion + footprints: + filter: + # show footprints for buildings at least one zoom level before they will be extruded + - { $zoom: 13, scale_rank: [1,2] } + - { $zoom: 14, scale_rank: [1,2,3] } + - { $zoom: 15, height: { min: 100 } } + - { $zoom: 15, area: { min: 500 } } + - { $zoom: 15, volume: { min: 100000 } } + - { $zoom: 16, area: { min: 100 } } + - { $zoom: 16, volume: { min: 50000 } } + - { $zoom: { min: 17 }, area: true } + draw: + polygons: { visible: true } + lines: { visible: true } + + # 3d buildings + extrude: + filter: + all: + - function() { return global.sdk_building_extrude; } + - any: + - { $zoom: 15, height: { min: 190 } } + - { $zoom: 15, area: { min: 5000 } } + - { $zoom: 15, volume: { min: 100000 } } + - { $zoom: 16, height: { min: 100 } } + - { $zoom: 16, area: { min: 3500 } } + - { $zoom: 16, volume: { min: 50000 } } + - { $zoom: 17, area: { min: 500 } } + - { $zoom: 17, volume: { min: 15000 } } + - { $zoom: { min: 18 } } + - not: + - layer: [-1, -2, -3, -4, -5] + draw: + polygons: + order: 438 + style: building-grid + extrude: global.building_extrude_height + lines: + order: 439 + style: building-lines + extrude: global.building_extrude_height + # NOTE: This is a hack to re-enable the building colors per landuse_kind + # Earlier versions before October 2016 didn't need this hack + not_landuse: + filter: { not: { landuse_kind: [station, retail, aerodrome, runway, taxiway, park,forest,nature_reserve,conservation,golf_course,garden, university,school, hospital] } } + draw: + polygons: + color: [0.892,0.880,0.878] + + # landuse-specific rules + in_park: + filter: + landuse_kind: [park,forest,nature_reserve,conservation,golf_course,garden] + draw: + polygons: + color: [0.864,0.910,0.905] + + # golf_course: + # filter: { landuse_kind: golf_course } + # draw: + # polygons: + # color: global.building2 + # nature_reserve: + # filter: { landuse_kind: nature_reserve } + # draw: + # polygons: + # color: global.building2 + # conservation: + # filter: { landuse_kind: conservation } + # draw: + # polygons: + # color: global.building2 + # zoo: + # filter: { landuse_kind: zoo } + # draw: + # polygons: + # color: global.building2 + in_university: + filter: { landuse_kind: [university,school] } + draw: + polygons: + color: [0.950,0.917,0.883] + lines: + color: global.brown1_bo + in_hospital: + filter: { landuse_kind: hospital } + draw: + polygons: + color: [0.976,0.908,0.913] + in_airport: + filter: { landuse_kind: [aerodrome, runway, taxiway] } + draw: + polygons: + color: global.purple_b + lines: + color: global.purple_bo + width: [[14,0.5px],[15,0.5px],[17,0.5px],[18,0.75px],[19,0.25m]] + in_retail: + filter: { landuse_kind: retail } + draw: + polygons: + color: [0.945, 0.898, 0.878] + + transit-overlay-station-buildings: + filter: + all: + - landuse_kind: [station] + - function() { return global.sdk_transit_overlay; } + draw: + polygons: + color: '#bdadbf' + order: 500 + #extrude: function() { return feature.height || 20; } + outline: + style: lines + order: 501 + color: '#d534df' + width: [[14,0.1px],[15,0.5px],[17,0.5px],[18,0.75px],[19,0.25m]] + #extrude: function() { return feature.height || 20; } + + buildings-labels: + filter: + all: + - { $zoom: { min: 17 } } + - $geometry: point + - not: { location: underground, kind: address } + - name: true + - function() { return global.text_visible_building; } + - landuse_kind: [university, college, school, kindergarten] + # - kind: [false, building, university, college, school, kindergarten] + any: + - { $zoom: [16], area: { min: 5000 } } + - { $zoom: [16], area: { min: 5000 } } + - { $zoom: [16], area: { min: 10000 }, landuse_kind: true } + - { $zoom: [16], area: { min: 7000 }, kind_detail: [university, college, school, kindergarten] } + - { $zoom: [16], volume: { min: 50000 }, name: true } + - { $zoom: [17], area: { min: 3000 } } + - { $zoom: [17], area: { min: 2000 }, kind_detail: [university, college, school, kindergarten] } + - { $zoom: [18], area: { min: 1000 } } + - { $zoom: [18], kind_detail: [university, college, school, kindergarten] } + - { $zoom: [19], area: { min: 200 } } + - { $zoom: { min: 19 }, kind_detail: [university, college, school, kindergarten] } + - { $zoom: { min: 20 }, area: true } draw: text-blend-order: text_source: global.ux_language_text_source From e5e6f31075230c78fff1d2acf53bd064fa8811b8 Mon Sep 17 00:00:00 2001 From: Brett Camper Date: Mon, 29 Jul 2019 16:33:17 -0400 Subject: [PATCH 03/28] update capital POV logic --- bubble-wrap-style.yaml | 26 ++++++++------------------ 1 file changed, 8 insertions(+), 18 deletions(-) diff --git a/bubble-wrap-style.yaml b/bubble-wrap-style.yaml index 2fb2f67..3fa4055 100644 --- a/bubble-wrap-style.yaml +++ b/bubble-wrap-style.yaml @@ -79,27 +79,17 @@ global: 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 - var capital_pov = (global.ux_point_of_view && feature['country_capital:'+global.ux_point_of_view]); - var capital_pov_falback = (global.ux_point_of_view_fallback && feature['country_capital:'+global.ux_point_of_view_fallback]); - var capital_default = feature.country_capital; - var capital = false; - - if( feature['name:en'] === 'Taipei' ) { - console.log( feature['name:en'] + " - " + global.ux_point_of_view + ": " + capital ); - console.log( '\t' + global.ux_point_of_view + ": " + global.ux_point_of_view ); - console.log( '\t' + feature['country_capital:'+global.ux_point_of_view] ); - console.log( '\t' + feature['country_capital:'+global.ux_point_of_view_fallback] ); - console.log( '\t' + feature['country_capital'] ); + if (global.ux_point_of_view && feature['country_capital:'+global.ux_point_of_view] != null) { + return feature['country_capital:'+global.ux_point_of_view]; } - switch( capital_default ) { - case( 'true' ): - case( true ): - return true; - default: - return false; + 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: | From b9d1900668f9625bf2a6f623d35109cf8247d878 Mon Sep 17 00:00:00 2001 From: "Nathaniel V. KELSO" Date: Mon, 29 Jul 2019 22:19:19 -0700 Subject: [PATCH 04/28] fix motorway_junction labels; disable landuse catchall (doesnt work) --- bubble-wrap-style.yaml | 53 ++++++++++++++++++++++++++---------------- 1 file changed, 33 insertions(+), 20 deletions(-) diff --git a/bubble-wrap-style.yaml b/bubble-wrap-style.yaml index 3fa4055..5fa29cd 100644 --- a/bubble-wrap-style.yaml +++ b/bubble-wrap-style.yaml @@ -4679,26 +4679,36 @@ layers: weight: 600 highway-exit: - filter: { kind: motorway_junction, $zoom: { min: 14 } } + filter: { kind: motorway_junction } draw: mapzen_icon_library: visible: false - text-blend-order: - visible: global.text_visible_exits - text_source: ref -# priority: 63 - font: - family: Montserrat - fill: global.text_fill_exits - size: [[12,9px],[15,12px],[17,14px]] - stroke: { color: global.text_stroke, width: [[12,2px],[14,3px],[15,3px]] } + z14+: + filter: { $zoom: { min: 14, max: 16 } } + draw: + text-blend-order: + visible: global.text_visible_exits + text_source: ref + font: + family: Montserrat + fill: global.text_fill_exits + size: [[12,9px],[15,12px],[17,14px]] + stroke: { color: global.text_stroke, width: [[12,2px],[14,3px],[15,3px]] } later: filter: { $zoom: { min: 16 } } draw: + text-blend-order: + visible: false mapzen_icon_library: + visible: global.text_visible_exits text: + visible: global.text_visible_exits + text_source: ref font: - weight: 600 + family: Montserrat + fill: global.text_fill_exits + size: [[12,9px],[15,12px],[17,14px]] + stroke: { color: global.text_stroke, width: [[12,2px],[14,3px],[15,3px]] } earth-labels: data: { source: mapzen, layer: earth } @@ -5274,15 +5284,18 @@ layers: color: [0.765,0.765,0.765] visible: true - all-other-landuse-late: - filter: - $zoom: { min: 13 } - $geometry: polygon - not: { kind: [fence, tree_row] } - draw: - dots: - color: [0.765,0.765,0.765] - visible: true +# # (20190729: nvk) TODO: This should only show when no other kind condition +# # has been met, which is not how the style is written / it's broken. +# +# all-other-landuse-late: +# filter: +# $zoom: { min: 13 } +# $geometry: polygon +# not: { kind: [fence, tree_row] } +# draw: +# dots: +# color: [0.765,0.765,0.765] +# visible: true # GO MELLOW # 18/41.19776/-8.68722 From 7445fb772f93d7f51563eab9c4fe42e3d915a52f Mon Sep 17 00:00:00 2001 From: "Nathaniel V. KELSO" Date: Tue, 30 Jul 2019 17:37:41 -0700 Subject: [PATCH 05/28] move to prod tiles now they are released --- bubble-wrap-style.yaml | 4 ++-- index.html | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/bubble-wrap-style.yaml b/bubble-wrap-style.yaml index 5fa29cd..b8228e6 100644 --- a/bubble-wrap-style.yaml +++ b/bubble-wrap-style.yaml @@ -520,8 +520,8 @@ fonts: 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: 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://t651c12le3.execute-api.us-east-2.amazonaws.com/staging/tilezen/vector/v1/512/all/{z}/{x}/{y}.mvt #url: https://d3gy1yxv8mxm7h.cloudfront.net/tilezen/vector/v1/512/all/{z}/{x}/{y}.mvt diff --git a/index.html b/index.html index bf3345a..d722835 100755 --- a/index.html +++ b/index.html @@ -226,7 +226,7 @@ var tg_baseScene = 'bubble-wrap-style.yaml'; - var dev_or_prod = 'dev'; + var dev_or_prod = 'prod'; // prod var sdk_api_key = '-ZTNBBKCS5WZa62pfZyUkA'; From 942074aacc99e58a82c8dfc080f4c4125a8093fc Mon Sep 17 00:00:00 2001 From: "Nathaniel V. KELSO" Date: Tue, 30 Jul 2019 17:40:19 -0700 Subject: [PATCH 06/28] remove unreferenced style for transparent dots --- bubble-wrap-style.yaml | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/bubble-wrap-style.yaml b/bubble-wrap-style.yaml index b8228e6..14505eb 100644 --- a/bubble-wrap-style.yaml +++ b/bubble-wrap-style.yaml @@ -744,16 +744,6 @@ styles: color.rgb = mix(color.rgb, vec3(0.850), TileDots(45., 0.1)); // size was set to 35 previously, now 45 - dots_transparent: - base: polygons - mix: pattern-dots - blend: overlay - 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 From 84584c5b55e8c4126ab45ac39c8d15ecc821380b Mon Sep 17 00:00:00 2001 From: "Nathaniel V. KELSO" Date: Tue, 30 Jul 2019 17:43:38 -0700 Subject: [PATCH 07/28] restore intermitent water styling --- bubble-wrap-style.yaml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/bubble-wrap-style.yaml b/bubble-wrap-style.yaml index 14505eb..077ca1d 100644 --- a/bubble-wrap-style.yaml +++ b/bubble-wrap-style.yaml @@ -1191,11 +1191,11 @@ layers: lines: 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]]] width: [[9,0.5px],[10,0.75px],[11,0.75px],[12,0.8px],[13,1px],[14,1px],[15,1px],[16,1px],[17,1.5px]] -# intermittent: -# filter: { intermittent: true } -# draw: -# lines: -# color: water1_o + intermittent: + filter: { intermittent: true } + draw: + lines: + color: water1_o river: #river center lines, not boundaries for polygons filter: { kind: [river,canal,stream,dam,ditch,drain], $zoom: { min: 12 }, not: { is_tunnel: true } } From 1f6386adaf833ded13764ed4e0b5c6de1c98e2e9 Mon Sep 17 00:00:00 2001 From: "Nathaniel V. KELSO" Date: Tue, 30 Jul 2019 17:58:18 -0700 Subject: [PATCH 08/28] remove outdated priority, set all to data --- bubble-wrap-style.yaml | 163 ++--------------------------------------- 1 file changed, 5 insertions(+), 158 deletions(-) diff --git a/bubble-wrap-style.yaml b/bubble-wrap-style.yaml index 077ca1d..15384cf 100644 --- a/bubble-wrap-style.yaml +++ b/bubble-wrap-style.yaml @@ -1415,7 +1415,6 @@ layers: roads: data: { source: mapzen, layer: roads } - #enabled: false draw: lines: # let roads sort themselves past zoom 14 (using server value) @@ -1622,19 +1621,15 @@ layers: $zoom: [13,14] draw: text-blend-order: -# priority: 50 visible: global.text_visible_highway - #text_source: ref font: fill: [0.0,0.0,0.0] weight: 600 size: 12px - # stroke: { color: [0.976,0.541,0.490], width: 4px } labels-highway-z15: filter: { $zoom: { min: 15 } } draw: text-blend-order: -# priority: 50 visible: global.text_visible_highway font: fill: [0.0,0.0,0.0] @@ -1713,8 +1708,6 @@ layers: filter: { $zoom: [14, 15] } draw: text-blend-order: -# priority: 51 - #text_source: ref font: fill: [0.0,0.0,0.0] weight: 600 @@ -1724,8 +1717,6 @@ layers: filter: { $zoom: { min: 16 } } draw: text-blend-order: -# priority: 51 - #text_source: global.ux_language_text_source_road_ref_and_name font: fill: [0.0,0.0,0.0] weight: 600 @@ -1734,7 +1725,6 @@ layers: labels-trunk_primary-default: draw: text-blend-order: - priority: 51 text_source: global.ux_language_text_source_road_ref_and_name_short visible: global.text_visible_trunk_primary labels-trunk_primary-z11-z12: @@ -1833,7 +1823,6 @@ layers: draw: text-blend-order: text_source: global.ux_language_text_source_road_ref_and_name_short - priority: 56 visible: global.text_visible_secondary_e labels-secondary-routes: filter: { $zoom: [13, 14] } @@ -1894,7 +1883,6 @@ layers: $zoom: [13] draw: text-blend-order: - priority: 56 visible: global.text_visible_secondary_e #text_source: global.ux_language_text_source_road_ref_and_name_short font: @@ -1905,7 +1893,6 @@ layers: filter: { $zoom: { min: 14, max: 18 } } draw: text-blend-order: - priority: 56 visible: global.text_visible_secondary #text_source: global.ux_language_text_source_road_ref_and_name_short font: @@ -1916,7 +1903,6 @@ layers: filter: { $zoom: { min: 18 } } draw: text-blend-order: - priority: 56 visible: global.text_visible_secondary text_source: global.ux_language_text_source_road_ref_and_name font: @@ -2016,7 +2002,6 @@ layers: filter: { $zoom: [13] } draw: text-blend-order: - priority: 57 visible: global.text_visible_tertiary_e font: fill: [0.5,0.5,0.5] @@ -2026,7 +2011,6 @@ layers: filter: { $zoom: [14] } draw: text-blend-order: - priority: 57 visible: global.text_visible_tertiary_e font: fill: [0.5,0.5,0.5] @@ -2036,7 +2020,6 @@ layers: filter: { $zoom: [15] } draw: text-blend-order: - priority: 57 visible: global.text_visible_tertiary font: fill: [0.3,0.3,0.3] @@ -2046,7 +2029,6 @@ layers: filter: { $zoom: [16] } draw: text-blend-order: - priority: 57 visible: global.text_visible_tertiary font: fill: [0.3,0.3,0.3] @@ -2056,7 +2038,6 @@ layers: filter: { $zoom: { min: 17, max: 18 } } draw: text-blend-order: - priority: 57 visible: global.text_visible_tertiary font: fill: [0.15,0.15,0.15] @@ -2066,7 +2047,6 @@ layers: filter: { $zoom: { min: 18 } } draw: text-blend-order: - priority: 57 visible: global.text_visible_tertiary font: fill: [0.15,0.15,0.15] @@ -2175,7 +2155,6 @@ layers: filter: { $zoom: 15 } draw: text-blend-order: - priority: 59 visible: global.text_visible_minor_road_e text_source: global.ux_language_text_source font: @@ -2186,7 +2165,6 @@ layers: filter: { $zoom: 16 } draw: text-blend-order: - priority: 59 visible: global.text_visible_minor_road text_source: global.ux_language_text_source font: @@ -2197,7 +2175,6 @@ layers: filter: { $zoom: { min: 17, max: 18 } } draw: text-blend-order: - priority: 59 visible: global.text_visible_minor_road text_source: global.ux_language_text_source font: @@ -2208,7 +2185,6 @@ layers: filter: { $zoom: { min: 18 } } draw: text-blend-order: - priority: 59 visible: global.text_visible_minor_road text_source: global.ux_language_text_source font: @@ -2298,7 +2274,6 @@ layers: filter: { $zoom: 17 } draw: text-blend-order: - priority: 60 visible: global.text_visible_service_road text_source: global.ux_language_text_source font: @@ -2310,7 +2285,6 @@ layers: filter: { $zoom: { min: 18 } } draw: text-blend-order: - priority: 60 visible: global.text_visible_service_road text_source: global.ux_language_text_source font: @@ -2354,7 +2328,8 @@ layers: } sprite_default: generic_shield_5char size: [[7,[75%,75%]],[12,[100%,100%]],[15,[110%,110%]]] - priority: 58 + priority: | + function() { return (feature['min_zoom'] + (1 - 1 / feature['collision_rank']) * 0.1) || 58; } # Size is specified below, and limited to 5 char in another filter repeat_group: shields repeat_distance: [[8,90px],[10,40px],[13,30px]] @@ -2394,7 +2369,6 @@ layers: - kind_detail: motorway draw: mapzen_icon_library: - priority: 47 #color: yellow visible: global.sdk_road_shields early: @@ -2410,7 +2384,6 @@ layers: - kind_detail: trunk draw: mapzen_icon_library: - priority: 48 #color: red visible: global.sdk_road_shields early: @@ -2426,7 +2399,6 @@ layers: - kind_detail: primary draw: mapzen_icon_library: - priority: 49 #color: aqua visible: global.sdk_road_shields early: @@ -2442,8 +2414,6 @@ layers: - kind_detail: secondary draw: mapzen_icon_library: - priority: 53 - #color: blue visible: global.sdk_road_shields early: filter: @@ -2458,8 +2428,6 @@ layers: - kind_detail: tertiary draw: mapzen_icon_library: - priority: 55 - #color: green visible: global.sdk_road_shields early: filter: @@ -2472,7 +2440,6 @@ layers: - kind: minor_road draw: mapzen_icon_library: - priority: 56 visible: global.sdk_road_shields early: filter: @@ -2518,9 +2485,8 @@ layers: } } draw: - mapzen_icon_library: + mapzen_icon_library: {} # this is sensitive to values > 56 - priority: 56 early: filter: { $zoom: { max: 12 } } draw: @@ -2536,9 +2502,8 @@ layers: } } draw: - mapzen_icon_library: + mapzen_icon_library: {} # this is sensitive to values > 56 - priority: 56 early: filter: { $zoom: { max: 13 } } draw: @@ -2586,7 +2551,6 @@ layers: shield_text: true draw: mapzen_icon_library: - priority: 46 # always show (or not show), irrespective of zoom visible: global.sdk_road_shields # US Federal Routes @@ -2597,7 +2561,6 @@ layers: $zoom: { min: 7 } draw: mapzen_icon_library: - priority: 47 # always show (or not show), irrespective of zoom visible: global.sdk_road_shields text: @@ -2719,7 +2682,6 @@ layers: filter: { $zoom: { min: 17 } } draw: text-blend-order: - priority: 61 visible: global.text_visible_path text_source: global.ux_language_text_source font: @@ -2816,7 +2778,6 @@ layers: filter: { $zoom: { min: 17 } } draw: text-blend-order: - priority: 62 visible: global.text_visible_steps text_source: global.ux_language_text_source font: @@ -2833,7 +2794,6 @@ layers: color: '#909090' width: [[13,0px],[14,0.5px],[15, 1px], [16, 1.5px], [18, 3m]] text-blend-order: - priority: 60 visible: global.text_visible_piste font: fill: global.text_fill_piste @@ -2962,7 +2922,6 @@ layers: filter: { $zoom: { min: 14 } } draw: text-blend-order: - priority: 63 visible: global.text_visible_aerialway text_source: global.ux_language_text_source font: @@ -3218,7 +3177,6 @@ layers: draw: text-blend-order: text_source: global.ux_language_text_source - priority: 70 order: 7 font: fill: '#666' @@ -3280,7 +3238,6 @@ layers: size: [[13, 95%], [16, 100%], [18, 105%]] sprite: generic # TODO: add custom entrance/edit icons interactive: global.sdk_interactive - priority: 65 repeat_group: abc buffer: 3px text: @@ -3322,7 +3279,6 @@ layers: filter: { name: true, $zoom: { min: 8 } } draw: text-blend-order: -# priority: 2 priority: | function() { return (feature['min_zoom'] + (1 - 1 / feature['collision_rank']) * 0.1) || 65; } visible: global.text_visible_admin @@ -3444,7 +3400,6 @@ layers: filter: { name: true, $zoom: { min: 8 } } draw: text-blend-order: -# priority: 3 priority: | function() { return (feature['min_zoom'] + (1 - 1 / feature['collision_rank']) * 0.1) || 65; } visible: global.text_visible_admin @@ -3518,7 +3473,6 @@ layers: $zoom: { min: 2, max: 9 } draw: text-blend-order: -# priority: 3 visible: global.text_visible_admin font: fill: [[2,[0.357,0.243,0.184]],[6,[0.604,0.437,0.427]]] @@ -3528,7 +3482,6 @@ layers: $zoom: [2,3] draw: text-blend-order: -# priority: 10 buffer: 10px font: size: 10px @@ -3552,7 +3505,6 @@ layers: draw: text-blend-order: buffer: 10px -# priority: 8 font: size: 11px early-ones-z4: @@ -3566,7 +3518,6 @@ layers: $zoom: [5] draw: text-blend-order: -# priority: 8 font: size: 13px early-ones-z5: @@ -3582,7 +3533,6 @@ layers: $zoom: [6] draw: text-blend-order: -# priority: 8 font: size: 16px small-ones-z6: @@ -3613,7 +3563,6 @@ layers: - population: { max: 5000000 } draw: text-blend-order: -# priority: 30 font: size: 12px @@ -3623,7 +3572,6 @@ layers: $zoom: { min: 4, max: 9 } draw: text-blend-order: -# priority: 14 visible: false text_source: global.ux_language_text_source_short font: @@ -3706,7 +3654,6 @@ layers: size: [[10,4px],[11,0px]] sprite: townspot-xs-rev buffer: 8px -# priority: 30 # debug testing #collide: false text: @@ -3751,22 +3698,16 @@ layers: draw: mapzen_icon_library: buffer: 25px - #color: red - #visible: false z9-10k-below: filter: { $zoom: [8,9], population: { max: 10000 } } draw: mapzen_icon_library: buffer: 18px - #color: blue - #visible: false z9-no-population: filter: { $zoom: [8,9], population: false } draw: mapzen_icon_library: buffer: 10px - #color: yellow - #visible: false sorry-denver: filter: @@ -3811,12 +3752,10 @@ layers: mapzen_icon_library: size: [[4,5px],[8,6px],[9,0px]] sprite: townspot-m-rev -# priority: 6 text: font: size: [[2,11px],[6,15px],[8,16px],[10,18px],[12,18px],[13,0px]] text-blend-order: -# priority: 6 font: size: [[2,11px],[6,15px],[8,16px],[10,18px],[12,18px],[13,0px]] capital: @@ -3829,9 +3768,6 @@ layers: mapzen_icon_library: size: [[10,8px],[11,0px]] sprite: capital-l -# priority: 5 -# text-blend-order: -# priority: 5 population-5m-10m: filter: population: { min: 5000000, max: 10000000 } @@ -3839,12 +3775,10 @@ layers: mapzen_icon_library: size: [[4,5px],[8,6px],[9,0px]] sprite: townspot-m-rev -# priority: 7 text: font: size: [[4,10px],[6,13px],[8,16px],[10,18px],[12,18px],[13,0px]] text-blend-order: -# priority: 7 font: size: [[4,10px],[6,13px],[8,16px],[10,18px],[12,18px],[13,0px]] capital: @@ -3857,9 +3791,6 @@ layers: mapzen_icon_library: size: [[10,8px],[11,0px]] sprite: capital-l -# priority: 6 -# text-blend-order: -# priority: 6 population-1m-5m: filter: population: { min: 1000000, max: 5000000 } @@ -3867,12 +3798,10 @@ layers: mapzen_icon_library: size: [[4,5px],[8,6px],[9,0px]] sprite: townspot-m-rev -# priority: 9 text: font: size: [[4,10px],[6,13px],[8,16px],[10,18px],[12,18px],[13,0px]] text-blend-order: -# priority: 9 font: size: [[4,10px],[6,13px],[8,16px],[10,18px],[12,18px],[13,0px]] capital: @@ -3885,9 +3814,6 @@ layers: mapzen_icon_library: size: [[10,8px],[11,0px]] sprite: capital-l -# priority: 8 -# text-blend-order: -# priority: 8 population-500k-1m: filter: population: { min: 500000, max: 1000000 } @@ -3895,12 +3821,10 @@ layers: mapzen_icon_library: size: [[8,6px],[9,0px]] sprite: townspot-m-rev -# priority: 11 text: font: size: [[5,10px],[8,14px],[10,14px],[12,16px],[13,0px]] text-blend-order: -# priority: 11 font: size: [[5,10px],[8,14px],[10,14px],[12,16px],[13,0px]] capital: @@ -3912,9 +3836,6 @@ layers: mapzen_icon_library: size: [[10,6px],[11,0px]] sprite: capital-m -# priority: 10 -# text-blend-order: -# priority: 10 population-200k-500k: filter: population: { min: 200000, max: 500000 } @@ -3922,12 +3843,10 @@ layers: mapzen_icon_library: size: [[8,6px],[9,6px],[10,6px],[11,0px]] sprite: townspot-m-rev -# priority: 13 text: font: size: [[6,10px],[8,12px],[10,14px],[12,16px],[13,0px]] text-blend-order: -# priority: 13 font: size: [[6,10px],[8,12px],[10,14px],[12,16px],[13,0px]] capital: @@ -3939,9 +3858,6 @@ layers: mapzen_icon_library: size: [[10,6px],[11,0px]] sprite: capital-m -# priority: 12 -# text-blend-order: -# priority: 12 population-100k-200k: filter: population: { min: 100000, max: 200000 } @@ -3949,12 +3865,10 @@ layers: mapzen_icon_library: size: [[8,6px],[9,6px],[10,6px],[11,0px]] sprite: townspot-m-rev -# priority: 15 text: font: size: [[6,10px],[8,12px],[10,12px],[12,14px],[14,14px],[15,0px]] text-blend-order: -# priority: 15 font: size: [[6,10px],[8,12px],[10,12px],[12,14px],[14,14px],[15,0px]] capital: @@ -3966,9 +3880,6 @@ layers: mapzen_icon_library: size: [[10,6px],[11,0px]] sprite: capital-m -# priority: 14 -# text-blend-order: -# priority: 14 population-50k-100k: filter: population: { min: 50000, max: 100000 } @@ -3976,13 +3887,11 @@ layers: mapzen_icon_library: size: [[8,5px],[9,5px],[10,6px],[11,0px]] sprite: townspot-s-rev -# priority: 17 text: font: fill: [0.30,0.30,0.30] size: [[6,10px],[8,11px],[10,12px],[12,14px],[14,14px],[15,0px]] text-blend-order: -# priority: 17 font: fill: [0.30,0.30,0.30] size: [[6,10px],[8,11px],[10,12px],[12,14px],[14,14px],[15,0px]] @@ -3995,9 +3904,6 @@ layers: mapzen_icon_library: size: [[10,5px],[11,0px]] sprite: capital-m -# priority: 16 -# text-blend-order: -# priority: 16 population-20k-50k: filter: population: { min: 20000, max: 50000 } @@ -4005,13 +3911,11 @@ layers: mapzen_icon_library: size: [[8,5px],[9,5px],[10,5px],[11,0px]] sprite: townspot-s-rev -# priority: 19 text: font: fill: [0.30,0.30,0.30] size: [[9,11px],[12,12px],[14,12px],[15,0px]] text-blend-order: -# priority: 19 font: fill: [0.30,0.30,0.30] size: [[9,11px],[12,12px],[14,12px],[15,0px]] @@ -4024,9 +3928,6 @@ layers: mapzen_icon_library: size: [[10,5px],[11,0px]] sprite: capital-s -# priority: 18 -# text-blend-order: -# priority: 18 population-10k-20k: filter: population: { min: 10000, max: 20000 } @@ -4034,13 +3935,11 @@ layers: mapzen_icon_library: size: [[8,4px],[9,4px],[10,4px],[11,0px]] sprite: townspot-xs-rev -# priority: 21 text: font: fill: [0.35,0.35,0.35] size: [[9,11px],[12,12px],[14,12px],[15,0px]] text-blend-order: -# priority: 21 font: fill: [0.35,0.35,0.35] size: [[9,11px],[12,12px],[14,12px],[15,0px]] @@ -4053,9 +3952,6 @@ layers: mapzen_icon_library: size: [[10,5px],[11,0px]] sprite: capital-s -# priority: 20 -# text-blend-order: -# priority: 20 population-5k-10k: filter: population: { min: 5000, max: 10000 } @@ -4063,13 +3959,11 @@ layers: mapzen_icon_library: size: [[8,4px],[9,4px],[10,4px],[11,0px]] sprite: townspot-xs-rev -# priority: 23 text: font: fill: [0.35,0.35,0.35] size: [[9,10px],[12,12px],[13,12px],[14,12px],[15,0px]] text-blend-order: -# priority: 23 font: fill: [0.35,0.35,0.35] size: [[9,10px],[12,12px],[13,12px],[14,12px],[15,0px]] @@ -4082,9 +3976,6 @@ layers: mapzen_icon_library: size: [[10,5px],[11,0px]] sprite: capital-s -# priority: 22 -# text-blend-order: -# priority: 22 population-2k-5k: filter: population: { min: 2000, max: 5000 } @@ -4092,13 +3983,11 @@ layers: mapzen_icon_library: size: [[8,4px],[9,4px],[10,4px],[11,0px]] sprite: townspot-xs-rev -# priority: 25 text: font: fill: [0.35,0.35,0.35] size: [[9,10px],[12,10px],[13,12px],[14,12px],[15,0px]] text-blend-order: -# priority: 25 font: fill: [0.35,0.35,0.35] size: [[9,10px],[12,10px],[13,12px],[14,12px],[15,0px]] @@ -4111,9 +4000,6 @@ layers: mapzen_icon_library: size: [[10,5px],[11,0px]] sprite: capital-s -# priority: 24 -# text-blend-order: -# priority: 24 population-1k-2k: filter: population: { min: 1000, max: 2000 } @@ -4121,13 +4007,11 @@ layers: mapzen_icon_library: size: [[8,4px],[9,4px],[10,4px],[11,0px]] sprite: townspot-xs-rev -# priority: 27 text: font: fill: [0.35,0.35,0.35] size: [[9,10px],[12,10px],[14,11px],[15,0px]] text-blend-order: -# priority: 27 font: fill: [0.35,0.35,0.35] size: [[9,10px],[12,10px],[14,11px],[15,0px]] @@ -4140,9 +4024,6 @@ layers: mapzen_icon_library: size: [[10,5px],[11,0px]] sprite: capital-s -# priority: 26 -# text-blend-order: -# priority: 26 population-200-1k: filter: population: { min: 200, max: 1000 } @@ -4150,13 +4031,11 @@ layers: mapzen_icon_library: size: [[8,4px],[9,4px],[10,4px],[11,0px]] sprite: townspot-xs-rev -# priority: 28 text: font: fill: [0.35,0.35,0.35] size: [[9,10px],[12,10px],[14,11px],[15,0px]] text-blend-order: -# priority: 28 font: fill: [0.35,0.35,0.35] size: [[9,10px],[12,10px],[14,11px],[15,0px]] @@ -4169,9 +4048,6 @@ layers: mapzen_icon_library: size: [[10,5px],[11,0px]] sprite: capital-s -# priority: 27 -# text-blend-order: -# priority: 27 # z_country_capital_pov: # filter: @@ -4205,7 +4081,6 @@ layers: # there are more labels than we want to show, so we hide them, # then selectively reveal in classes below (ultimately a data problem) visible: global.text_visible_neighbourhoods_e -# priority: 29 buffer: 8px text_wrap: 10 max_lines: 2 @@ -4244,7 +4119,6 @@ layers: min_zoom: { min: 15 } draw: text-blend-order: -# priority: 19 font: size: 13px @@ -4264,7 +4138,6 @@ layers: sprite: function() { return feature.kind; } sprite_default: generic interactive: global.sdk_interactive - #priority: 65 priority: | function() { return (feature['min_zoom'] + (1 - 1 / feature['collision_rank']) * 0.1) || 65; } repeat_group: abc @@ -4358,7 +4231,6 @@ layers: # draw: # mapzen_icon_library: # visible: global.icon_visible_poi_landuse_e -# #priority: 69 # z17: # filter: # kind: [parking] @@ -4383,7 +4255,6 @@ layers: # draw: # mapzen_icon_library: # visible: false -# #priority: 100 # text: # font: # fill: '#666' @@ -4399,14 +4270,6 @@ layers: # visible: false # text: { font: { style: italic } } - - # set special priority, sprite, and text styles per kind -# has-area: -# filter: { area: true } -# draw: -# mapzen_icon_library: -# priority: 41 - national-park-protected-areas: filter: kind: [national_park, battlefield] @@ -4480,7 +4343,6 @@ layers: mapzen_icon_library: visible: global.icon_visible_landuse_green size: global.icon_size_green - #priority: 42 text: visible: global.text_visible_landuse_green text_source: global.ux_language_text_source_iata @@ -4495,7 +4357,6 @@ layers: mapzen_icon_library: visible: false text: -# priority: 43 text_wrap: 10 visible: true font: @@ -4538,20 +4399,12 @@ layers: visible: false text: visible: true - #priority: 44 text_wrap: 10 font: weight: normal style: italic fill: '#4ba3c5' -# landuse-labels-not-any-above: -# filter: -# 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] } -# draw: -# mapzen_icon_library: -## priority: 43 - building-like: filter: { kind: [commercial,residential,warehouse,public,dormitory], osm_relation: false } draw: @@ -4564,7 +4417,6 @@ layers: mapzen_icon_library: visible: global.icon_visible_station size: [[13, 60%], [15, 80%], [17, 100%], [18, 110%]] -# priority: 42 text: visible: global.text_visible_station station-early: @@ -4599,13 +4451,11 @@ layers: filter: { kind: [garden, allotments], $zoom: [16], area: false } draw: mapzen_icon_library: -# priority: 45 text: { font: { size: 10px, style: italic } } garden-no-area-later: filter: { kind: [garden, allotments], $zoom: { min: 17 }, area: false } draw: mapzen_icon_library: -# priority: 45 text: { font: { size: 11px, style: italic } } gate: filter: { kind: gate, name: true } @@ -4656,7 +4506,6 @@ layers: text-blend-order: visible: global.text_visible_airport_gate text_source: ref -# priority: 63 font: fill: global.text_fill_exits size: [[16,9px],[17,12px],[20,14px]] @@ -4800,7 +4649,6 @@ layers: text-blend-order: text_source: global.ux_language_text_source interactive: global.sdk_interactive -# priority: 100 font: fill: '#666' family: global.text_font_family @@ -5544,9 +5392,8 @@ layers: - ref: true draw: mapzen_icon_library: -# priority: 20 priority: | - function() { return (feature['min_zoom'] + (1 - 1 / feature['collision_rank']) * 0.1) || 65; } + function() { return (feature['min_zoom'] + (1 - 1 / feature['collision_rank']) * 0.1) || 20; } # you need to match any custom shield to the vector tile `network` values sprite: function() { return ('sdk_shield-' + feature.ref.length + 'char'); } sprite_default: sdk_shield_5char From 0c2624e3cb61fceb0555934313ffbccd251a0be5 Mon Sep 17 00:00:00 2001 From: "Nathaniel V. KELSO" Date: Tue, 30 Jul 2019 22:24:59 -0700 Subject: [PATCH 09/28] cleanup old boundaries code --- bubble-wrap-style.yaml | 28 ---------------------------- 1 file changed, 28 deletions(-) diff --git a/bubble-wrap-style.yaml b/bubble-wrap-style.yaml index 15384cf..253c96f 100644 --- a/bubble-wrap-style.yaml +++ b/bubble-wrap-style.yaml @@ -3261,8 +3261,6 @@ layers: country: filter: any: - #- kind: [country, indefinite, indeterminate] - #- admin_level: 2 - global.ux_point_of_view_kind_filter_country draw: lines: @@ -3302,14 +3300,7 @@ layers: other_country_boundary_disputed_etc: filter: global.ux_point_of_view_kind_filter_disputed_etc - #- kind: [disputed, lease_limit, line_of_control, overlay_limit] - #- kind: [disputed_breakaway, disputed_claim, disputed_elusive, disputed_reference_line] draw: - #lines: -# order: global.feature_order -# visible: true -# color: blue -# width: 2px dashed: visible: true order: global.feature_order @@ -3317,34 +3308,15 @@ layers: width: [[1, 0.2px], [2, 0.5px], [5, 1.5px], [6, 2.0px], [8, 2.5px], [16, 3.5px], [17, 10m]] disputed: filter: - #- kind: [disputed, line_of_control] - #- kind: [disputed_breakaway, disputed_claim, disputed_elusive, disputed_reference_line] global.ux_point_of_view_kind_filter_disputed_star draw: - #lines: -# order: global.feature_order -# visible: true -# color: red -# width: 2px dashed: visible: false dashed_big: visible: true order: global.feature_order color: global.country_boundary - #width: [[1, 0.2px], [2, 0.5px], [4, 1.0px], [9, 1.5px], [14, 2.5px], [16, 3.5px], [17, 10m]] width: [[1, 0.5px], [2, 1.0px], [4, 1.5px], [9, 2.5px], [14, 3.5px], [16, 4.5px], [17, 14m]] - #width: 20px -# disputed_star_early: -# filter: -# #kind: [disputed_breakaway, disputed_claim, disputed_elusive, disputed_reference_line] -# global.ux_point_of_view_kind_filter_disputed_star -# $zoom: [5,6] -# draw: -# dashed: -# width: [[4, 0px], [5, 1.0px], [8, 2.5px], [16, 3.5px], [17, 10m]] -# dashed_big: -# width: [[5, 0px], [5, 1.0px], [9, 2.5px], [14, 3.5px], [16, 4.5px], [17, 14m]] unrecognized: filter: From 39af12d7192bf73fb8e0d685394612eb5c1c109a Mon Sep 17 00:00:00 2001 From: "Nathaniel V. KELSO" Date: Tue, 30 Jul 2019 22:27:04 -0700 Subject: [PATCH 10/28] remove z_country_capital_pov debug --- bubble-wrap-style.yaml | 13 ------------- 1 file changed, 13 deletions(-) diff --git a/bubble-wrap-style.yaml b/bubble-wrap-style.yaml index 253c96f..970ec0a 100644 --- a/bubble-wrap-style.yaml +++ b/bubble-wrap-style.yaml @@ -4021,19 +4021,6 @@ layers: size: [[10,5px],[11,0px]] sprite: capital-s -# z_country_capital_pov: -# filter: -# draw: -# mapzen_icon_library: -# text: -# font: -# weight: 900 -# color: red -# text-blend-order: -# font: -# weight: 900 -# color: red - # #neighborhoods (excluding microhoods, eg the Tendernob) # From 8cbbc7f15e702d7df72ecfcfd0df8e32d170e4fa Mon Sep 17 00:00:00 2001 From: "Nathaniel V. KELSO" Date: Tue, 30 Jul 2019 22:28:18 -0700 Subject: [PATCH 11/28] remove logic that moved to server --- bubble-wrap-style.yaml | 61 ------------------------------------------ 1 file changed, 61 deletions(-) diff --git a/bubble-wrap-style.yaml b/bubble-wrap-style.yaml index 970ec0a..ff83008 100644 --- a/bubble-wrap-style.yaml +++ b/bubble-wrap-style.yaml @@ -4168,67 +4168,6 @@ layers: visible: false #end different icon sprites - #most POI icons without name should be hidden, except these -# no-name: -# filter: { name: false } -# draw: -# mapzen_icon_library: -# visible: false -# # eg park polygons in SF that have area but no name, sigh -# no-name-no-area: -# filter: -# kind: true -# name: false -# draw: -# mapzen_icon_library: -# visible: false -# sports-pitch: -# filter: -# $zoom: { min: 17 } -# kind: [grass, pitch] -# kind_detail: [baseball, basketball, football, hockey, soccer, tennis] -# draw: -# mapzen_icon_library: -# visible: global.icon_visible_poi_landuse_e -# z17: -# filter: -# kind: [parking] -# draw: { mapzen_icon_library: { visible: global.icon_visible_poi_landuse_e } } -# z18: -# # for different styles, different sets -# # since [picnic_site] doesn't have bubble-wrap icon, it's omitted here -# filter: -# $zoom: { min: 18 } -# kind: [drinking_water, information, playground, toilets, traffic_signals] -# draw: { mapzen_icon_library: { visible: global.icon_visible_poi_landuse_e } } -# z19: -# filter: -# $zoom: { min: 19 } -# kind: [bicycle_parking] -# draw: { mapzen_icon_library: { visible: global.icon_visible_poi_landuse_e } } -# -# # NOTE: all natural_* should only be in landuse layer -# suppress-icon-always: -# filter: -# kind: [natural_forest, natural_park, natural_wood] -# draw: -# mapzen_icon_library: -# visible: false -# text: -# font: -# fill: '#666' -# family: global.text_font_family -# style: italic -# size: 11px -# suppress-icon-z17: -# filter: -# $zoom: { min: 17 } -# kind: [common, grass, houseboat, pedestrian, railway, ship, wetland] -# draw: -# mapzen_icon_library: -# visible: false -# text: { font: { style: italic } } - national-park-protected-areas: filter: kind: [national_park, battlefield] From 0fb72303a983c8c27d45fb2c7be9a941e0138dc3 Mon Sep 17 00:00:00 2001 From: "Nathaniel V. KELSO" Date: Tue, 30 Jul 2019 22:30:41 -0700 Subject: [PATCH 12/28] remove shipyard (now serverside) --- bubble-wrap-style.yaml | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/bubble-wrap-style.yaml b/bubble-wrap-style.yaml index ff83008..7d44b97 100644 --- a/bubble-wrap-style.yaml +++ b/bubble-wrap-style.yaml @@ -4812,12 +4812,7 @@ layers: visible: true # hack the order as the server isn't provided a good value #order: 236 - # hack the order as the server isn't provided a good value - #shipyard: -# filter: { kind: [shipyard,container_terminal,ferry_terminal,port_terminal] } -# draw: -# dots: -# order: 237 + #TIER 5 tourism-related: filter: From a53c4714494c84edb7d85a6af1978b5ff7735f01 Mon Sep 17 00:00:00 2001 From: "Nathaniel V. KELSO" Date: Tue, 30 Jul 2019 22:31:56 -0700 Subject: [PATCH 13/28] minor --- bubble-wrap-style.yaml | 1 - 1 file changed, 1 deletion(-) diff --git a/bubble-wrap-style.yaml b/bubble-wrap-style.yaml index 7d44b97..4c63773 100644 --- a/bubble-wrap-style.yaml +++ b/bubble-wrap-style.yaml @@ -5083,7 +5083,6 @@ layers: draw: polygons: visible: true - #order: 100 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]]] early: filter: { $zoom: [9] } From 6853cd1a1185188fab8cd67fe1c9c15b337d9ca7 Mon Sep 17 00:00:00 2001 From: "Nathaniel V. KELSO" Date: Tue, 30 Jul 2019 22:33:05 -0700 Subject: [PATCH 14/28] simplify sources --- bubble-wrap-style.yaml | 4 ---- 1 file changed, 4 deletions(-) diff --git a/bubble-wrap-style.yaml b/bubble-wrap-style.yaml index 4c63773..6bed9ef 100644 --- a/bubble-wrap-style.yaml +++ b/bubble-wrap-style.yaml @@ -523,10 +523,6 @@ sources: 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://t651c12le3.execute-api.us-east-2.amazonaws.com/staging/tilezen/vector/v1/512/all/{z}/{x}/{y}.mvt - #url: https://d3gy1yxv8mxm7h.cloudfront.net/tilezen/vector/v1/512/all/{z}/{x}/{y}.mvt - #url: https://snapzen-dev.sc-jpl.com/tilezen/vector/v1/512/all/{z}/{x}/{y}.mvt - #url: https://snapzen.sc-jpl.com/tilezen/vector/v1/512/all/{z}/{x}/{y}.mvt #url: https://xyz.api.here.com/tiles/herebase.02/{z}/{x}/{y}/omv url_params: api_key: global.sdk_api_key From be9020163d755c795db104b0fb05bf5d4144d44d Mon Sep 17 00:00:00 2001 From: "Nathaniel V. KELSO" Date: Tue, 30 Jul 2019 22:55:26 -0700 Subject: [PATCH 15/28] move toll and hgv to overlays --- bubble-wrap-style.yaml | 170 +++++++++++++++++++++++------------------ index.html | 27 +++++++ 2 files changed, 121 insertions(+), 76 deletions(-) diff --git a/bubble-wrap-style.yaml b/bubble-wrap-style.yaml index 6bed9ef..ccf0fd3 100644 --- a/bubble-wrap-style.yaml +++ b/bubble-wrap-style.yaml @@ -39,7 +39,7 @@ global: case( 'disputed_breakaway' ): case( 'disputed_claim' ): case( 'disputed_elusive' ): - case( 'disputed_reference_line' ): + case( 'disputed_reference_line' ): return true; default: return false; @@ -55,7 +55,7 @@ global: case( 'disputed_breakaway' ): case( 'disputed_claim' ): case( 'disputed_elusive' ): - case( 'disputed_reference_line' ): + case( 'disputed_reference_line' ): return true; default: return false; @@ -291,6 +291,16 @@ global: # 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 @@ -1187,9 +1197,9 @@ layers: lines: 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]]] width: [[9,0.5px],[10,0.75px],[11,0.75px],[12,0.8px],[13,1px],[14,1px],[15,1px],[16,1px],[17,1.5px]] - intermittent: + intermittent: filter: { intermittent: true } - draw: + draw: lines: color: water1_o river: @@ -1444,72 +1454,80 @@ layers: # order: 1000 # width: 1px # visible: true -# z-hgv: -# filter: { hgv: true } -# draw: -# lines: -# visible: true -# color: blue -# width: 1.7px -# z-none: -# filter: -# - hgv_restriction: true -# draw: -# lines: -# color: red -# width: 2.5px -# z-restricted: -# filter: -# - hgv_restriction: true -# draw: -# lines: -# color: purple -# width: 2.5px -# z-shields: -# filter: { hgv_restriction_shield_text: true } -# draw: -# mapzen_icon_library: -# # you need to match any custom shield to the vector tile `network` values -# sprite: | -# function() { -# if( feature.hgv_restriction_shield_text ) { -# return ('generic_shield-' + feature.hgv_restriction_shield_text.length + 'char'); -# } -# } -# size: [[7,[75%,75%]],[12,[100%,100%]],[15,[110%,110%]]] -# priority: 1 -# # Size is specified below, and limited to 5 char in another filter -# repeat_group: shields -# repeat_distance: [[8,90px],[10,40px],[13,30px]] -# placement: midpoint -# color: purple -# placement_min_length_ratio: -# - [8, 0.1] -# - [9, 0.25] -# - [10, 0.25] -# - [11, 0.15] -# - [12, 1] -# - [13, 1.50] -# - [14, 2.0] -# #cull_from_tile: true -# visible: true -# text: -# repeat_distance: 200px -# anchor: center -# text_source: hgv_restriction_shield_text -# font: -# family: Montserrat -# weight: 500 -# fill: white -# size: [[7, 7px], [13, 9px], [15, 10px]] -# stroke: { color: global.text_stroke, width: 0px } -# toll: -# filter: { toll: true } -# draw: -# lines: -# outline: -# color: black -# width: 1.5px + + # TODO: tunnels + hgv-interlay: + filter: + all: + - hgv: true + - function() { return global.sdk_hgv_overlay; } + draw: + lines: + visible: true + color: blue + width: 1.7px + z-none: + filter: + - hgv_restriction: true + draw: + lines: + color: red + width: 2.5px + z-restricted: + filter: + - hgv_restriction: true + draw: + lines: + color: purple + width: 2.5px + z-shields: + filter: { hgv_restriction_shield_text: true } + draw: + mapzen_icon_library: + # you need to match any custom shield to the vector tile `network` values + sprite: | + function() { + if( feature.hgv_restriction_shield_text ) { + return ('generic_shield-' + feature.hgv_restriction_shield_text.length + 'char'); + } + } + size: [[7,[75%,75%]],[12,[100%,100%]],[15,[110%,110%]]] + priority: 1 + # Size is specified below, and limited to 5 char in another filter + repeat_group: shields + repeat_distance: [[8,90px],[10,40px],[13,30px]] + placement: midpoint + color: purple + placement_min_length_ratio: + - [8, 0.1] + - [9, 0.25] + - [10, 0.25] + - [11, 0.15] + - [12, 1] + - [13, 1.50] + - [14, 2.0] + #cull_from_tile: true + visible: true + text: + repeat_distance: 200px + anchor: center + text_source: hgv_restriction_shield_text + font: + family: Montserrat + weight: 500 + fill: white + size: [[7, 7px], [13, 9px], [15, 10px]] + stroke: { color: global.text_stroke, width: 0px } + toll-interlay: + filter: + all: + - toll: true + - function() { return global.sdk_toll_road_overlay; } + draw: + lines: + outline: + color: black + width: [[6,0.25px],[10,1px],[12,1.5px],[15,2px],[20,4px]] arrows: # oneway arrows and shields are distinct groups! @@ -3294,7 +3312,7 @@ layers: offset: [0px, 0px] other_country_boundary_disputed_etc: - filter: + filter: global.ux_point_of_view_kind_filter_disputed_etc draw: dashed: @@ -3303,7 +3321,7 @@ layers: color: global.country_boundary width: [[1, 0.2px], [2, 0.5px], [5, 1.5px], [6, 2.0px], [8, 2.5px], [16, 3.5px], [17, 10m]] disputed: - filter: + filter: global.ux_point_of_view_kind_filter_disputed_star draw: dashed: @@ -3315,7 +3333,7 @@ layers: width: [[1, 0.5px], [2, 1.0px], [4, 1.5px], [9, 2.5px], [14, 3.5px], [16, 4.5px], [17, 14m]] unrecognized: - filter: + filter: - global.ux_point_of_view_kind_filter_unrecognized draw: lines: @@ -3361,7 +3379,7 @@ layers: filter: kind: aboriginal_lands draw: - lines: + lines: width: [[8, 1.0px], [9, 1.5px], [14, 2.0px], [16, 3.5px]] region-labels: @@ -3395,7 +3413,7 @@ layers: text-blend-order: visible: false unrecognized-region: - filter: + filter: - global.ux_point_of_view_kind_filter_unrecognized draw: lines: @@ -4416,7 +4434,7 @@ layers: draw: mapzen_icon_library: visible: false - z14+: + z14+: filter: { $zoom: { min: 14, max: 16 } } draw: text-blend-order: diff --git a/index.html b/index.html index d722835..3e1949f 100755 --- a/index.html +++ b/index.html @@ -537,6 +537,33 @@ }); gui.transit_button.name('transit'); + + // Toll Road selector + var toll_roads = 'Toll roads'; + gui[toll_roads] = false; + gui.add(gui, toll_roads).onChange(function(value) { + scene.config.global.sdk_toll_road_overlay = (value === 'true' || value === true); // dat.gui passes a string + if (value === 'true' || value === true) { + scene.config.global.sdk_toll_road_overlay = true; + } else { + scene.config.global.sdk_toll_road_overlay = false; + } + scene.updateConfig(); + }); + + // Heavy Goods Vehicle selector + var hgv = 'HGV restriction'; + gui[hgv] = false; + gui.add(gui, hgv).onChange(function(value) { + scene.config.global.hgv_overlay = (value === 'true' || value === true); // dat.gui passes a string + if (value === 'true' || value === true) { + scene.config.global.sdk_hgv_overlay = true; + } else { + scene.config.global.sdk_hgv_overlay = false; + } + scene.updateConfig(); + }); + // Building extrusion selector var building_3d = { '(default)': true, From 0c0ce55c1cb12a2b2a5d80be9d637bde7cfdaaff Mon Sep 17 00:00:00 2001 From: "Nathaniel V. KELSO" Date: Tue, 30 Jul 2019 23:07:14 -0700 Subject: [PATCH 16/28] fix hgv tunnels --- bubble-wrap-style.yaml | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/bubble-wrap-style.yaml b/bubble-wrap-style.yaml index ccf0fd3..d803b56 100644 --- a/bubble-wrap-style.yaml +++ b/bubble-wrap-style.yaml @@ -1455,7 +1455,6 @@ layers: # width: 1px # visible: true - # TODO: tunnels hgv-interlay: filter: all: @@ -1480,6 +1479,14 @@ layers: lines: color: purple width: 2.5px + tunnel: + filter: {is_tunnel: true, $zoom: {min: 13} } + draw: + lines: + # color: [[16, [0.843,0.843,0.843]]] + color: purple +# outline: +# color: [[13, [0.890,0.890,0.890]], [14, [0.870,0.870,0.870]], [16, [0.824,0.753,0.741]]] z-shields: filter: { hgv_restriction_shield_text: true } draw: From f591907cbf414cab6beb4538295b53b92ff1705c Mon Sep 17 00:00:00 2001 From: Brett Camper Date: Sun, 4 Aug 2019 00:58:24 -0400 Subject: [PATCH 17/28] pull POV feature kind logic into separate global function --- bubble-wrap-style.yaml | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/bubble-wrap-style.yaml b/bubble-wrap-style.yaml index d803b56..860cddc 100644 --- a/bubble-wrap-style.yaml +++ b/bubble-wrap-style.yaml @@ -14,10 +14,14 @@ global: #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 && feature['kind:'+global.ux_point_of_view]) || (global.ux_point_of_view_fallback && feature['kind:'+global.ux_point_of_view_fallback]) || feature.kind; + var kind = global.ux_point_of_view_kind(feature); switch( kind ) { case( 'country' ): case( 'indefinite' ): @@ -29,7 +33,7 @@ global: 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 && feature['kind:'+global.ux_point_of_view]) || (global.ux_point_of_view_fallback && feature['kind:'+global.ux_point_of_view_fallback]) || feature.kind; + var kind = global.ux_point_of_view_kind(feature); switch( kind ) { case( 'disputed' ): case( 'indeterminate' ): @@ -48,7 +52,7 @@ global: 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 && feature['kind:'+global.ux_point_of_view]) || (global.ux_point_of_view_fallback && feature['kind:'+global.ux_point_of_view_fallback]) || feature.kind; + var kind = global.ux_point_of_view_kind(feature); switch( kind ) { case( 'disputed' ): case( 'line_of_control' ): @@ -64,7 +68,7 @@ global: 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 && feature['kind:'+global.ux_point_of_view]) || (global.ux_point_of_view_fallback && feature['kind:'+global.ux_point_of_view_fallback]) || feature.kind; + var kind = global.ux_point_of_view_kind(feature); switch( kind ) { case( 'unrecognized' ): return true; From 91f3b8f294d41bb124942474bf935b6a002b9a6b Mon Sep 17 00:00:00 2001 From: Brett Camper Date: Sun, 4 Aug 2019 01:18:49 -0400 Subject: [PATCH 18/28] pull collision rank logic into separate global function --- bubble-wrap-style.yaml | 28 ++++++++++++---------------- 1 file changed, 12 insertions(+), 16 deletions(-) diff --git a/bubble-wrap-style.yaml b/bubble-wrap-style.yaml index 860cddc..6562d9e 100644 --- a/bubble-wrap-style.yaml +++ b/bubble-wrap-style.yaml @@ -489,6 +489,10 @@ global: sdk_building_extrude: true # building extrusion toggle building_extrude_height: | # building extrude height logic function() { return feature.height || 20; } + collision_priority: | # label collision priority logic + function(feature, default_priority) { + return (feature['min_zoom'] + (1 - 1 / feature['collision_rank']) * 0.1) || default_priority; + } textures: building-grid: @@ -1435,8 +1439,7 @@ layers: text-blend-order: text_source: global.ux_language_text_source visible: false # labels are enabled by each layer below - priority: | - function() { return (feature['min_zoom'] + (1 - 1 / feature['collision_rank']) * 0.1) || 65; } + priority: function() { return global.collision_priority(feature, 65); } font: family: global.text_font_family weight: normal @@ -2353,8 +2356,7 @@ layers: } sprite_default: generic_shield_5char size: [[7,[75%,75%]],[12,[100%,100%]],[15,[110%,110%]]] - priority: | - function() { return (feature['min_zoom'] + (1 - 1 / feature['collision_rank']) * 0.1) || 58; } + priority: function() { return global.collision_priority(feature, 58); } # Size is specified below, and limited to 5 char in another filter repeat_group: shields repeat_distance: [[8,90px],[10,40px],[13,30px]] @@ -3302,8 +3304,7 @@ layers: filter: { name: true, $zoom: { min: 8 } } draw: text-blend-order: - priority: | - function() { return (feature['min_zoom'] + (1 - 1 / feature['collision_rank']) * 0.1) || 65; } + priority: function() { return global.collision_priority(feature, 65); } visible: global.text_visible_admin text_source: global.ux_language_text_source_boundary_lines_left_right offset: [0px, 5px] @@ -3397,8 +3398,7 @@ layers: filter: { name: true, $zoom: { min: 8 } } draw: text-blend-order: - priority: | - function() { return (feature['min_zoom'] + (1 - 1 / feature['collision_rank']) * 0.1) || 65; } + priority: function() { return global.collision_priority(feature, 65); } visible: global.text_visible_admin text_source: global.ux_language_text_source_boundary_lines_left_right offset: [0px, 5px] @@ -3443,8 +3443,7 @@ layers: draw: mapzen_icon_library: visible: false - priority: | - function() { return (feature['min_zoom'] + (1 - 1 / feature['collision_rank']) * 0.1) || 65; } + priority: function() { return global.collision_priority(feature, 65); } text: text_source: global.ux_language_text_source visible: false # labels are enabled by each layer below @@ -3457,8 +3456,7 @@ layers: text_source: global.ux_language_text_source visible: false # labels are enabled by each layer below buffer: 3px - priority: | - function() { return (feature['min_zoom'] + (1 - 1 / feature['collision_rank']) * 0.1) || 65; } + priority: function() { return global.collision_priority(feature, 65); } font: family: Varela fill: global.text_fill @@ -4122,8 +4120,7 @@ layers: sprite: function() { return feature.kind; } sprite_default: generic interactive: global.sdk_interactive - priority: | - function() { return (feature['min_zoom'] + (1 - 1 / feature['collision_rank']) * 0.1) || 65; } + priority: function() { return global.collision_priority(feature, 65); } repeat_group: abc buffer: 3px text: @@ -5309,8 +5306,7 @@ layers: - ref: true draw: mapzen_icon_library: - priority: | - function() { return (feature['min_zoom'] + (1 - 1 / feature['collision_rank']) * 0.1) || 20; } + priority: function() { return global.collision_priority(feature, 20); } # you need to match any custom shield to the vector tile `network` values sprite: function() { return ('sdk_shield-' + feature.ref.length + 'char'); } sprite_default: sdk_shield_5char From d7defa5ef35a5bd1dae1e9d3a79da5b602715337 Mon Sep 17 00:00:00 2001 From: "Nathaniel V. KELSO" Date: Wed, 7 Aug 2019 22:31:47 -0700 Subject: [PATCH 19/28] fix comment about POV --- index.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/index.html b/index.html index 3e1949f..4a3e3fa 100755 --- a/index.html +++ b/index.html @@ -431,7 +431,7 @@ 'United States': 'us', 'Vietnam': 'vn' }; - // use query language, else default to English + // use query POV, else default to defacto + most the disputed lines gui.pov = query.pov || false; gui.add(gui, 'pov', pov).onChange(function(value) { scene.config.global.ux_point_of_view = value; From 68bc27fb5a5056d7ed7b63d3b7660477fc4c135a Mon Sep 17 00:00:00 2001 From: "Nathaniel V. KELSO" Date: Wed, 7 Aug 2019 22:38:46 -0700 Subject: [PATCH 20/28] remove superfilous visible: true --- bubble-wrap-style.yaml | 1 - 1 file changed, 1 deletion(-) diff --git a/bubble-wrap-style.yaml b/bubble-wrap-style.yaml index 6562d9e..32f57d7 100644 --- a/bubble-wrap-style.yaml +++ b/bubble-wrap-style.yaml @@ -1469,7 +1469,6 @@ layers: - function() { return global.sdk_hgv_overlay; } draw: lines: - visible: true color: blue width: 1.7px z-none: From 92afcabb466831752f87ca73d17668dd5b57df8f Mon Sep 17 00:00:00 2001 From: "Nathaniel V. KELSO" Date: Thu, 8 Aug 2019 00:32:57 -0700 Subject: [PATCH 21/28] rework new collision_priority function; add custom for roads and transit --- bubble-wrap-style.yaml | 179 +++++++++++++++++++++++++++++++++-------- 1 file changed, 144 insertions(+), 35 deletions(-) diff --git a/bubble-wrap-style.yaml b/bubble-wrap-style.yaml index 32f57d7..7db812c 100644 --- a/bubble-wrap-style.yaml +++ b/bubble-wrap-style.yaml @@ -490,8 +490,20 @@ global: building_extrude_height: | # building extrude height logic function() { return feature.height || 20; } collision_priority: | # label collision priority logic + function() { + return (feature['min_zoom'] + (1 - 1 / feature['collision_rank']) * 0.1) || (feature['min_zoom'] + 0.9999); + } + collision_priority_roads: | # show labels later in the lines + function() { + return (feature['min_zoom'] + (6 - 1 / feature['collision_rank']) * 0.1) || (feature['min_zoom'] + 5.9999); + } + collision_priority_transit_pois: | # show labels earlier than normal function(feature, default_priority) { - return (feature['min_zoom'] + (1 - 1 / feature['collision_rank']) * 0.1) || default_priority; + return (feature['min_zoom'] - 3 + + (1 - 1 / ( default_priority + + (feature['tile_kind_rank'] || 100 ) * 0.1 + + feature['collision_rank'] * 0.01) * 0.1 )) + || (feature['min_zoom'] + 0.9999); } textures: @@ -1439,7 +1451,7 @@ layers: text-blend-order: text_source: global.ux_language_text_source visible: false # labels are enabled by each layer below - priority: function() { return global.collision_priority(feature, 65); } + priority: global.collision_priority_roads font: family: global.text_font_family weight: normal @@ -2355,7 +2367,7 @@ layers: } sprite_default: generic_shield_5char size: [[7,[75%,75%]],[12,[100%,100%]],[15,[110%,110%]]] - priority: function() { return global.collision_priority(feature, 58); } + priority: global.collision_priority # Size is specified below, and limited to 5 char in another filter repeat_group: shields repeat_distance: [[8,90px],[10,40px],[13,30px]] @@ -3303,7 +3315,7 @@ layers: filter: { name: true, $zoom: { min: 8 } } draw: text-blend-order: - priority: function() { return global.collision_priority(feature, 65); } + priority: global.collision_priority visible: global.text_visible_admin text_source: global.ux_language_text_source_boundary_lines_left_right offset: [0px, 5px] @@ -3397,7 +3409,7 @@ layers: filter: { name: true, $zoom: { min: 8 } } draw: text-blend-order: - priority: function() { return global.collision_priority(feature, 65); } + priority: global.collision_priority visible: global.text_visible_admin text_source: global.ux_language_text_source_boundary_lines_left_right offset: [0px, 5px] @@ -3442,7 +3454,7 @@ layers: draw: mapzen_icon_library: visible: false - priority: function() { return global.collision_priority(feature, 65); } + priority: global.collision_priority text: text_source: global.ux_language_text_source visible: false # labels are enabled by each layer below @@ -3455,7 +3467,7 @@ layers: text_source: global.ux_language_text_source visible: false # labels are enabled by each layer below buffer: 3px - priority: function() { return global.collision_priority(feature, 65); } + priority: global.collision_priority font: family: Varela fill: global.text_fill @@ -4119,7 +4131,7 @@ layers: sprite: function() { return feature.kind; } sprite_default: generic interactive: global.sdk_interactive - priority: function() { return global.collision_priority(feature, 65); } + priority: global.collision_priority repeat_group: abc buffer: 3px text: @@ -5305,7 +5317,7 @@ layers: - ref: true draw: mapzen_icon_library: - priority: function() { return global.collision_priority(feature, 20); } + priority: 10.5 # you need to match any custom shield to the vector tile `network` values sprite: function() { return ('sdk_shield-' + feature.ref.length + 'char'); } sprite_default: sdk_shield_5char @@ -5391,20 +5403,118 @@ layers: style: italic stroke: { color: white, width: 3px } -# transit-bus-roads: -# data: { source: mapzen, layer: roads } -# filter: { is_bus_route: true } -# draw: -# lines: -# visible: global.sdk_transit_overlay -# interactive: false -# color: [[13,[0,0,1,0.5]],[15,blue]] -# width: [[11,0.5px],[12,0.8px],[16,1.25px],[18,1m]] -# # let roads sort themselves past zoom 14 -# order: 488 -# # but give them all the same outline -# outline: -# order: 487 + transit-bus-roads: + data: { source: mapzen, layer: roads } + filter: { is_bus_route: true } + draw: + lines: + visible: global.sdk_transit_overlay + interactive: false + color: [[13,[0,0,0.5,0.25]],[15,[0,0,0.5,0.8]]] + width: [[11,0.5px],[12,0.8px],[16,1.5px],[18,1.5m]] + # let roads sort themselves past zoom 14 + order: 488 + # but give them all the same outline + outline: + order: 487 + + labels-bus-lines: + filter: + all: + - function() { return global.sdk_transit_overlay; } + - all: + - $zoom: { min: 18 } + - bus_shield_text: true + draw: + mapzen_icon_library: + priority: 10.8 + # you need to match any custom shield to the vector tile `network` values + sprite: function() { return ('sdk_shield-' + feature.bus_shield_text.length + 'char'); } + sprite_default: sdk_shield_5char + color: [0,0,0.5,0.8] + # Size is specified below, and limited to 5 char in another filter + repeat_group: shields + repeat_distance: [[8,90px],[10,40px],[13,30px]] + placement: midpoint + placement_min_length_ratio: + - [8, 0.1] + - [9, 0.25] + - [10, 0.25] + - [11, 0.15] + - [12, 1] + - [13, 1.50] + - [14, 2.0] +# visible: false + text: + offset: [0px, -0.5px] + repeat_distance: 200px + anchor: center + text_source: function() { if( feature.bus_shield_text.length < 6 ) { return feature.bus_shield_text; } else { return ''; } } + font: + family: Montserrat + fill: white + weight: 700 + size: [[7,7px],[12,8px],[16,11px]] + stroke: { width: 0px } + + width_1char: + filter: function() { return (feature.bus_shield_text.length === 1); } + draw: + mapzen_icon_library: + size: [[6,[16px,16px]],[13,[18px,18px]],[16,[21px,21px]]] + width_2char: + filter: function() { return (feature.bus_shield_text.length === 2); } + draw: + mapzen_icon_library: + size: [[6,[21px,16px]],[13,[24px,18px]],[16,[28px,21px]]] + width_3char: + filter: function() { return (feature.bus_shield_text.length === 3); } + draw: + mapzen_icon_library: + size: [[6,[27px,16px]],[13,[31px,18px]],[16,[36px,21px]]] + width_4char: + filter: function() { return (feature.bus_shield_text.length === 4); } + draw: + mapzen_icon_library: + size: [[6,[32px,16px]],[13,[36px,18px]],[16,[41px,21px]]] + # London sucks + early: + filter: { $zoom: { max: 14 } } + draw: + mapzen_icon_library: + visible: false + width_5char: + filter: function() { return (feature.bus_shield_text.length === 5); } + draw: + mapzen_icon_library: + size: [[6,[37px,16px]],[13,[41px,18px]],[16,[48px,21px]]] + # London sucks + early: + filter: { $zoom: { max: 14 } } + draw: + mapzen_icon_library: + visible: false + # this is kinda a hack + width_longggggg: + filter: function() { return (feature.bus_shield_text.length > 5); } + draw: + mapzen_icon_library: + visible: false + + z19-show-operator-name: + filter: + all: + - function() { return global.sdk_transit_overlay; } + - $zoom: { min: 19 } + draw: + text: + text_source: function() { return (feature.bus_network); } + priority: 10.99 + font: + fill: [0,0,0.5,0.8] + style: italic + size: 14px + stroke: { color: white, width: 3px } transit-overlay-station-labels: data: { source: mapzen, layer: pois } @@ -5412,7 +5522,6 @@ layers: kind: [station, tram_stop, bus_station, subway_entrance, halt, stop, platform, bus_stop, stop_position ] any: - area: false - all: - area: true all: - $geometry: point @@ -5422,13 +5531,13 @@ layers: visible: global.sdk_transit_overlay size: [[13, 12px], [16, 16px], [19, 20px]] interactive: global.sdk_interactive - priority: 15 + priority: function() { return global.collision_priority_transit_pois(feature, 15); } text: buffer: 4px #anchor: bottom #offset: [[13, [0, 6px]], [16, [0, 8px]], [19, [0, 10px]]] # offset tracks alongside icon size (half icon height) interactive: global.sdk_interactive - priority: 16 + #priority: 10.16 font: fill: black weight: normal @@ -5452,10 +5561,10 @@ layers: mapzen_icon_library: sprite: train_station size: [[13, '65%'], [16, '100%']] - priority: 11 - text: + priority: function() { return global.collision_priority_transit_pois(feature, 11); } + #text: #offset: [[13, [0, 6px]], [14, [0, 7px]],[15, [0, 8px]], [17, [0, 10px]]] - priority: 12 + #priority: 10.12 low-priority-early: filter: { kind_tile_rank: { min: 3 }, $zoom: { min: 0, max: 12 } } draw: @@ -5490,8 +5599,8 @@ layers: mapzen_icon_library: size: [[12, '40%'], [15, '50%']] #visible: false - text: - visible: false + #text: +# visible: false late: filter: { $zoom: { min: 16 } } draw: @@ -5563,10 +5672,10 @@ layers: mapzen_icon_library: size: [[13, 12px], [16, 18px]] sprite: bus_station - priority: 17 + priority: function() { return global.collision_priority_transit_pois(feature, 17); } text: interactive: global.sdk_interactive - priority: 18 + #priority: 10.18 font: fill: black size: 12px @@ -5587,10 +5696,10 @@ layers: mapzen_icon_library: sprite: subway_entrance size: [[17, 12px], [19, 14px]] - priority: 19 + priority: function() { return global.collision_priority_transit_pois(feature, 19); } text: #offset: [[17, [0, 6px]], [19, [0, 7px]]] # offset tracks alongside icon size (half icon height) - priority: 20 + #priority: 10.20 interactive: global.sdk_interactive 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"; } } font: From 7f90c161adf5cc8ae2167e842cd20e23ae1385c2 Mon Sep 17 00:00:00 2001 From: "Nathaniel V. KELSO" Date: Thu, 8 Aug 2019 00:35:15 -0700 Subject: [PATCH 22/28] pesky zoom 14 labels --- bubble-wrap-style.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/bubble-wrap-style.yaml b/bubble-wrap-style.yaml index 7db812c..7485047 100644 --- a/bubble-wrap-style.yaml +++ b/bubble-wrap-style.yaml @@ -5599,8 +5599,8 @@ layers: mapzen_icon_library: size: [[12, '40%'], [15, '50%']] #visible: false - #text: -# visible: false + text: + visible: false late: filter: { $zoom: { min: 16 } } draw: From c71f7b2cc391e2429d8e8d5a1dd79215b58064b9 Mon Sep 17 00:00:00 2001 From: "Nathaniel V. KELSO" Date: Thu, 8 Aug 2019 00:41:57 -0700 Subject: [PATCH 23/28] add collision for water --- bubble-wrap-style.yaml | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/bubble-wrap-style.yaml b/bubble-wrap-style.yaml index 7485047..d15bc9d 100644 --- a/bubble-wrap-style.yaml +++ b/bubble-wrap-style.yaml @@ -497,6 +497,10 @@ global: function() { return (feature['min_zoom'] + (6 - 1 / feature['collision_rank']) * 0.1) || (feature['min_zoom'] + 5.9999); } + collision_priority_water: | # show labels later in the lines and polys + function() { + return (feature['min_zoom'] + (3 - 1 / feature['collision_rank']) * 0.1) || (feature['min_zoom'] + 2.9999); + } collision_priority_transit_pois: | # show labels earlier than normal function(feature, default_priority) { return (feature['min_zoom'] - 3 + @@ -1247,6 +1251,7 @@ layers: $zoom: { min: 14 } draw: text-blend-order: + priority: global.collision_priority_water text_source: global.ux_language_text_source font: fill: [0.314,0.591,0.640] @@ -1283,6 +1288,7 @@ layers: default-label-text: draw: text-blend-order: + priority: global.collision_priority_water text_source: global.ux_language_text_source text_wrap: 8 font: @@ -1298,6 +1304,7 @@ layers: draw: text-blend-order: text_source: global.ux_language_text_source + priority: global.collision_priority_water font: fill: [0.314,0.591,0.640] #global.text_fill_water family: global.text_font_family @@ -1348,6 +1355,7 @@ layers: - area: true draw: text-blend-order: + priority: global.collision_priority_water text_source: global.ux_language_text_source font: fill: grey From 8fdfe3be79e87e5bb48e355a7f30c19c5ba14a3d Mon Sep 17 00:00:00 2001 From: Brett Camper Date: Thu, 8 Aug 2019 22:22:46 -0400 Subject: [PATCH 24/28] collision priority needs to check for null (otherwise it'll divide by null rather than falling back to the desired value) --- bubble-wrap-style.yaml | 26 ++++++++++++++++++-------- 1 file changed, 18 insertions(+), 8 deletions(-) diff --git a/bubble-wrap-style.yaml b/bubble-wrap-style.yaml index d15bc9d..9a22df6 100644 --- a/bubble-wrap-style.yaml +++ b/bubble-wrap-style.yaml @@ -491,23 +491,33 @@ global: function() { return feature.height || 20; } collision_priority: | # label collision priority logic function() { - return (feature['min_zoom'] + (1 - 1 / feature['collision_rank']) * 0.1) || (feature['min_zoom'] + 0.9999); + if (feature['collision_rank'] != null) { + return feature['min_zoom'] + (1 - 1 / feature['collision_rank']) * 0.1; + } + return feature['min_zoom'] + 0.9999; } collision_priority_roads: | # show labels later in the lines function() { - return (feature['min_zoom'] + (6 - 1 / feature['collision_rank']) * 0.1) || (feature['min_zoom'] + 5.9999); + if (feature['collision_rank'] != null) { + return feature['min_zoom'] + (6 - 1 / feature['collision_rank']) * 0.1; + } + return feature['min_zoom'] + 5.9999; } collision_priority_water: | # show labels later in the lines and polys function() { - return (feature['min_zoom'] + (3 - 1 / feature['collision_rank']) * 0.1) || (feature['min_zoom'] + 2.9999); + if (feature['collision_rank'] != null) { + return feature['min_zoom'] + (3 - 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) { - return (feature['min_zoom'] - 3 + - (1 - 1 / ( default_priority + - (feature['tile_kind_rank'] || 100 ) * 0.1 + - feature['collision_rank'] * 0.01) * 0.1 )) - || (feature['min_zoom'] + 0.9999); + if (feature['collision_rank'] != null) { + 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: From 1da2c657047b2b9d6ba99306a5fa0ee6010f466e Mon Sep 17 00:00:00 2001 From: "Nathaniel V. KELSO" Date: Fri, 9 Aug 2019 12:33:52 -0700 Subject: [PATCH 25/28] update comment per PR review --- bubble-wrap-style.yaml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/bubble-wrap-style.yaml b/bubble-wrap-style.yaml index 9a22df6..ec96a70 100644 --- a/bubble-wrap-style.yaml +++ b/bubble-wrap-style.yaml @@ -1639,7 +1639,6 @@ layers: width: [[9, 0px], [11, 0.5px], [13, 1px], [14, 1px], [15, 0.15px], [16, 3px], [17, 4m], [18, 5m]] cap: butt outline: -# order: 355 color: [[10, global.highway_casing1], [16, [0.988,0.495,0.439]], [17, [0.988,0.495,0.439]]] width: [[14, 0px], [15, 0.85px], [17, 1.125px], [18, 1.5px]] early: @@ -3026,7 +3025,7 @@ layers: #filter: { $zoom: {min: 12} } draw: lines: - # let roads sort themselves past zoom 14 + # Use server sort order which varies by kind, kind_detail, and zoom order: global.feature_order # but give them all the same outline outline: From 930a049bc25e74953cfdf0e9bf4ca5d04dd8ea94 Mon Sep 17 00:00:00 2001 From: "Nathaniel V. KELSO" Date: Fri, 9 Aug 2019 12:39:38 -0700 Subject: [PATCH 26/28] remove janky layer --- bubble-wrap-style.yaml | 7 ------- 1 file changed, 7 deletions(-) diff --git a/bubble-wrap-style.yaml b/bubble-wrap-style.yaml index ec96a70..031ddf7 100644 --- a/bubble-wrap-style.yaml +++ b/bubble-wrap-style.yaml @@ -1501,13 +1501,6 @@ layers: lines: color: blue width: 1.7px - z-none: - filter: - - hgv_restriction: true - draw: - lines: - color: red - width: 2.5px z-restricted: filter: - hgv_restriction: true From eafad2608ad9a4ba8510daabd71556d99c504928 Mon Sep 17 00:00:00 2001 From: "Nathaniel V. KELSO" Date: Fri, 9 Aug 2019 14:11:30 -0700 Subject: [PATCH 27/28] fix collision_priority (was reversed); address PR comment; emphasize largest transit stations --- bubble-wrap-style.yaml | 64 ++++++++++++++++++++++++++++++++++-------- 1 file changed, 52 insertions(+), 12 deletions(-) diff --git a/bubble-wrap-style.yaml b/bubble-wrap-style.yaml index 031ddf7..c030334 100644 --- a/bubble-wrap-style.yaml +++ b/bubble-wrap-style.yaml @@ -489,30 +489,53 @@ global: 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) { - return feature['min_zoom'] + (1 - 1 / feature['collision_rank']) * 0.1; + 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) { - return feature['min_zoom'] + (6 - 1 / feature['collision_rank']) * 0.1; + // 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'] + 5.9999; + 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 / feature['collision_rank']) * 0.1; + 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); @@ -1927,6 +1950,14 @@ layers: text-blend-order: text_source: global.ux_language_text_source_road_ref_and_name_short visible: global.text_visible_secondary + font: + size: 10px + labels-secondary-z11: + filter: + $zoom: [11] + draw: + text-blend-order: + visible: false labels-secondary-z13: filter: $zoom: [13] @@ -2377,7 +2408,7 @@ layers: } sprite_default: generic_shield_5char size: [[7,[75%,75%]],[12,[100%,100%]],[15,[110%,110%]]] - priority: global.collision_priority + priority: global.collision_priority_road_shields # Size is specified below, and limited to 5 char in another filter repeat_group: shields repeat_distance: [[8,90px],[10,40px],[13,30px]] @@ -3474,10 +3505,10 @@ layers: fill: global.text_fill # NOTE: This is a hack for localities because of an icon & text bug, see note below text-blend-order: + priority: global.collision_priority text_source: global.ux_language_text_source visible: false # labels are enabled by each layer below buffer: 3px - priority: global.collision_priority font: family: Varela fill: global.text_fill @@ -5528,14 +5559,9 @@ layers: transit-overlay-station-labels: data: { source: mapzen, layer: pois } + enabled: global.sdk_transit_overlay filter: kind: [station, tram_stop, bus_station, subway_entrance, halt, stop, platform, bus_stop, stop_position ] - any: - - area: false - - area: true - all: - - $geometry: point - - kind: true draw: mapzen_icon_library: visible: global.sdk_transit_overlay @@ -5619,6 +5645,20 @@ layers: font: weight: 600 size: 12px + + # highlight the important stations otherwise they get lost + # when all the minor station labels get bigger + high-priority-late-z15: + filter: { kind_tile_rank: { max: 8 }, $zoom: { min: 15 } } + draw: + mapzen_icon_library: + size: [[15, '110%'],[17, '150%'],[18, '200%']] + text: + font: + weight: 600 + size: [[15,14px],[17,16px],[18,16px]] + + subway-early: filter: { is_subway: true, is_train: false, $zoom: { max: 12 } } draw: From 588bc1da6cf92979bfe39dfa017b0fd4a219d02b Mon Sep 17 00:00:00 2001 From: "Nathaniel V. KELSO" Date: Fri, 9 Aug 2019 14:47:37 -0700 Subject: [PATCH 28/28] few other PR comments from Brett --- bubble-wrap-style.yaml | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/bubble-wrap-style.yaml b/bubble-wrap-style.yaml index c030334..680c3cf 100644 --- a/bubble-wrap-style.yaml +++ b/bubble-wrap-style.yaml @@ -1270,7 +1270,7 @@ layers: join: round outline: color: [[12,[0.671,0.788,0.812]],[14,[0.710,0.800,0.824]],[15,[0.635,0.812,0.843]]] - width: [[9,0px],[11,0px],[13,0px],[14,0.5px],[15,0.75px],[16,0.75px],[17,1px]] + width: [[13,0px],[14,0.5px],[15,0.75px],[16,0.75px],[17,1px]] water-labels: filter: @@ -1565,7 +1565,6 @@ layers: - [12, 1] - [13, 1.50] - [14, 2.0] - #cull_from_tile: true visible: true text: repeat_distance: 200px @@ -2448,7 +2447,6 @@ layers: - kind_detail: motorway draw: mapzen_icon_library: - #color: yellow visible: global.sdk_road_shields early: filter: @@ -2463,7 +2461,6 @@ layers: - kind_detail: trunk draw: mapzen_icon_library: - #color: red visible: global.sdk_road_shields early: filter: @@ -2478,7 +2475,6 @@ layers: - kind_detail: primary draw: mapzen_icon_library: - #color: aqua visible: global.sdk_road_shields early: filter: @@ -4219,7 +4215,7 @@ layers: filter: { kind: generator } draw: mapzen_icon_library: - sprite: function() { return 'generator_' & feature.kind_detail; } + sprite: function() { return 'generator_' + feature.kind_detail; } sprite_default: generator # TODO: some or all of this may be unnecessary for the sprite, but is necessary for the early filter @@ -4328,7 +4324,7 @@ layers: draw: mapzen_icon_library: visible: false - text: + text-blend-order: text_wrap: 10 visible: true font: