Custom layers
Custom layer protocols
The Layer Stack is the catalog, plus sources you bring yourself. Add layer → Custom layer accepts a short list of public protocols. This page is that list: what we implement, whether the source stacks above the map or replaces the ground, and which requests we skip.
Waypoints, routes, tracks, polygons, and photos are a different list: Library interchange.
What a protocol is here
A protocol is how a map source is addressed and fetched. You paste a URL, or you import a style document. Wildlost requests that host while you are online. Custom layers are not part of an offline package. Offline mode turns them off.
WMS and WFS services are outside this list.
Protocols
| Protocol | Spec | In the stack | As ground | What you provide |
|---|---|---|---|---|
| XYZ / TMS | Slippy map tiles, OSGeo TMS | Yes | Yes | Raster URL with {z}, {x}, and {y} |
| WMTS | OGC WMTS 1.0.0 | Yes | Yes | Service URL, then a layer from GetCapabilities |
| MVT | Mapbox Vector Tile specification | Yes | No | Vector URL with {z}, {x}, and {y}, plus a source-layer name |
| PMTiles | PMTiles | Yes | Raster only | https URL whose path ends in .pmtiles |
| Style JSON | MapLibre Style Spec | No | Yes | https style URL, or a style.json file |
| GeoServices REST API | Query | Yes | No | MapServer or FeatureServer layer URL |
{z}, {x}, and {y} may appear in any order. On the https app, an http tile or service URL is requested as https.
XYZ and TMS
These are raster image tiles, usually PNG, JPEG, or WebP. XYZ counts rows from the north. TMS uses the same zoom and column, and counts rows from the south. Pick the scheme that matches the server.
Test loads one tile before you add the layer. If the host does not allow browser requests, Wildlost fetches that tile (and later map tiles) through the API. The image still has to be a raster tile, and the layer still needs a network. Max zoom starts at 18 and can be set from 0 through 22. Use as basemap replaces the ground instead of stacking above it.
WMTS
Paste an OGC WMTS 1.0.0 address and choose Load. A capabilities file (…/WMTSCapabilities.xml), a service root, or a GetCapabilities or GetTile link all work. Wildlost requests GetCapabilities and lists raster layers on the standard 256-pixel Web Mercator pyramid (EPSG:3857 and the usual aliases, including GoogleMapsCompatible and WebMercatorQuad). You then pick the layer, and a tile matrix set or style when the service publishes more than one.
Other coordinate systems, 512-pixel tiles, and dimensions without a concrete default are skipped. The server must allow CORS. Test tile checks one resolved {z}/{x}/{y} image. The layer can stack or replace the ground. We keep the tile template together with the service URL, layer, matrix set, and style.
MVT
Mapbox Vector Tiles carry geometries and attributes, and the app paints them. The URL is a {z}/{x}/{y} template, often ending in .mvt or .pbf. You also name the source-layer inside the tile. When the host allows CORS, a sample tile supplies that list. Otherwise you type the name.
MVT stays in the stack. Choosing a basemap does not offer it. The row axis is XYZ.
PMTiles
A PMTiles archive is one file of tiles, read with HTTP range requests. Paste an https URL that ends in .pmtiles. A pmtiles:// prefix, or a trailing /{z}/{x}/{y}, is removed. The URL cannot include a query string or a hash.
The host must allow CORS and range requests. When the header can be read, raster versus vector and the zoom range come from the archive. Raster archives (PNG, JPEG, WebP, or AVIF) can stack or replace the ground. Vector archives are MVT: they stay in the stack and need a source-layer name. You can still add the archive when the header cannot be read.
Style JSON
A MapLibre style document replaces the ground. Provide an https URL, or import a local style.json.
An imported file is a JSON object with a numeric version (usually 8), a sources object, and a layers array, at most 1,000 KB. The style’s own sources are fetched while you are online.
GeoServices REST API
A MapServer or FeatureServer feature layer. Paste the layer address. These name the same layer:
https://gis.example.gov/rest/services/Example/MapServer/5
https://gis.example.gov/rest/services/Example/MapServer/5?f=pjson
https://gis.example.gov/rest/services/Example/FeatureServer/0
Load reads that layer document (f=json or f=pjson) and checks that the layer can answer a GeoJSON query. The map then requests features for the current view as you pan and zoom. One color comes from the service renderer. A category renderer uses its fallback color.
The layer stays in the stack. It does not replace the ground. If the host blocks browser requests, Wildlost fetches the JSON through the API. A service root, a raster layer, and a layer that cannot return GeoJSON are skipped.
What these sources leave out
- Offline mode turns a custom layer off. The definition is not an offline package.
- Library objects still move as the files on Library interchange.
- WMS and WFS stay outside the protocol list.
- Loose MVT and vector PMTiles stay in the stack. A style document replaces the ground.
Save to library keeps the name, protocol, and URL so you can add the source again. Notes are optional (attribution, usage). A saved source can be shared. The tiles still come from the host you named, and only while you are online.
How to add one
- Open Add layer.
- Choose Custom layer.
- Name it and pick a protocol.
- Paste the URL, or import a style file. Set the scheme or the source-layer when that protocol asks. Use Test or Test tile when the button is there.
- For raster XYZ, WMTS, or raster PMTiles, check Use as basemap when the source should replace the ground.
- Optionally check Save to library, then add the layer.