Quickstart
This guide adds a Mountaya overlay to a MapLibre GL JS map you already have, in about five minutes. The pattern is three steps: fetch the overlay specification with your key, add the sources it returns, then add its layers. The same shape works for Mapbox GL JS, the MapTiler SDK, and deck.gl, covered in integration.
You need a publishable key (pk_…) with the tiles scope. Fetching a specification needs only that key. If your organization enables session enforcement, also send a session token; see authentication for both.
1
Each overlay describes itself through a specification: the MapLibre sources and layers to register, with zoom ranges and attribution already filled in. Fetch it with your publishable key in the X-API-Key header. Here we request the hillshade overlay.
A specification returns one or more sources. Each source carries an id, a type (vector or raster), its tiles URL templates, a zoom_min and zoom_max, attribution, and the layers to draw from it. Every layer already includes its paint and layout, so you do not style anything by hand.
2
Register each source on your map by its id. A raster source also carries a size; a vector source does not. Wait for the map's load event before adding anything.
3
Each source lists the layers to draw from it. Add them in order. The paint and layout come from the specification, so pass them straight through; just set each layer's source to the source id it belongs to. For a vector source, also forward the layer's source-layer.
The hillshade overlay now renders on your map. To layer a forecast overlay such as temperature-actual instead, swap the slug in the specification URL and add a ?timestamp= parameter to its tile requests; see overlays for the catalog and the time dimension.