Skip to main content

TiledMapService

For accessing ArcGIS Tiled Map Services that provide pre-cached raster tiles.

Constructor

ArgumentTypeDescription
idstringAn id to assign to the MapLibre GL source
mapMapA MapLibre GL or Mapbox GL map instance
esriServiceOptionsobjectOptions for the Esri MapService (see below)
rasterSourceOptionsobjectOptional MapLibre GL raster source options

Esri Service Options

OptionTypeDefaultDescription
urlstringRequired URL of the Tiled MapService
fetchOptionsobjectOptions for fetch requests (headers, etc.)
tokenstringAuthentication token if required
getAttributionFromServicebooleantrueRetrieve attribution from service metadata

Methods

MethodReturnsDescription
getMetadata()Promise<ServiceMetadata>Fetch service metadata