@@ -250,14 +250,14 @@ def routes(routes_geojson)
250250 }
251251end
252252
253- def tippecanoe ( pois_layers , features_json , features_layer , mbtiles , attributions , maximum_tile_bytes )
253+ def tippecanoe ( pois_layers , features_json , features_layer , mbtiles , attributions , min_zoom , maximum_tile_bytes )
254254 attributions = attributions . collect { |attribution | attribution . gsub ( '©' , '©' ) }
255255 system (
256256 'tippecanoe --force ' +
257257 pois_layers . collect { |pois_json , pois_layer |
258258 "--named-layer=#{ pois_layer } :#{ pois_json } "
259259 } . join ( ' ' ) + "\
260- -Z9 \
260+ -Z #{ min_zoom } \
261261 --named-layer=#{ features_layer } :#{ features_json } \
262262 --use-attribute-for-id=id \
263263 --convert-stringified-ids-to-numbers \
@@ -318,7 +318,8 @@ def build(source_id, source, config_path)
318318 } ) )
319319
320320 maximum_tile_bytes = source . dig ( 'output' , 'maximum_tile_bytes' ) &.to_i || 500_000
321- tippecanoe ( pois_layers , features_json , 'features' , mbtiles , attributions , maximum_tile_bytes )
321+ min_zoom = source . dig ( 'output' , 'min_zoom' ) &.to_i || 9
322+ tippecanoe ( pois_layers , features_json , 'features' , mbtiles , attributions , min_zoom , maximum_tile_bytes )
322323end
323324
324325
0 commit comments