You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Design Proposal: Allow overzoom for sparse pyramid tiles
Motivation: help deploy light pmtiles
Vector tiles are a great opportunity for developers to host their own tile server rather than relying on a third-party service. However a full planet pmtiles in OpenMapTiles schema is more than 70 Go, which is too much for small-scale web hosting.
Hopefully most maps do not require full detail of the whole planet, but the whole planet only up to an intermediate zoom (let's say z10) to get a nice map, then full details (let's say z11-z14) only in an area of interest (a city, a state, a country, ...).
It is possible in pmtiles to store such sparse pyramid tiles, so I was expecting this behavior:
in the area of interest (right side): display the available z11-z14 tiles
in the rest of the world (left side): overzoom in the last available level (z10)
But the acual maplibre behavior is this one, with nothing visible in the rest of the world
This behavior is perfectly normal once you have noticed that the tile server logically responds an empty tile, so maplibre logically displays a transparent tile.
This behaviour is perfect when 2 sources have been declared : you want the user to see the 2nd source below when the 1st one is not available. But it is not suited for 1 sparse pmtiles source for which the "show me what's below" behavior would be to display the last available level.
MapLibre is able to overzoom the last available level when it is the maxzoom level and also when the tile server responds with a 404 error instead of an empty tile (this is the way I used to prepare the 1st image above)
Proposed Change
I propose to allow the user to choose the expected behavior when the tile server responds an empty tile:
the default behavior would be the actual one: display nothing (for people with multiple sources)
a new available behavior would be to overzoom in the last available level (for people with 1 source), as is the case today when the tile server responds an error
This could be implemented in maplibre-style-spec during source definition, for example with a new parameter overzoomEmptyTile: true/false or emptyTileHandling: 'overzoom'/'transparent' that allows the user to choose the desired behavior
to apply the same style to both file sources, you have to duplicate the entire style definition. And for styles with a lot of layers (based on OpenMapTiles schema for example), it makes a lot of duplicated content.
more problematic, since the z10 tile is overzoomed everywhere, you get in the area of interest a strange superposition of both sources:
This proposal will allow a single-file solution that can be easily deployed by people with few map-coding skills, on small-scale servers.
The text was updated successfully, but these errors were encountered:
Design Proposal: Allow overzoom for sparse pyramid tiles
Motivation: help deploy light pmtiles
Vector tiles are a great opportunity for developers to host their own tile server rather than relying on a third-party service. However a full planet pmtiles in OpenMapTiles schema is more than 70 Go, which is too much for small-scale web hosting.
Hopefully most maps do not require full detail of the whole planet, but the whole planet only up to an intermediate zoom (let's say z10) to get a nice map, then full details (let's say z11-z14) only in an area of interest (a city, a state, a country, ...).
It is possible in pmtiles to store such sparse pyramid tiles, so I was expecting this behavior:
But the acual maplibre behavior is this one, with nothing visible in the rest of the world
This behavior is perfectly normal once you have noticed that the tile server logically responds an empty tile, so maplibre logically displays a transparent tile.
This behaviour is perfect when 2 sources have been declared : you want the user to see the 2nd source below when the 1st one is not available. But it is not suited for 1 sparse pmtiles source for which the "show me what's below" behavior would be to display the last available level.
MapLibre is able to overzoom the last available level when it is the maxzoom level and also when the tile server responds with a 404 error instead of an empty tile (this is the way I used to prepare the 1st image above)
Proposed Change
I propose to allow the user to choose the expected behavior when the tile server responds an empty tile:
This could be implemented in maplibre-style-spec during source definition, for example with a new parameter overzoomEmptyTile: true/false or emptyTileHandling: 'overzoom'/'transparent' that allows the user to choose the desired behavior
API Modifications
I don't know what to write in this section.
Migration Plan and Compatibility
I don't expect any compatibility issues, as the default behaviour would still be to display a transparent tile.
Rejected Alternatives
Several people (in this discussion on pmtiles repo and this one on maplibre GL JS repo) proposed to prepare 2 separate files and declare these as 2 sources. This solution is not suitable because:
This proposal will allow a single-file solution that can be easily deployed by people with few map-coding skills, on small-scale servers.
The text was updated successfully, but these errors were encountered: