Skip to content

Source System ​

The Source System provides the data pipeline for OpenLayers, defining how map data is fetched, processed, and delivered to layers. This system encompasses tile sources, image sources, vector sources, and various protocols (XYZ, WMS, WMTS, WFS, etc.) that feed data into the rendering pipeline.

For information about how sources integrate with layers, see Layer Architecture. For details on data formats and parsing, see Data Formats and Parsing.

Source Class Hierarchy ​

The source system is built on a well-defined inheritance hierarchy that separates concerns between different data delivery paradigms.

Core Source Architecture ​

SVG
100%

Source State Management ​

All sources inherit core functionality from the Source base class, including state management, attribution handling, and projection support.

SVG
100%

Tile Sources ​

Tile sources deliver data in a grid-based tile system, with each tile representing a specific geographic area at a particular zoom level.

Tile Source Architecture ​

Source ClassProtocolUse CaseKey Features
XYZHTTP/HTTPSStandard tile serversTemplate URLs, tile grids
OSMHTTP/HTTPSOpenStreetMapPreconfigured XYZ source
WMTSOGC WMTSStandards-compliantCapabilities-based setup
TileWMSOGC WMSWMS as tilesParameter handling, GetFeatureInfo
BingMapsBing APIBing MapsQuad key addressing, metadata
VectorTileVariousVector dataMVT, PBF formats

Tile URL Generation ​

Tile sources use URL functions to generate requests for specific tile coordinates:

SVG
100%

Vector Tile Implementation ​

Vector tiles require special handling for feature data and format parsing:

SVG
100%

Image Sources ​

Image sources provide single, continuous images that cover larger geographic areas, typically used for untiled services or static imagery.

Image Source Types ​

SVG
100%

Image Loading Pipeline ​

SVG
100%

Protocol Support ​

The source system supports multiple geospatial protocols and standards through specialized source implementations.

WMS (Web Map Service) Support ​

SVG
100%

WMTS (Web Map Tile Service) Support ​

The WMTS implementation handles capabilities documents and matrix sets:

ComponentPurposeImplementation
optionsFromCapabilitiesParse WMTS capabilitiesAuto-configuration from XML
createFromWMTSTemplateURL template generationMatrix ID, tile coordinates
Matrix SetsTile grid definitionProjection-specific grids
DimensionsAdditional parametersTime, elevation, custom

Data Flow and Integration ​

Sources integrate with the broader OpenLayers architecture through standardized interfaces and events.

Source-to-Layer Integration ​

SVG
100%

Event System and Caching ​

Sources emit events for state changes and data loading, enabling reactive updates throughout the system:

SVG
100%

Specialized Sources ​

Raster Processing Source ​

The Raster source enables pixel-level operations across multiple input sources:

SVG
100%