Mapbox studio : how to display building at any zoom level - mapbox

I'm using mapbox studio to customize a map and I haven't found the way to display building-outline layer at any zoom level.
If I'm under of 16 zoom level, this layer disappears... even if I force opacity to 1.
Any idea ?
Thank you in advance

The minimum zoom level for the buildings layer in the current tileset (Mapbox Streets v8) is 13.
This means that if you zoom out further (from 12 to 0) the buildings layer will not be rendered on the map.
See documentation:
https://docs.mapbox.com/vector-tiles/reference/mapbox-streets-v8/#layer-reference
The reason for this restriction is that if you requested your browser to fetch and render every building polygon in a wider area (like an entire city or country), this would be more than a reasonable amount of data to render.
If you have your own buildings polygon data and you create a tileset from that, you could choose to include your data across more zoom levels. However, you might waste a lot of computing resources drawing shapes that are too tiny to understand at those further zoom levels.

Related

How can I configure zoom extent in Mapbox when generating raster tilesets from GeoTIFF?

GOAL
I'm using Mapbox to generate raster tilesets from raw GeoTIFFs. The GeoTIFFs have a resolution such that a single pixel represents roughly a 5km x 5km square on the map. The generated raster tilesets will be hosted on Mapbox and then displayed in a Mapbox GL JS application.
PROBLEM
The issue I'm running into is extreme blurriness at high zoom levels. Below is a section of central Nigeria at about a zoom level of 7 displayed in our Mapbox GL JS app vs. the raw GeoTiff viewed in QGIS. The blurriness is of course worse at even higher zooms.
I created this raster tileset by uploading a sample GeoTIFF into Mapbox Studio (I've also used the Uploads API). The Tileset viewer in Studio displays a footnote that reads:
Zoom Extent
z0 – z5. Data will be overzoomed to z22, but simplified past 5.
I can verify this by looking at the network requests in the dev tools as I zoom in on the map – it actually seems that no new tiles are requested above z4.
QUESTION
Does Mapbox have any way to manually configure the zoom extent (specifically, the max zoom) for which raster tilesets are generated?
WHAT I'VE TRIED/RESEARCHED
I’ve clicked through to the Adjust Tileset Zoom Extent help page, which states:
For raster tilesets, the uploaded image resolution sets the minzoom
and maxzoom levels. Higher resolution images will result in the
tileset rendering at more zoom levels.
Again, the data I'm working with is of fixed resolution so I'm hoping to find a way to have tilesets generated for higher zoom levels regardless of image resolution. Mapbox Tiling Service and Tippecanoe both have custom configuration rules for specifying the max zoom (past which, simplification occurs) when creating vector tilesets. However, neither seems to handle rasters. The Uploads API does handle raster tilesets, but doesn't seem to have any zoom extent configuration options.
I've also tried adjusting various frontend configuration options in the Mapbox GL JS client like the source tileSize and the raster-resampling paint property, but to little avail. I'm definitely open to other suggestions for how to get crisp pixels at higher zoom levels, but mostly hoping there's some simple method I'm missing for getting Mapbox to generate raster tiles past z4/z5. I think even z0-z7 would be sufficient.

Changing zoom extent of streets in Mapbox

Mapbox has limitations (such as zoom level 11 for road-street). I'm wondering how I can change that to 10. I want to use the same Mapbox-Streets-v8 tileset, just change that one zoom extent.
I have seen a bunch of answers involving MTS/tippecanoe, and gone through the tutorials on MapBox's website. I know I can create a tileset from scratch using data. But is there a way for me to replicate MapBox's streets-v8 and modify the zoom extent of roads, without having to recreate the entire tileset?
road-street zoom level 10
road-street at zoom level 11
You can achieve this in two ways
Eject the road network component and change the zoom extent for road-street
but by doing this the ejected layers will be ungrouped and you'll need to group it again(if you want)
Or you can add the same layer manually, change the zoom extent and apply the same style

Mapbox - Show point of interest markers regardless of zoom level

I'm filtering on the 'poi-label' layer on the default Mapbox Streets V8 data source. What I'd like to have is that certain maki or class labels like 'fitness-centere' to always be visible (both icon and label) regardless of the zoom level.
I see no clear documentation on how to do this using Mapbox studio. Can it be done in that tool?
It is generally not possible to have layers in vector tile sources display at "all zoom levels" because they don't exist at all zoom levels within the vector tile sources.
Generally, the Mapbox tilesets are heavily optimised and only include data at the zoom levels that they are intended to display at in the corresponding Mapbox styles.

Mapbox GL JS: Set Map Center or Bounds to show visible part of a layer

I have a layer with 7000+ polygons and am displaying a portion of the polygons in a web app using "setFilter" on map load. (The filter is choosing the polygons to display dynamically based on data from the url of the current page.)
However, I can't figure out how to make the map center on the particular polygons currently showing (the visible part of that layer), which means the user has to hunt around to find it. There can be multiple polygons visible at one time, and they are a range of different sizes. Any ideas?
If you have the feature collection of polygons that are visible on your map, you can use the turf-extent module to get the geographical extent of the visible polygons, and then call map.fitBounds(extent) to make all visible polygons within the viewport.

Leaflet zoom in further and stretch tiles

When I zoom in far enough on my map, the TileLayer disappears and I see a bunch of tiles that say "Map data not yet available". I believe these tiles may be coming from the provider, but I am not sure (I am using ESRI WorldImagery dataset).
Is there any way to, at a certain zoom level, just force the tiles to stretch, instead of requesting the tiles for that zoom level? I am ok with some blur, but I do need to zoom in further.
I tried playing around with the zoomOffset option, but whenever I put something there other than 0, my tiles just never load (all grey).
Thanks!
This can be solved by using two of the options of L.TileLayer.
First, set maxNativeZoom to the highest zoom level your tiles provide (the last zoom level before the "Map data not available" starts to appear - this tells Leaflet to stop requesting new tiles when zooming in beyond this level; stretched tiles will be used instead.
Second, set maxZoom to whatever zoom is appropriate; you might not want this to be more than a couple of levels higher than maxNativeZoom, since the stretched tiles will start to look pretty horrible.
You can find out more about the details by checking under "Options" in the documentation for L.TileLayer: http://leafletjs.com/reference.html#tilelayer