Remote data, explicit steps
Discover once. Request only what the application needs.
Service sources keep endpoint metadata, request construction, and decoded results separate. That makes a remote dataset behave like a predictable part of the data path.
01 · discover
ArcGIS REST endpoint
A service directory exposes layers, operations, and formats.
02 · request
Request the useful subset
Choose features, images, tiles, or scene content for this view.
03 · application result
VectorSource · ImageSource · Tileset3DSource
The application receives a source contract rather than a vendor-specific client. ↗
The source owns protocol details; the application owns how returned features, pixels, tiles, or tables are used.
What it provides
Use the same tile interface for two server modes.
MapServer can expose a cache, a dynamic export endpoint, or both. The source normalizes those modes while keeping the choice explicit and configurable.
Cached
Advertised tile matrix and tile URLs
Dynamic
Exported images for requested bounds
Grid
ArcGIS LODs normalized to tile metadata
Control
Mode, layers, format, time, and tokens
Detailed guide
MapServer reference
The sections below cover support, authentication, cached tiles, dynamic exports, and source options.
ArcGIS MapServer services expose cached map tiles, dynamically rendered maps, or both.
ArcGISMapTileLoader presents either mode through one loaders.gl TileSource.
| Property | Value |
|---|---|
| Data source | ArcGISMapTileSource |
Feature support
| Capability | Support | API and behavior |
|---|---|---|
| Cached tile services | ✅ Supported | Uses /tile/{z}/{y}/{x} when service metadata advertises tileInfo |
| Dynamic map services | ✅ Supported | Uses /export with a Web Mercator tile bounding box |
| Automatic mode selection | ✅ Supported | mode: 'auto' chooses cached tiles when available, otherwise export |
| Explicit mode selection | ✅ Supported | Use mode: 'cached' or mode: 'dynamic' |
| Service metadata | ✅ Supported | getMetadata() exposes bounds, CRS, layers, tile size, and ArcGIS LODs |
| ArcGIS LOD grid | ✅ Supported | Advertised levels, origins, resolutions, and tile sizes are normalized as partial per-level metadata |
| Dynamic rendering parameters | ✅ Supported | Layer visibility, format, transparency, time, and vendor parameters are forwarded |
| Multiple service URLs | ✅ Supported | Optional URL pool distributes tile requests deterministically |
| Authentication | ✅ Supported | URL tokens and standard fetch options are preserved |
| Feature queries | Separate source | Use the feature query source for queryable MapServer layers; the map tile source returns images |
| deck.gl rendering | ✅ First class | SourceLayer consumes the TileSource directly |
Authentication
createArcGISCredential applies one exact-origin token to metadata, cached tiles, and dynamic
exports, including requests issued through SourceLayer. Explicit URL tokens take precedence. See
the authentication guide.
Cached tiles
import {createDataSource} from '@loaders.gl/core';
import {ArcGISMapTileLoader} from '@loaders.gl/arcgis/map-service';
const source = await createDataSource(
'https://server.arcgisonline.com/ArcGIS/rest/services/World_Imagery/MapServer',
[ArcGISMapTileLoader]
);
const metadata = await source.getMetadata();
const image = await source.getTile({x: 2, y: 1, z: 2});
Dynamic export tiles
Select export mode when a service is not cached or when dynamic layer, time, or rendering parameters are required:
const source = await createDataSource(mapServerUrl, [ArcGISMapTileLoader], {
'arcgis-map-server': {
mode: 'dynamic',
tileSize: 512,
urls: ['https://tiles-a.example.com/MapServer', 'https://tiles-b.example.com/MapServer'],
exportParameters: {
layers: 'show:0,2',
format: 'png32',
transparent: true
}
}
});
source.updateParameters({time: '2024-01-01'});
Runtime parameters are merged into subsequent export requests, which makes time sliders and layer controls inexpensive to implement.
deck.gl integration
import {SourceLayer} from '@loaders.gl/deck-layers';
import {ARCGIS_LOADERS} from '@loaders.gl/arcgis/discovery';
const layer = new SourceLayer({
id: 'world-imagery',
data: mapServerUrl,
loaders: ARCGIS_LOADERS,
extent: [-180, -85.051129, 180, 85.051129],
minZoom: 0,
maxZoom: 19
});
SourceLayer uses the normalized tile grid and requests only visible tiles.
References
Examples and source
Open the map example. The example selector includes cached tiles and dynamic exports; the latter is an image request, not feature querying.
Query vector features and tables
For a queryable /MapServer/{layerId}, use ArcGISFeatureServerLoader and its
feature query API. The registry selects this vector
source for numbered MapServer layer URLs; MapServer root URLs retain the imagery source.
Spatial layer queries require advertised GeoJSON support. Counts, IDs, extents and nonspatial
tables share the feature-query implementation. This does not add identify, find, or legend APIs.
TileMatrix metadata
getMetadata().tileGrid.matrices preserves each advertised LOD identifier, resolution, origin, and rectangular tile size. Matrix dimensions are not inferred from service coverage, so ArcGIS grids remain partial and do not expose complete tileMatrixSet geometry. The grid retains CRS authority identifiers, preferring latestWkid; known Web Mercator aliases normalize to EPSG:3857.
After metadata loads, cached-tile URL methods select an exact tileMatrix identifier, otherwise the identifier equal to z, then the level at index z. Unknown identifiers fail. Before metadata is available, numeric z and explicit identifiers pass through. Use tileMatrix for noncontiguous service levels.
This metadata does not add projected rendering or reprojection. Dynamic MapServer export remains an XYZ Web Mercator operation. Vector geographic decoding requires a matching XYZ zoom; use raw getTile() for native matrix bytes when the requested identifier differs from z.