diff --git a/bubble-wrap-style.yaml b/bubble-wrap-style.yaml index c489b4b..680c3cf 100644 --- a/bubble-wrap-style.yaml +++ b/bubble-wrap-style.yaml @@ -12,8 +12,90 @@ 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: | + function(feature) { return (global.ux_point_of_view && feature['kind:'+global.ux_point_of_view]) || (global.ux_point_of_view_fallback && feature['kind:'+global.ux_point_of_view_fallback]) || feature.kind } + + ux_point_of_view_kind_filter_country: | + function() { + // if a ux_point_of_view has been defined use that, else fallback POV, else use the feature's default kind + var kind = global.ux_point_of_view_kind(feature); + switch( kind ) { + case( 'country' ): + case( 'indefinite' ): + return true; + default: + return false; + } + } + ux_point_of_view_kind_filter_disputed_etc: | + function() { + // if a ux_point_of_view has been defined use that, else fallback POV, else use the feature's default kind + var kind = global.ux_point_of_view_kind(feature); + switch( kind ) { + case( 'disputed' ): + case( 'indeterminate' ): + case( 'lease_limit' ): + case( 'line_of_control' ): + case( 'overlay_limit' ): + case( 'disputed_breakaway' ): + case( 'disputed_claim' ): + case( 'disputed_elusive' ): + case( 'disputed_reference_line' ): + return true; + default: + return false; + } + } + ux_point_of_view_kind_filter_disputed_star: | + function() { + // if a ux_point_of_view has been defined use that, else fallback POV, else use the feature's default kind + var kind = global.ux_point_of_view_kind(feature); + switch( kind ) { + case( 'disputed' ): + case( 'line_of_control' ): + case( 'disputed_breakaway' ): + case( 'disputed_claim' ): + case( 'disputed_elusive' ): + case( 'disputed_reference_line' ): + return true; + default: + return false; + } + } + ux_point_of_view_kind_filter_unrecognized: | + function() { + // if a ux_point_of_view has been defined use that, else fallback POV, else use the feature's default kind + var kind = global.ux_point_of_view_kind(feature); + switch( kind ) { + case( 'unrecognized' ): + return true; + case( 'unrecognized_country' ): + return true; + case( 'unrecognized_region' ): + return true; + default: + return false; + } + } + ux_point_of_view_kind_filter_country_capital: | + function() { + // if a ux_point_of_view has been defined use that, else fallback POV, else use the feature's default country capital boolean + if (global.ux_point_of_view && feature['country_capital:'+global.ux_point_of_view] != null) { + return feature['country_capital:'+global.ux_point_of_view]; + } + else if (global.ux_point_of_view_fallback && feature['country_capital:'+global.ux_point_of_view_fallback] != null) { + return feature['country_capital:'+global.ux_point_of_view_fallback]; + } + else { + return feature.country_capital; + } + } + + ux_language: false # 2-char l10n language code (generally) + ux_language_fallback: false # 2-char l10n language code (generally) ux_language_text_source: | function() { // if a ux_langauge has been defined use that, else if there is feature name in the fallback_ux_language then use that, else use the feature's default name in the local language @@ -137,6 +219,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']; @@ -208,6 +295,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 @@ -310,6 +407,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 +429,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 @@ -392,6 +490,59 @@ global: building_extrude_height: | # building extrude height logic function() { return feature.height || 20; } + # TODO: Some of this should optimized server side by dropping names and shield_text + # in a similar way (and even changing min_zoom). We'd still need the + # collision_priority function here, though. + + collision_priority: | # label collision priority logic + function() { + if (feature['collision_rank'] != null) { + if (feature['name'] != null) { + return feature['min_zoom'] + (1 - 1 / feature['collision_rank']) * 0.1; + } + // TODO: This should be moved server side. See the peak and + // park icons in Alta Plaza Park in San Francisco CA + return feature['min_zoom'] + 2 + (1 - 1 / feature['collision_rank']) * 0.1; + } + return feature['min_zoom'] + 0.9999; + } + collision_priority_road_shields: | # show labels later in the lines + function() { + if (feature['collision_rank'] != null) { + // We want to effectively adjust the min_zoom for the shields separate + // from their line/polygon visibility by giving them a WORSE collision + // than POIs, but still better than general road text labels + return feature['min_zoom'] + 5 + (1 - 1 / feature['collision_rank']) * 0.1; + } + return feature['min_zoom'] + 4.9999; + } + collision_priority_roads: | # show labels later in the lines + function() { + if (feature['collision_rank'] != null) { + // We want to effectively adjust the min_zoom for the labels separate + // from their line/polygon visibility by giving them a WORSE collision + return feature['min_zoom'] + 8 + (1 - 1 / feature['collision_rank']) * 0.1; + } + return feature['min_zoom'] + 7.9999; + } + collision_priority_water: | # show labels later in the lines and polys + function() { + if (feature['collision_rank'] != null) { + return feature['min_zoom'] + 3 + (1 - 1 / feature['collision_rank']) * 0.1; + } + return feature['min_zoom'] + 2.9999; + } + collision_priority_transit_pois: | # show labels earlier than normal + function(feature, default_priority) { + if (feature['collision_rank'] != null) { + // We want to give transit POIs (for the overlay) a BETTER collision + return feature['min_zoom'] - 3 + + (1 - 1 / (default_priority + + (feature['tile_kind_rank'] || 100) * 0.1 + feature['collision_rank'] * 0.01) * 0.1); + } + return feature['min_zoom'] + 0.9999; + } + textures: building-grid: url: images/building-grid.gif @@ -439,6 +590,7 @@ 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://xyz.api.here.com/tiles/herebase.02/{z}/{x}/{y}/omv url_params: api_key: global.sdk_api_key tile_size: 512 @@ -1032,34 +1184,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 +1254,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: [[13,0px],[14,0.5px],[15,0.75px],[16,0.75px],[17,1px]] water-labels: filter: @@ -1143,6 +1284,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] @@ -1175,39 +1317,19 @@ 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: + priority: global.collision_priority_water 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: @@ -1215,6 +1337,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 @@ -1263,22 +1386,9 @@ 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: + priority: global.collision_priority_water text_source: global.ux_language_text_source font: fill: grey @@ -1382,11 +1492,101 @@ layers: text-blend-order: text_source: global.ux_language_text_source visible: false # labels are enabled by each layer below + priority: global.collision_priority_roads 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 + + hgv-interlay: + filter: + all: + - hgv: true + - function() { return global.sdk_hgv_overlay; } + draw: + lines: + color: blue + width: 1.7px + z-restricted: + filter: + - hgv_restriction: true + draw: + 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: + 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] + 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! filter: { oneway: yes, shield_text: false, not: { kind: rail }, $zoom: { min: 17 } } @@ -1454,7 +1654,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: @@ -1493,19 +1692,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] @@ -1584,8 +1779,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 @@ -1595,8 +1788,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 @@ -1605,7 +1796,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: @@ -1704,7 +1894,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] } @@ -1760,12 +1949,19 @@ 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] 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: @@ -1776,7 +1972,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: @@ -1787,7 +1982,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: @@ -1887,7 +2081,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] @@ -1897,7 +2090,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] @@ -1907,7 +2099,6 @@ layers: filter: { $zoom: [15] } draw: text-blend-order: - priority: 57 visible: global.text_visible_tertiary font: fill: [0.3,0.3,0.3] @@ -1917,7 +2108,6 @@ layers: filter: { $zoom: [16] } draw: text-blend-order: - priority: 57 visible: global.text_visible_tertiary font: fill: [0.3,0.3,0.3] @@ -1927,7 +2117,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] @@ -1937,7 +2126,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] @@ -2046,7 +2234,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: @@ -2057,7 +2244,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: @@ -2068,7 +2254,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: @@ -2079,7 +2264,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: @@ -2169,7 +2353,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: @@ -2181,7 +2364,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: @@ -2225,7 +2407,7 @@ layers: } sprite_default: generic_shield_5char size: [[7,[75%,75%]],[12,[100%,100%]],[15,[110%,110%]]] - priority: 58 + 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]] @@ -2265,8 +2447,6 @@ layers: - kind_detail: motorway draw: mapzen_icon_library: - priority: 47 - #color: yellow visible: global.sdk_road_shields early: filter: @@ -2281,8 +2461,6 @@ layers: - kind_detail: trunk draw: mapzen_icon_library: - priority: 48 - #color: red visible: global.sdk_road_shields early: filter: @@ -2297,8 +2475,6 @@ layers: - kind_detail: primary draw: mapzen_icon_library: - priority: 49 - #color: aqua visible: global.sdk_road_shields early: filter: @@ -2313,8 +2489,6 @@ layers: - kind_detail: secondary draw: mapzen_icon_library: - priority: 53 - #color: blue visible: global.sdk_road_shields early: filter: @@ -2329,8 +2503,6 @@ layers: - kind_detail: tertiary draw: mapzen_icon_library: - priority: 55 - #color: green visible: global.sdk_road_shields early: filter: @@ -2343,7 +2515,6 @@ layers: - kind: minor_road draw: mapzen_icon_library: - priority: 56 visible: global.sdk_road_shields early: filter: @@ -2389,9 +2560,8 @@ layers: } } draw: - mapzen_icon_library: + mapzen_icon_library: {} # this is sensitive to values > 56 - priority: 56 early: filter: { $zoom: { max: 12 } } draw: @@ -2407,9 +2577,8 @@ layers: } } draw: - mapzen_icon_library: + mapzen_icon_library: {} # this is sensitive to values > 56 - priority: 56 early: filter: { $zoom: { max: 13 } } draw: @@ -2457,7 +2626,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 @@ -2468,7 +2636,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: @@ -2480,7 +2647,7 @@ layers: path: filter: all: - - kind: [path, portage_way] + - kind: [path, portage_way, construction] not: - kind_detail: [steps, track, pier] draw: @@ -2490,6 +2657,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: @@ -2583,7 +2757,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: @@ -2591,6 +2764,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: @@ -2673,7 +2853,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: @@ -2690,7 +2869,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 @@ -2819,7 +2997,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: @@ -2868,7 +3045,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: @@ -3075,7 +3252,6 @@ layers: draw: text-blend-order: text_source: global.ux_language_text_source - priority: 70 order: 7 font: fill: '#666' @@ -3137,7 +3313,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: @@ -3154,13 +3329,14 @@ 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 + - global.ux_point_of_view_kind_filter_country draw: lines: color: global.country_boundary @@ -3176,7 +3352,7 @@ layers: filter: { name: true, $zoom: { min: 8 } } draw: text-blend-order: - priority: 2 + priority: global.collision_priority visible: global.text_visible_admin text_source: global.ux_language_text_source_boundary_lines_left_right offset: [0px, 5px] @@ -3194,27 +3370,53 @@ 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] } + filter: + global.ux_point_of_view_kind_filter_disputed_etc draw: 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] } + filter: + global.ux_point_of_view_kind_filter_disputed_star draw: 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]] + + 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: @@ -3232,11 +3434,19 @@ 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: global.collision_priority visible: global.text_visible_admin text_source: global.ux_language_text_source_boundary_lines_left_right offset: [0px, 5px] @@ -3254,6 +3464,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 } @@ -3262,6 +3491,7 @@ layers: draw: mapzen_icon_library: visible: false + priority: global.collision_priority text: text_source: global.ux_language_text_source visible: false # labels are enabled by each layer below @@ -3271,6 +3501,7 @@ 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 @@ -3285,7 +3516,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]]] @@ -3295,7 +3525,6 @@ layers: $zoom: [2,3] draw: text-blend-order: - priority: 10 buffer: 10px font: size: 10px @@ -3319,7 +3548,6 @@ layers: draw: text-blend-order: buffer: 10px - priority: 8 font: size: 11px early-ones-z4: @@ -3333,7 +3561,6 @@ layers: $zoom: [5] draw: text-blend-order: - priority: 8 font: size: 13px early-ones-z5: @@ -3349,7 +3576,6 @@ layers: $zoom: [6] draw: text-blend-order: - priority: 8 font: size: 16px small-ones-z6: @@ -3380,7 +3606,6 @@ layers: - population: { max: 5000000 } draw: text-blend-order: - priority: 30 font: size: 12px @@ -3390,7 +3615,6 @@ layers: $zoom: { min: 4, max: 9 } draw: text-blend-order: - priority: 14 visible: false text_source: global.ux_language_text_source_short font: @@ -3473,7 +3697,6 @@ layers: size: [[10,4px],[11,0px]] sprite: townspot-xs-rev buffer: 8px - priority: 30 # debug testing #collide: false text: @@ -3518,22 +3741,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: @@ -3578,24 +3795,22 @@ 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: # 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 population-5m-10m: filter: population: { min: 5000000, max: 10000000 } @@ -3603,24 +3818,22 @@ 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: # 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 population-1m-5m: filter: population: { min: 1000000, max: 5000000 } @@ -3628,24 +3841,22 @@ 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: # 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 population-500k-1m: filter: population: { min: 500000, max: 1000000 } @@ -3653,23 +3864,21 @@ 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: - 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 population-200k-500k: filter: population: { min: 200000, max: 500000 } @@ -3677,23 +3886,21 @@ 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: - 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 population-100k-200k: filter: population: { min: 100000, max: 200000 } @@ -3701,23 +3908,21 @@ 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: - 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 population-50k-100k: filter: population: { min: 50000, max: 100000 } @@ -3725,25 +3930,23 @@ 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]] 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 population-20k-50k: filter: population: { min: 20000, max: 50000 } @@ -3751,25 +3954,23 @@ 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]] 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 population-10k-20k: filter: population: { min: 10000, max: 20000 } @@ -3777,25 +3978,23 @@ 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]] 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 population-5k-10k: filter: population: { min: 5000, max: 10000 } @@ -3803,25 +4002,23 @@ 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]] 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 population-2k-5k: filter: population: { min: 2000, max: 5000 } @@ -3829,25 +4026,23 @@ 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]] 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 population-1k-2k: filter: population: { min: 1000, max: 2000 } @@ -3855,25 +4050,23 @@ 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]] 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 population-200-1k: filter: population: { min: 200, max: 1000 } @@ -3881,25 +4074,23 @@ 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]] 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 # #neighborhoods (excluding microhoods, eg the Tendernob) @@ -3920,7 +4111,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 @@ -3959,7 +4149,6 @@ layers: min_zoom: { min: 15 } draw: text-blend-order: - priority: 19 font: size: 13px @@ -3979,7 +4168,7 @@ 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: global.collision_priority repeat_group: abc buffer: 3px text: @@ -4021,6 +4210,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: @@ -4041,386 +4238,99 @@ layers: visible: false #end different icon sprites - #most POI icons without name should be hidden, except these - no-name: - filter: { name: false } + national-park-protected-areas: + filter: + kind: [national_park, battlefield] 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 + visible: global.icon_visible_landuse_green + size: global.icon_size_green + sprite: park + text: + visible: global.text_visible_landuse_green + font: + fill: [0.200,0.409,0.398] #*text_fill_park + style: italic + z14-parks: + filter: { $zoom: { min: 14 } } draw: mapzen_icon_library: - visible: false - sports-pitch: - filter: - $zoom: { min: 17 } - kind: [grass, pitch] - kind_detail: [baseball, basketball, football, hockey, soccer, tennis] + sprite: park-l + size: global.icon_size_green_l + parks: + filter: + - kind: [park, conservation, grass] + - { kind: protected_area, not: { protect_class: [6, '6'] } } + draw: + mapzen_icon_library: + visible: global.icon_visible_landuse_green + size: global.icon_size_green + sprite: park + text: + visible: global.text_visible_landuse_green + font: + fill: [0.181,0.370,0.361] + style: italic + only-text-later: + filter: { kind: [grass], $zoom: { min: 16 } } 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: + visible: false + text: + font: + style: italic + forest: filter: - kind: [natural_forest, natural_park, natural_wood] + - kind: forest + - { kind: protected_area, protect_class: [6, '6'] } draw: mapzen_icon_library: - visible: false - priority: 100 + visible: global.icon_visible_landuse_green + size: global.icon_size_green + sprite: forest text: + visible: global.text_visible_landuse_green font: - fill: '#666' - family: global.text_font_family + fill: [0.181,0.370,0.361] style: italic - size: 11px - suppress-icon-z17: + beach: + filter: + kind: [beach] + draw: + mapzen_icon_library: + visible: global.icon_visible_landuse_green + size: global.icon_size_green + text: + visible: global.text_visible_landuse_green + font: + fill: global.text_fill_beach + airport: + filter: + kind: [airport, aerodrome] + draw: + mapzen_icon_library: + visible: global.icon_visible_landuse_green + size: global.icon_size_green + text: + visible: global.text_visible_landuse_green + text_source: global.ux_language_text_source_iata + early: + filter: { $zoom: [9,10,11] } + draw: { mapzen_icon_library: { text: { text_source: iata } } } + + enclosure-related: filter: - $zoom: { min: 17 } - kind: [common, grass, houseboat, pedestrian, railway, ship, wetland] + kind: [enclosure, animal] 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 - - national-park-protected-areas: - filter: - kind: [national_park, battlefield] - draw: - mapzen_icon_library: - visible: global.icon_visible_landuse_green - size: global.icon_size_green - sprite: park - text: - visible: global.text_visible_landuse_green - font: - fill: [0.200,0.409,0.398] #*text_fill_park - style: italic - z14-parks: - filter: { $zoom: { min: 14 } } - draw: - mapzen_icon_library: - sprite: park-l - size: global.icon_size_green_l - parks: - filter: - - kind: [park, conservation, grass] - - { kind: protected_area, not: { protect_class: [6, '6'] } } - draw: - mapzen_icon_library: - visible: global.icon_visible_landuse_green - size: global.icon_size_green - sprite: park - text: - visible: global.text_visible_landuse_green - font: - fill: [0.181,0.370,0.361] - style: italic - only-text-later: - filter: { kind: [grass], $zoom: { min: 16 } } - draw: - mapzen_icon_library: - visible: false - text: - font: - style: italic - forest: - filter: - - kind: forest - - { kind: protected_area, protect_class: [6, '6'] } - draw: - mapzen_icon_library: - visible: global.icon_visible_landuse_green - size: global.icon_size_green - sprite: forest - text: - visible: global.text_visible_landuse_green - font: - fill: [0.181,0.370,0.361] - style: italic - beach: - filter: - kind: [beach] - draw: - mapzen_icon_library: - visible: global.icon_visible_landuse_green - size: global.icon_size_green - text: - visible: global.text_visible_landuse_green - font: - fill: global.text_fill_beach - airport: - filter: - kind: [airport, aerodrome] - draw: - 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 - early: - filter: { $zoom: [9,10,11] } - draw: { mapzen_icon_library: { text: { text_source: iata } } } - - enclosure-related: - filter: - kind: [enclosure, animal] - draw: - mapzen_icon_library: - priority: 43 - visible: false - text: - text_wrap: 10 - font: - style: italic - weight: normal + text-blend-order: + text_wrap: 10 + visible: true + font: + fill: gray + style: italic + weight: normal gate-early: filter: { kind: gate, $zoom: { max: 20 } } @@ -4457,20 +4367,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: @@ -4482,8 +4384,7 @@ 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%]] text: visible: global.text_visible_station station-early: @@ -4498,6 +4399,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: @@ -4513,13 +4419,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 } @@ -4570,7 +4474,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]] @@ -4583,26 +4486,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 } @@ -4652,45 +4565,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 @@ -4704,7 +4617,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 @@ -4767,13 +4679,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] @@ -4802,6 +4713,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 @@ -4815,8 +4727,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] @@ -4828,18 +4741,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: @@ -4851,7 +4773,7 @@ layers: #TIER 4 cemetery: filter: - kind: cemetery + kind: [cemetery,grave_yard] draw: dots: color: global.green2 @@ -4959,13 +4881,8 @@ 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 - # 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 + #order: 236 + #TIER 5 tourism-related: filter: @@ -5001,7 +4918,7 @@ layers: kind: orchard draw: dots: - color: [0.955,0.752,0.650] + color: [0.600,0.790,0.714] visible: true order: 236 @@ -5012,7 +4929,6 @@ layers: polygons_transparent: color: [0.8,0.8,0.7,0.1] visible: true - order: 235 wetland: filter: @@ -5021,7 +4937,6 @@ layers: polygons_transparent: color: [0.8,0.8,0.7,0.1] visible: true - order: 236 reef: filter: @@ -5071,6 +4986,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 @@ -5120,6 +5085,19 @@ layers: 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 tree_row: @@ -5217,13 +5195,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: @@ -5366,7 +5354,7 @@ layers: - ref: true draw: mapzen_icon_library: - priority: 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 @@ -5452,44 +5440,136 @@ 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 } + enabled: global.sdk_transit_overlay filter: kind: [station, tram_stop, bus_station, subway_entrance, halt, stop, platform, bus_stop, stop_position ] - any: - - area: false - all: - - area: true - all: - - $geometry: point - - kind: true draw: mapzen_icon_library: 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 @@ -5513,10 +5593,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: @@ -5561,6 +5641,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: @@ -5624,10 +5718,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 @@ -5648,10 +5742,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: diff --git a/index.html b/index.html index c85cbdd..4a3e3fa 100755 --- a/index.html +++ b/index.html @@ -22,12 +22,13 @@ - + - + - + + @@ -393,6 +394,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 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; + 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, @@ -487,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, @@ -630,7 +707,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