Skip to main content

ImageService

For accessing ArcGIS Image Services that provide analytical raster data with advanced rendering capabilities.

Constructor

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

Esri Service Options

OptionTypeDefaultDescription
urlstringRequired URL of the ImageService
renderingRuleobjectRaster function and parameters for visualization
mosaicRuleobjectControls which images are displayed from a mosaic dataset
formatstring'jpgpng'Output format (jpg, png, jpgpng, gif, bmp)
interpolationstringResampling method (RSP_BilinearInterpolation, RSP_CubicConvolution, etc.)
compressionQualitynumberJPEG compression quality (1-100)
bandIdsArray<number>Specific bands to display
pixelTypestringOutput pixel type
noDatanumberNoData value
tokenstringAuthentication token
fetchOptionsobjectFetch request options

Methods

MethodReturnsDescription
identify(lngLat, options?)Promise<IdentifyResponse>Get pixel values at a point
setRenderingRule(rule)voidUpdate rendering rule
setMosaicRule(rule)voidUpdate mosaic rule