Skip to content

Display a satellite map

Replicates the MapLibre example Display a satellite map: a satellite raster baselayer (here over Yosemite Valley).

display-a-satellite-map.yaml
# 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/display-a-satellite-map/
type: map
id: display-a-satellite-map
config:
center: [-119.5383, 37.7402]
zoom: 12
mapStyle: "https://demotiles.maplibre.org/style.json"
layers:
- id: satellite
type: raster
source:
type: raster
tiles:
- "https://server.arcgisonline.com/ArcGIS/rest/services/World_Imagery/MapServer/tile/{z}/{y}/{x}"
tileSize: 256
attribution: "Imagery © Esri, Maxar, Earthstar Geographics"
  • A raster source is a tiles: URL template plus tileSize; attribution rides on the source and surfaces in the attribution control.
  • To make the imagery the only thing on screen, point mapStyle at an empty style — here it sits above the vector basemap instead.