-
|
Hello everyone, I'm working on a project using MapLibre GL JS with PMTiles to visualize oceanographic/meteorological data. The data is converted from NetCDF to GeoJSON and then to PMTiles using Tippecanoe. My project involves a unique PMTiles file that contains 24 layers, one for each hour. My goal is to allow the user to switch dynamically between these hours, displaying only ONE layer at a time using the source-layer property. I'm running into a performance question and I'm not sure if my approach is the most efficient. I have a feeling that even when I'm only displaying a single layer, MapLibre is downloading or at least processing data for all 24 layers. My main question is: Based on my understanding, a PMTiles client (like MapLibre) requests a specific tile (z/x/y). If that tile contains all 24 layers, wouldn't the browser download the entire tile payload, even if I'm only using one source-layer in my map style? I'm considering an alternative where I generate 24 separate PMTiles files, one for each hour. My app would then dynamically change the url of the source instead of just the source-layer. Could someone from the community or the Protomaps team confirm if my initial approach is inefficient and if the separate-file approach is the recommended best practice for this use case? Any insight would be greatly appreciated! Thanks in advance. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
|
Tiles are the smallest unit of data that MapLibre fetches. So if your tiles have 24 layers, and maplibre needs one of these layer, maplibre will fetch the entire tile. |
Beta Was this translation helpful? Give feedback.
Tiles are the smallest unit of data that MapLibre fetches. So if your tiles have 24 layers, and maplibre needs one of these layer, maplibre will fetch the entire tile.