loaders.gl support
| Type | API |
|---|---|
| Source loader | CSWLoader |
The catalog path
Search records, then follow their service references.
CSW sits above map, feature, tile, and coverage services. The source exposes catalog metadata first, keeping the decision about which service to request in the application.
Discover
Read capabilities and advertised domains
Search
Request typed catalog records asynchronously
Resolve
Extract WMS, WMTS, and WFS service references
Boundary
Read-only GET/KVP support; POST XML is outside the source
Detailed guide
CSW operations and support
The reference below covers supported operations, catalog search, service-directory extraction, request customization, and current protocol boundaries.
CSW is an OGC protocol for searching catalogs of geospatial datasets, services, and related
resources. CSWLoader adapts read-only CSW endpoints to the loaders.gl CatalogSource
contract.
Feature support
| Capability | Support | API and behavior |
|---|---|---|
GetCapabilities | ✅ Supported | getCapabilities() returns parsed, typed service metadata |
GetRecords | ✅ Supported | getRecords() and async search() return catalog records |
GetDomain | ✅ Supported | getDomain() parses advertised parameter domains |
| Service directory | ✅ Supported | getServiceDirectory() extracts WMS, WMTS, and WFS references |
| Normalized catalog contract | ✅ Supported | Implements read-only CatalogSource metadata and search |
| Vendor query parameters | ✅ Supported | Appended to generated GET requests |
| HTTP GET / KVP | ✅ Supported | All implemented operations use query parameters |
| XML or form POST | ❌ Not supported | Request payload generation is outside the source |
DescribeRecord / GetRecordById | ❌ Not exposed | Use a custom request and the low-level XML loaders if needed |
| Pagination and CQL filtering | ❌ Not normalized | The minimal catalog contract reports these capabilities as unavailable |
| Harvest and transactions | ❌ Not supported | The source is read-only |
| deck.gl rendering | Not applicable | Select a referenced visual service, then pass that service to SourceLayer |
Search a catalog
import {createDataSourceSync} from '@loaders.gl/core';
import {CSWLoader} from '@loaders.gl/ogc/wms';
const catalog = createDataSourceSync(cswUrl, [CSWLoader]);
const metadata = await catalog.getMetadata();
for await (const record of catalog.search()) {
console.log(record.title, record.references);
}
Discover referenced services
const services = await catalog.getServiceDirectory({includeUnknown: true});
// Each recognized entry includes a normalized type, base URL, and original query parameters.
const firstWms = services.find(service => service.type === 'ogc-wms-service');
The directory recognizes OGC:WMS, OGC:WMTS, and OGC:WFS reference schemes. Unknown schemes
can be retained for application-specific handling.
Request customization
Authentication headers and custom transports use standard fetch options. Operation-specific and vendor parameters can be supplied separately:
const records = await catalog.getRecords(
{version: '2.0.0', typenames: 'csw:Record'},
{outputSchema: 'http://www.isotc211.org/2005/gmd'}
);