Add a raster tile source
Replicates the MapLibre example Add a raster tile source: OpenStreetMap raster tiles above the vector basemap.
The complete document
Section titled “The complete document”# yaml-language-server: $schema=https://docs.maplibre-yaml.org/schema/latest/map.schema.json# Gallery twin of https://maplibre.org/maplibre-gl-js/docs/examples/add-a-raster-tile-source/type: mapid: add-a-raster-tile-sourceconfig: center: [2.3488, 48.8534] zoom: 11 mapStyle: "https://demotiles.maplibre.org/style.json"layers: - id: osm-raster type: raster source: type: raster tiles: - "https://tile.openstreetmap.org/{z}/{x}/{y}.png" tileSize: 256 attribution: "© OpenStreetMap contributors"What to notice
Section titled “What to notice”- A raster source is
tiles:+tileSize;attributionrides the source into the attribution control.