Overview
A provider represents the underlying functionality that "provides" the tiles that make up the mapping layer.
Description
This is most commonly an external HTTP(s) endpoint using either the proxy or url template providers. Custom providers can be created to extract tiles from other sources.
When supplying a provider ensure you include the name parameter. Some providers require nested providers; be aware that repeated nesting has a performance cost.
|
Choosing a provider
| Goal | Provider | Output | Notes |
|---|---|---|---|
Proxy an upstream ZXY, TMS, WMTS, or WMS server |
Any |
Placeholders for tile coordinates or a bounding box. Use |
|
Proxy a WMS server with |
Any |
Kept for compatibility. Converted to a Proxy internally, adding fixed |
|
Read a PMTiles archive |
Any |
Local file or HTTP(s) range requests. Output type comes from the archive header |
|
Generate vector tiles from PostGIS |
MVT |
Reads one table or view. Use a dedicated server for custom queries |
|
Run a CGI renderer such as MapServer |
Any |
Output is whatever the executable returns |
|
Return the same tile every time |
Raster, MVT, or MLT |
Decided by the image’s extension. Mostly used inside Fallback or Blend |
|
Reuse another layer |
Any |
Same output as the referenced layer. Recursion limit of 10 |
|
Try a backup source on error or outside a zoom or bounds |
Any |
Bounds are checked per tile, so the edge shifts as you zoom |
|
Merge raster layers |
Raster |
JPEG or PNG input only. Output is PNG. Children are called in parallel |
|
Merge vector layers |
MVT, MLT |
Combines the layers of each child unchanged. MVT and MLT can’t be mixed |
|
Limit raster tiles to a geographic area |
Raster |
Exact edge at every zoom. Optional secondary provider fills the rest |
|
Limit vector tiles to a geographic area |
MVT, MLT |
Clips geometry to the bounds. No secondary provider |
|
Adjust raster appearance with a preset effect |
Raster |
Built-in modes such as grayscale, blur, or contrast. Output is PNG |
|
Adjust raster appearance with your own per-pixel logic |
Raster |
A single Go function interpreted with Yaegi. Output is PNG |
|
Anything else |
Any |
Your own Go code interpreted with Yaegi. See Extensibility |