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
I have spatial data which is too large to be displayed as a single raster overlay. Tiles need to be generated. However, it is not possible to generate them on the server. The data comes to client in a compressed private format.
LeafletJS has layer called GridLayer, which enables you to do this. Instead of giving url to fetch tiles, you can write your own function which takes tile parameters (x,y,z) as input, and returns generated tile as result (div, canvas or img). This is short example in the docs: https://leafletjs.com/reference-1.6.0.html#gridlayer
As a real world example, this very powerful approach is used here: https://www.windy.com/
Is there anything similar in Mapbox GL JS? How would one approach this problem? Is it even possible to do this?
The text was updated successfully, but these errors were encountered:
Hi @dkegle GL JS doesn't have a correlate to Leaflet's GridLayer. I think the way you'd want to to approach this is to generate your tiles client-side, then add the tiles as a raster source. There's a few older issues that reference similar ideas such as #7390, #5597 and #9280. If you need further help getting this set up, I'd recommend contacting Mapbox Support.
@ryanbaumann I think the question is asking "How do I have mapbox call my local function with params x,y,z for tiles" Not necessarily constraining it to rasters.
This is a need I also have. I need to generate tiles on the fly client-side, in addition to the normal map tiles retrieved on the server, in order to render a grid. These would be vector tiles, not raster tiles.
Can mapbox call a local function to retrieve map tiles on-demand for a layer?
I have spatial data which is too large to be displayed as a single raster overlay. Tiles need to be generated. However, it is not possible to generate them on the server. The data comes to client in a compressed private format.
LeafletJS has layer called GridLayer, which enables you to do this. Instead of giving url to fetch tiles, you can write your own function which takes tile parameters (x,y,z) as input, and returns generated tile as result (div, canvas or img). This is short example in the docs:
https://leafletjs.com/reference-1.6.0.html#gridlayer
As a real world example, this very powerful approach is used here:
https://www.windy.com/
Is there anything similar in Mapbox GL JS? How would one approach this problem? Is it even possible to do this?
The text was updated successfully, but these errors were encountered: