Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Overzooming in PMTiles Data Source - No Way to Define maxzoom in Maputnik #1028

Open
FabianRechsteiner opened this issue Jan 25, 2025 · 2 comments

Comments

@FabianRechsteiner
Copy link

Overzooming in PMTiles Data Source - No Way to Define maxzoom in Maputnik

Description:
Currently, PMTiles are supported as a data source in Maputnik, which is great! However, I've encountered an issue where it is not possible to manually define the minzoom or maxzoom for a PMTiles source. These values are automatically derived from the data, but I would like to have more control, especially over the maxzoom.

In my case, my PMTiles data only includes tiles from zoom levels 0 to 15. I would like to define a maxzoom for the source to enable overzooming, so that the tiles from zoom level 15 can also be displayed when zooming in further (e.g., at zoom level 16).

Current Issue:

  • There is no way to specify a maxzoom for PMTiles sources in Maputnik.
  • The tiles disappear at zoom level 16 since no data exists for that zoom level in the PMTiles file.
  • I want the data from zoom level 15 to continue being shown at higher zoom levels, like in Mapbox GL JS, where overzooming happens automatically when maxzoom is set.

Expected Behavior:

  • I should be able to set a maxzoom for a PMTiles source manually in Maputnik.
  • This would allow overzooming, meaning that data from zoom 15 would still be visible at zoom 16 and higher.

Steps to Reproduce:

  1. Add a PMTiles data source in Maputnik that only contains zoom levels 0 to 15.
  2. Zoom in past zoom level 15 (e.g., to zoom level 16).
  3. The data disappears since there is no overzoom functionality.

Request:
Please add support for manually setting minzoom and maxzoom for PMTiles sources in Maputnik, or allow for automatic overzooming similar to how Mapbox GL JS handles it when the max zoom level is reached.


Related to Issue #807.

@HarelM
Copy link
Collaborator

HarelM commented Jan 25, 2025

I think this is a configuration of the pmtiles to return 404, which is not the default behavior.
Feel free to open a PR, as a workaround, you could serve the PMTiles locally or behind a tile server...

@FabianRechsteiner
Copy link
Author

Thanks for the quick reply.

I created the PMTiles with the bbox server and set maxzoom=15 during export. I then uploaded the file to GitHub: pmtiles://https://raw.githubusercontent.com/FabianRechsteiner/vector-tiles-benchmark/master/data/av_tg.pmtiles.

I would now like to style this in Maputnik and use it as a background layer in Maplibre with a JSON file.

I also noticed that the maxzoom in the PMTiles metadata was mistakenly set to 24. While I could adjust the metadata, I am opting not to do so for now. It seems this incorrect entry in the metadata could be the reason why the data is only displayed up to zoom level 15. If this is the case, it would be a bug in the bbox server.

More details about seeding tiles with the BBOX server can be found in the documentation here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants