Skip to content

geo.catalog

2 functions / 7 types

Index

FunctionDescription
getServicePreviewFetch a representative tile without adding a map layer. Elevation previews contain shaded relief. Missing coverage returns no preview.
getWmtsLayersList every layer a WMTS service offers, in the order its capabilities document declares them.
TypeDescription
ArcgisPreviewSource
PreviewSource
PreviewTileOne tile that shows a layer source at a glance, as geo.catalog.get_service_preview answers it.
ServiceLayerOne layer a WMTS service offers, as geo.catalog.get_wmts_layers lists it.
UvRectA rectangle inside an image, in fractions of the image’s width and height measured from its top-left corner.
WmtsPreviewSource
XyzPreviewSource

getServicePreview

getServicePreview(args: { auth?: GeoMapLayerTileAuth; source: GeoCatalogPreviewSource }, transactionId?: string): Promise<GeoCatalogPreviewTile | undefined>

Fetch a representative tile without adding a map layer. Elevation previews contain shaded relief. Missing coverage returns no preview.

Returns Promise<GeoCatalogPreviewTile | undefined>.

auth optional : GeoMapLayerTileAuth

transactionId optional : string

getWmtsLayers

getWmtsLayers(args: { auth?: GeoMapLayerTileAuth; capabilitiesUrl: string }, transactionId?: string): Promise<Array<GeoCatalogServiceLayer>>

List every layer a WMTS service offers, in the order its capabilities document declares them.

The document is read with auth and kept, so asking again, or spawning one of the layers with geo.map.layer.add_wmts_layer and the same credentials, does not fetch it again. This needs no map. Fails when the document cannot be reached or read.

Returns Promise<Array<GeoCatalogServiceLayer>>.

auth optional : GeoMapLayerTileAuth

Credentials of your own, sent with the capabilities request. They appear in each preview URL.

capabilitiesUrl : string

The URL of a WMTS capabilities document.

transactionId optional : string

ArcgisPreviewSource

elevation optional : GeoMapLayerElevationOptions

role optional : GeoMapLayerLayerRole

serviceUrl : string

PreviewSource

type GeoCatalogPreviewSource = { kind: "wmts"; value: GeoCatalogWmtsPreviewSource } | { kind: "arcgis"; value: GeoCatalogArcgisPreviewSource } | { kind: "xyz"; value: GeoCatalogXyzPreviewSource }

PreviewTile

One tile that shows a layer source at a glance, as geo.catalog.get_service_preview answers it.

content optional : GeoCatalogUvRect

The part of the tile the layer draws on, absent when it draws on the whole tile. Crop the image to it to show the layer without the empty part of the tile.

url : string

The tile’s address, with the credentials asked for applied, ready for an image element. For an elevation layer it is a data: URL holding the tile drawn as shaded relief.

ServiceLayer

One layer a WMTS service offers, as geo.catalog.get_wmts_layers lists it.

bounds optional : GeoMapLayerGeoBounds

The ground the layer covers, where the service declares it.

dates optional : GeoMapLayerLayerDates

The dates the layer offers, where it declares a time axis of dates. date is the one the preview tile shows, which is the one the layer opens on while the clock reads the present.

formats optional : Array<GeoMediaType>

The tile media types the layer offers.

hasTimeDimension : boolean

Whether the layer changes over time. Spawned, it follows the scene clock.

identifier : GeoProviderLayerId

The identifier geo.map.layer.add_wmts_layer takes as providerLayerId.

previewContent optional : GeoCatalogUvRect

The part of the preview tile the layer draws on, absent when it draws on the whole tile.

previewUrl optional : string

The address of one tile that shows the layer at a glance, absent when the layer has no such tile or holds heights.

role : GeoMapLayerLayerRole

Elevation when the layer’s tile formats or name say its tiles hold heights.

styles optional : Array<GeoStyleId>

The style identifiers the layer offers, the default first.

summary optional : string

The service’s description of the layer.

tileMatrixSets optional : Array<GeoTileMatrixSet>

The tile matrix sets the layer can be drawn on. A set the layer links to but the service does not declare is left out, because a layer cannot be spawned on it.

title : string

The title the service gives the layer, or the identifier where it gives none.

unavailableTileMatrixSets optional : Array<GeoUnavailableTileMatrixSet>

The tile matrix sets the layer links that cannot be drawn until their coordinate reference system is registered, each with the reason. A layer spawned with every set here is saved and reports Failed until a set’s system is registered.

UvRect

A rectangle inside an image, in fractions of the image’s width and height measured from its top-left corner.

height : number

width : number

x : number

y : number

WmtsPreviewSource

capabilitiesUrl : string

providerLayerId optional : GeoProviderLayerId

XyzPreviewSource

elevation optional : GeoMapLayerElevationOptions

maxZoom optional : number

role optional : GeoMapLayerLayerRole

subdomains optional : Array<string>

tileSize optional : number