Skip to content

geo.map.layer

19 functions / 21 types

Index

FunctionDescription
addArcgisLayerAdd a layer from the tile cache of an ArcGIS MapServer or ImageServer.
addServiceLayerAdd a discovered dataset to a map without fetching service metadata again. Returns an independent map-layer UUID. Service credentials apply to its tile requests.
addWmtsLayerAdd a layer of a WMTS service, read from its capabilities document.
addXyzLayerAdd a layer of slippy map tiles named by a URL template.
getColorRead the color an imagery layer’s own tiles hold at a place, from the tiles the map has loaded.
getFeatureInfoAsk each layer’s service what it holds at a place, through the service’s GetFeatureInfo.
getLayersList the map’s layers in draw order: imagery bottom first, then elevation bottom first.
moveDownExecute the moveDown statement.
moveUpExecute the moveUp statement.
removeAllTake every layer off the map. The map stays, and the cameras stay on it, over a bare globe or flat map.
removeLayerTake a layer off the map. The map keeps drawing every other layer without fetching them again.
setAuthReplace the credentials a layer sends with its source’s document request and every tile request. The map reads the layer’s source again with the new credentials.
setEmissionDraw an imagery layer as light it gives off, or as ground the sun lights again.
setIndexMove a layer to another place among the layers of its role, and list every layer.
setOpacitySet how opaque an imagery layer draws over the layers under it.
setPlaceholderDetectionEnable or disable placeholder tile detection for one service layer.
setTimePin a layer with a time axis to one date, or let it follow the scene clock again.
setTransparentColorDraw one color of an imagery layer clear, or draw every color again.
setVisibleShow or hide a layer. A hidden layer stops fetching, and the layers under it show through.
TypeDescription
ColorEncodingWhat the color values of an imagery layer’s pixels stand for.
ElevationEncodingHow an elevation tile stores its heights.
ElevationOptionsHow an elevation layer decodes and interprets its samples.
ElevationSamplesWhere a tile’s height samples sit.
FeatureInfoWhat one layer’s service answered about a place, as geo.map.layer.get_feature_info reports it.
FollowClock
GeoBoundsA box in degrees of longitude and latitude. west is greater than east for a box that crosses the antimeridian.
KeyValueOne name and value pair.
LayerColorThe color an imagery layer’s own tiles hold at a place.
LayerColorSampleWhat geo.map.layer.get_color found for one imagery layer at a place.
LayerDatesThe dates a layer with a time axis offers, and the one it shows.
LayerIdA map-owned layer’s stable UUID, independent of its provider identifier and draw order.
LayerInfoOne layer of the map.
LayerRoleWhat a layer gives the map.
LayerStateWhether the map has read a layer’s source and can draw it.
NotCoveredThe layer serves no tile at the place.
NotLoadedThe layer serves the place, but no tile over it has loaded at any level.
ResamplingHow an imagery layer’s pixels are read between their centers.
TileAuthCredentials a layer sends with every request it makes.
TimeSelectionSelect dataset time independently of the viewport’s sunlight configuration.
TransparentColorA color an imagery layer draws clear, for a service that fills the ground it has no data for with a solid color, as a JPEG service must.

addArcgisLayer

addArcgisLayer(args: { attribution?: string; auth?: GeoMapLayerTileAuth; blackPoint?: number; colorEncoding?: GeoMapLayerColorEncoding; detectPlaceholders?: boolean; elevation?: GeoMapLayerElevationOptions; emission?: number; knownPlaceholderHashes?: Array<string>; map: SceneNode; name?: string; opacity?: number; publicationDelaySeconds?: number; resampling?: GeoMapLayerResampling; role?: GeoMapLayerLayerRole; serviceUrl: string }, transactionId?: string): Promise<GeoMapLayerLayerId>

Add a layer from the tile cache of an ArcGIS MapServer or ImageServer.

The service describes its own grid and levels. An elevation service that serves LERC is read as LERC with corner samples unless elevation says otherwise. The layer goes on top of the layers of its role, and the map reads the service once the layer is added.

Returns the layer UUID before reading the source. Poll geo.map.layer.get_layers for its state and error. A service that cannot be reached or read leaves the saved layer in Failed. Fails when map does not name a map.

Returns: A map-owned layer’s stable UUID, independent of its provider identifier and draw order.

Returns Promise<GeoMapLayerLayerId>.

attribution optional : string

The credit the tiles ask for. Absent, the one the service states, if any.

auth optional : GeoMapLayerTileAuth

Credentials of your own, sent with the service request and every tile request.

blackPoint optional : number

The linear luminance, from 0 up to but not including 1, at or below which a pixel of emissive imagery gives off no light. A brighter pixel gives off light in proportion to its luminance above the black point, so a full white pixel still gives off the whole emission. Absent, 0.

colorEncoding optional : GeoMapLayerColorEncoding

What the imagery’s pixel values stand for. Absent, sRGB color. Elevation layers ignore it.

detectPlaceholders optional : boolean

Enables placeholder tile detection. Absent, enabled. Detection can reject valid repeated tiles; disable it for services that intentionally repeat imagery or heights.

elevation optional : GeoMapLayerElevationOptions

What the heights mean, for an elevation layer.

emission optional : number

The radiance, in candela per square meter, of a full white pixel of imagery whose color is light it gives off, which is added to the lit ground so it shows where no sun falls. Absent or 0, the sun lights the layer. Elevation layers ignore it.

knownPlaceholderHashes optional : Array<string>

Encoded missing-data tile hashes, each written as fnv1a64: and 16 hex digits.

map : SceneNode

The node geo.map.spawn_map answered for the map.

name optional : string

The name the layer is listed under. Absent, the name the service gives itself.

opacity optional : number

From 0, invisible, to 1, opaque. Absent, 1. Elevation layers ignore it.

publicationDelaySeconds optional : number

Optional publication delay for clock-following dataset selections, in seconds.

resampling optional : GeoMapLayerResampling

How the imagery’s pixels are read between their centers. Absent, bilinear. Elevation layers ignore it.

role optional : GeoMapLayerLayerRole

Absent, imagery.

serviceUrl : string

The service URL, ending in MapServer or ImageServer.

transactionId optional : string

addServiceLayer

addServiceLayer(args: { attribution?: string; blackPoint?: number; colorEncoding?: GeoMapLayerColorEncoding; detectPlaceholders?: boolean; elevation?: GeoMapLayerElevationOptions; emission?: number; finestLevel?: number; knownPlaceholderHashes?: Array<string>; layer: GeoServiceLayerId; map: SceneNode; name?: string; opacity?: number; publicationDelaySeconds?: number; resampling?: GeoMapLayerResampling; role?: GeoMapLayerLayerRole; selection?: GeoServiceLayerSelection }, transactionId?: string): Promise<GeoMapLayerLayerId>

Add a discovered dataset to a map without fetching service metadata again. Returns an independent map-layer UUID. Service credentials apply to its tile requests.

Returns the layer UUID before the map builds the layer. Poll geo.map.layer.get_layers for its state and error. A dataset the map cannot draw, such as one whose tile matrix sets are all in a coordinate reference system the engine does not hold, leaves the saved layer in Failed, and it draws once geo.crs.register registers that system. Fails when map does not name a map, or the service or dataset does not exist.

Returns: A map-owned layer’s stable UUID, independent of its provider identifier and draw order.

Returns Promise<GeoMapLayerLayerId>.

attribution optional : string

blackPoint optional : number

colorEncoding optional : GeoMapLayerColorEncoding

detectPlaceholders optional : boolean

elevation optional : GeoMapLayerElevationOptions

emission optional : number

finestLevel optional : number

knownPlaceholderHashes optional : Array<string>

Encoded missing-data tile hashes, each written as fnv1a64: and 16 hex digits.

map : SceneNode

name optional : string

opacity optional : number

publicationDelaySeconds optional : number

resampling optional : GeoMapLayerResampling

role optional : GeoMapLayerLayerRole

selection optional : GeoServiceLayerSelection

transactionId optional : string

addWmtsLayer

addWmtsLayer(args: { attribution?: string; auth?: GeoMapLayerTileAuth; blackPoint?: number; capabilitiesUrl: string; colorEncoding?: GeoMapLayerColorEncoding; detectPlaceholders?: boolean; elevation?: GeoMapLayerElevationOptions; emission?: number; finestLevel?: number; format?: GeoMediaType; knownPlaceholderHashes?: Array<string>; map: SceneNode; name?: string; opacity?: number; providerLayerId?: GeoProviderLayerId; publicationDelaySeconds?: number; resampling?: GeoMapLayerResampling; role?: GeoMapLayerLayerRole; styleId?: GeoStyleId; tileMatrixSetId?: GeoTileMatrixSetId }, transactionId?: string): Promise<GeoMapLayerLayerId>

Add a layer of a WMTS service, read from its capabilities document.

The layer goes on top of the layers of its role. The map reads the document once the layer is added, and a document read before with the same credentials, such as by geo.catalog.get_wmts_layers, is not fetched again. A layer with a time axis follows the scene clock until geo.map.layer.set_time pins it to a date.

Returns the layer UUID before reading the source. Poll geo.map.layer.get_layers for its state and error. A document that cannot be reached or read, or that does not declare the layer, leaves the saved layer in Failed. Fails when map does not name a map.

Returns: A map-owned layer’s stable UUID, independent of its provider identifier and draw order.

Returns Promise<GeoMapLayerLayerId>.

attribution optional : string

The credit the tiles ask for, since a capabilities document has no field for one.

auth optional : GeoMapLayerTileAuth

Credentials of your own, sent with the capabilities request and every tile request.

blackPoint optional : number

The linear luminance, from 0 up to but not including 1, at or below which a pixel of emissive imagery gives off no light. A brighter pixel gives off light in proportion to its luminance above the black point, so a full white pixel still gives off the whole emission. Absent, 0.

capabilitiesUrl : string

The URL of the service’s capabilities document.

colorEncoding optional : GeoMapLayerColorEncoding

What the imagery’s pixel values stand for. Absent, sRGB color. Elevation layers ignore it.

detectPlaceholders optional : boolean

Enables placeholder tile detection. Absent, enabled. Detection can reject valid repeated tiles; disable it for services that intentionally repeat imagery or heights.

elevation optional : GeoMapLayerElevationOptions

What the heights mean. Needed when role is elevation, unless the layer’s format is LERC or its name says Terrarium or Terrain-RGB.

emission optional : number

The radiance, in candela per square meter, of a full white pixel of imagery whose color is light it gives off, which is added to the lit ground so it shows where no sun falls. Absent or 0, the sun lights the layer. Elevation layers ignore it.

finestLevel optional : number

The deepest level to fetch, for a service that serves deeper levels only as this one enlarged. The map enlarges it itself, smoothly and without fetching more. Absent, every level the layer declares.

format optional : GeoMediaType

The tile media type. Absent, the first one the layer offers that can be decoded, or for elevation the one that holds heights.

knownPlaceholderHashes optional : Array<string>

Encoded missing-data tile hashes, each written as fnv1a64: and 16 hex digits.

map : SceneNode

The node geo.map.spawn_map answered for the map.

name optional : string

The name the layer is listed under. Absent, the title the service gives it.

opacity optional : number

From 0, invisible, to 1, opaque. Absent, 1. Elevation layers ignore it.

providerLayerId optional : GeoProviderLayerId

The identifier of the layer to draw. Absent, the layer the service opens on.

publicationDelaySeconds optional : number

Optional publication delay for clock-following dataset selections, in seconds.

resampling optional : GeoMapLayerResampling

How the imagery’s pixels are read between their centers. Absent, bilinear. Elevation layers ignore it.

role optional : GeoMapLayerLayerRole

Absent, imagery.

styleId optional : GeoStyleId

Absent, the layer’s default style.

tileMatrixSetId optional : GeoTileMatrixSetId

The tile matrix set to draw on. Absent, the first one the layer links that can be drawn.

transactionId optional : string

addXyzLayer

addXyzLayer(args: { attribution?: string; auth?: GeoMapLayerTileAuth; blackPoint?: number; colorEncoding?: GeoMapLayerColorEncoding; detectPlaceholders?: boolean; elevation?: GeoMapLayerElevationOptions; emission?: number; knownPlaceholderHashes?: Array<string>; map: SceneNode; maxZoom?: number; minZoom?: number; name?: string; opacity?: number; publicationDelaySeconds?: number; resampling?: GeoMapLayerResampling; role?: GeoMapLayerLayerRole; subdomains?: Array<string>; template: GeoTileUrlTemplate; tileSize?: number }, transactionId?: string): Promise<GeoMapLayerLayerId>

Add a layer of slippy map tiles named by a URL template.

The template holds {z}, {x} and {y}, and the tiles are taken to be on the Web Mercator quad with row 0 at the top, which is the grid that form describes. The layer goes on top of the layers of its role.

Returns the layer UUID. Poll geo.map.layer.get_layers for source configuration failures. Ready means the configuration was accepted, not that tiles were fetched. A template that answers nothing shows missing tiles and can still report Ready.

Returns: A map-owned layer’s stable UUID, independent of its provider identifier and draw order.

Returns Promise<GeoMapLayerLayerId>.

attribution optional : string

The credit the tiles ask for.

auth optional : GeoMapLayerTileAuth

Credentials of your own, sent with every tile request.

blackPoint optional : number

The linear luminance, from 0 up to but not including 1, at or below which a pixel of emissive imagery gives off no light. A brighter pixel gives off light in proportion to its luminance above the black point, so a full white pixel still gives off the whole emission. Absent, 0.

colorEncoding optional : GeoMapLayerColorEncoding

What the imagery’s pixel values stand for. Absent, sRGB color. Elevation layers ignore it.

detectPlaceholders optional : boolean

Enables placeholder tile detection. Absent, enabled. Detection can reject valid repeated tiles; disable it for services that intentionally repeat imagery or heights.

elevation optional : GeoMapLayerElevationOptions

What the heights mean. Needed when role is elevation.

emission optional : number

The radiance, in candela per square meter, of a full white pixel of imagery whose color is light it gives off, which is added to the lit ground so it shows where no sun falls. Absent or 0, the sun lights the layer. Elevation layers ignore it.

knownPlaceholderHashes optional : Array<string>

Encoded missing-data tile hashes, each written as fnv1a64: and 16 hex digits.

map : SceneNode

The node geo.map.spawn_map answered for the map.

maxZoom optional : number

The deepest level served. Absent, 19.

minZoom optional : number

The coarsest level served. Absent, 0.

name optional : string

The name the layer is listed under. Absent, the host the template names.

opacity optional : number

From 0, invisible, to 1, opaque. Absent, 1. Elevation layers ignore it.

publicationDelaySeconds optional : number

Optional publication delay for clock-following dataset selections, in seconds.

resampling optional : GeoMapLayerResampling

How the imagery’s pixels are read between their centers. Absent, bilinear. Elevation layers ignore it.

role optional : GeoMapLayerLayerRole

Absent, imagery.

subdomains optional : Array<string>

Host labels used for {s}. Single-character ranges such as {a-c} need no list.

template : GeoTileUrlTemplate

The tile URL, with {z}, {x} and {y} where the level, column and row go.

tileSize optional : number

Pixels along a tile’s side. Absent, 256.

transactionId optional : string

getColor

getColor(args: { layerId: GeoMapLayerLayerId; map: SceneNode; position: GeoGeoPosition }, transactionId?: string): Promise<GeoMapLayerLayerColorSample>

Read the color an imagery layer’s own tiles hold at a place, from the tiles the map has loaded.

The color is the tile’s pixel as decoded, before the layer’s opacity, emission and transparent color, before light, and before the layers above and below it. So a categorical map, such as a geological map, answers one of the colors its legend lists, whether or not its service answers geo.map.layer.get_feature_info. The finest tile the layer serves at the place answers where it has loaded, and otherwise the nearest coarser tile that has, which a level less than finestLevel reports. Nothing is fetched and nothing the map draws changes.

Answers NotCovered where the layer serves no tile, and NotLoaded where no tile over the place has loaded yet, such as while the layer’s source is still being read. A hidden layer answers from the tiles it still holds. Fails when map is not a map, when layerId is not one of its layers, or when the layer is an elevation layer.

Returns: What geo.map.layer.get_color found for one imagery layer at a place.

Returns Promise<GeoMapLayerLayerColorSample>.

layerId : GeoMapLayerLayerId

The layer’s id from geo.map.layer.get_layers.

map : SceneNode

The node geo.map.spawn_map answered for the map.

position : GeoGeoPosition

transactionId optional : string

getFeatureInfo

getFeatureInfo(args: { map: SceneNode; position: GeoGeoPosition }, transactionId?: string): Promise<Array<GeoMapLayerFeatureInfo>>

Ask each layer’s service what it holds at a place, through the service’s GetFeatureInfo.

Only layers whose service declares GetFeatureInfo and that cover the place answer, so a map of plain tiles answers with an empty list. A layer whose service fails to answer is left out. The place must be on ground the map has loaded, and the answer is empty while the map morphs between the globe and the flat map. Fails when no map is spawned.

Returns Promise<Array<GeoMapLayerFeatureInfo>>.

map : SceneNode

The node geo.map.spawn_map answered for the map.

position : GeoGeoPosition

transactionId optional : string

getLayers

getLayers(args: { map: SceneNode }, transactionId?: string): Promise<Array<GeoMapLayerLayerInfo>>

List the map’s layers in draw order: imagery bottom first, then elevation bottom first.

Poll state after layer creation. Ready means the source is configured, not that every tile has loaded. Source configuration failures leave the layer saved with state set to Failed and the reason in error. Individual tile failures do not change the layer’s state.

Returns Promise<Array<GeoMapLayerLayerInfo>>.

map : SceneNode

The node geo.map.spawn_map answered for the map to list.

transactionId optional : string

moveDown

moveDown(args: { layerId: GeoMapLayerLayerId }, transactionId?: string): Promise<Array<GeoMapLayerLayerInfo>>

Execute the moveDown statement.

Returns Promise<Array<GeoMapLayerLayerInfo>>.

transactionId optional : string

moveUp

moveUp(args: { layerId: GeoMapLayerLayerId }, transactionId?: string): Promise<Array<GeoMapLayerLayerInfo>>

Execute the moveUp statement.

Returns Promise<Array<GeoMapLayerLayerInfo>>.

transactionId optional : string

removeAll

removeAll(args: { map: SceneNode }, transactionId?: string): Promise<void>

Take every layer off the map. The map stays, and the cameras stay on it, over a bare globe or flat map.

Returns Promise<void>.

map : SceneNode

The node geo.map.spawn_map answered for the map to clear.

transactionId optional : string

removeLayer

removeLayer(args: { layerId: GeoMapLayerLayerId }, transactionId?: string): Promise<void>

Take a layer off the map. The map keeps drawing every other layer without fetching them again.

Returns Promise<void>.

layerId : GeoMapLayerLayerId

The layer’s id from geo.map.layer.get_layers.

transactionId optional : string

setAuth

setAuth(args: { auth: GeoMapLayerTileAuth; layerId: GeoMapLayerLayerId }, transactionId?: string): Promise<GeoMapLayerLayerInfo>

Replace the credentials a layer sends with its source’s document request and every tile request. The map reads the layer’s source again with the new credentials.

Returns: One layer of the map.

Returns Promise<GeoMapLayerLayerInfo>.

auth : GeoMapLayerTileAuth

The credentials to send. Empty lists send none.

layerId : GeoMapLayerLayerId

The layer’s id from geo.map.layer.get_layers.

transactionId optional : string

setEmission

setEmission(args: { blackPoint?: number; emission?: number; layerId: GeoMapLayerLayerId }, transactionId?: string): Promise<GeoMapLayerLayerInfo>

Draw an imagery layer as light it gives off, or as ground the sun lights again.

An emissive layer’s color, times its radiance, is added to the lit ground rather than laid over it, so it shows where no sun falls and is lost beside ground in full daylight. It neither hides the layers under it nor is hidden by the ones above, and its opacity scales its light.

Returns: One layer of the map.

Returns Promise<GeoMapLayerLayerInfo>.

blackPoint optional : number

The linear luminance, from 0 up to but not including 1, at or below which a pixel gives off no light. A brighter pixel gives off light in proportion to its luminance above the black point, so a full white pixel still gives off the whole emission. Absent, 0.

emission optional : number

The radiance, in candela per square meter, of a full white pixel. Absent or 0, the sun lights the layer. Elevation layers ignore it.

layerId : GeoMapLayerLayerId

The layer’s id from geo.map.layer.get_layers.

transactionId optional : string

setIndex

setIndex(args: { index: number; layerId: GeoMapLayerLayerId }, transactionId?: string): Promise<Array<GeoMapLayerLayerInfo>>

Move a layer to another place among the layers of its role, and list every layer.

Imagery draws from the bottom up. The top elevation layer gives the ground its height wherever it has data.

Returns Promise<Array<GeoMapLayerLayerInfo>>.

index : number

The place among the layers of its role, 0 being the bottom. Past the top, the top.

layerId : GeoMapLayerLayerId

The layer’s id from geo.map.layer.get_layers.

transactionId optional : string

setOpacity

setOpacity(args: { layerId: GeoMapLayerLayerId; opacity: number }, transactionId?: string): Promise<GeoMapLayerLayerInfo>

Set how opaque an imagery layer draws over the layers under it.

Returns: One layer of the map.

Returns Promise<GeoMapLayerLayerInfo>.

layerId : GeoMapLayerLayerId

The layer’s id from geo.map.layer.get_layers.

opacity : number

From 0, invisible, to 1, opaque. Elevation layers ignore it.

transactionId optional : string

setPlaceholderDetection

setPlaceholderDetection(args: { enabled: boolean; layerId: GeoMapLayerLayerId }, transactionId?: string): Promise<GeoMapLayerLayerInfo>

Enable or disable placeholder tile detection for one service layer.

Enabled by default. Detection classifies repeated nonuniform tiles as placeholders and can reject valid repeated imagery or heights. Disabling it makes previously rejected tiles eligible for fetching again. HTTP missing responses and nodata samples retain their normal behavior.

Returns: One layer of the map.

Returns Promise<GeoMapLayerLayerInfo>.

enabled : boolean

transactionId optional : string

setTime

setTime(args: { layerId: GeoMapLayerLayerId; selection: GeoMapLayerTimeSelection }, transactionId?: string): Promise<GeoMapLayerLayerInfo>

Pin a layer with a time axis to one date, or let it follow the scene clock again.

Select the layer’s dataset time independently of sunlight.

The layer shows the latest advertised time at or before the selected instant, clamped to its available range. FollowClock uses the scene clock. Pinned requires an RFC 3339 timestamp with a UTC offset. A layer without a time axis retains the selection without changing tiles.

Returns: One layer of the map.

Returns Promise<GeoMapLayerLayerInfo>.

layerId : GeoMapLayerLayerId

The layer’s id from geo.map.layer.get_layers.

transactionId optional : string

setTransparentColor

setTransparentColor(args: { color?: ColorColorRgb; layerId: GeoMapLayerLayerId; tolerance?: number }, transactionId?: string): Promise<GeoMapLayerLayerInfo>

Draw one color of an imagery layer clear, or draw every color again.

This is for a service that fills the ground it has no data for with a solid color, as a JPEG service must, which otherwise hides every layer under the layer there. Pixels of the color draw clear and the layers under them show through. A layer with a transparent color never hides the layers under it, so they are always fetched and drawn. Where the map blends a pixel of the color with a pixel of data, as it does along the edge of the data and when the layer is seen from far away, the blend is kept, so a faint fringe of the color can show there. Elevation layers ignore it.

Returns: One layer of the map.

Returns Promise<GeoMapLayerLayerInfo>.

color optional : ColorColorRgb

The color to draw clear, as the layer’s pixels write it, with 8-bit channels (0 to 255), such as 255, 255, 255 for white. Absent, the layer draws every color again.

layerId : GeoMapLayerLayerId

The layer’s id from geo.map.layer.get_layers.

tolerance optional : number

How many 8-bit steps, from 0 to 255, each channel of a pixel may lie from color for the pixel to draw clear. A larger value clears more of the fill but also clears imagery close to its color. Absent, 4.

transactionId optional : string

setVisible

setVisible(args: { layerId: GeoMapLayerLayerId; visible: boolean }, transactionId?: string): Promise<GeoMapLayerLayerInfo>

Show or hide a layer. A hidden layer stops fetching, and the layers under it show through.

Returns: One layer of the map.

Returns Promise<GeoMapLayerLayerInfo>.

layerId : GeoMapLayerLayerId

The layer’s id from geo.map.layer.get_layers.

visible : boolean

transactionId optional : string

ColorEncoding

Enum

What the color values of an imagery layer’s pixels stand for.

Linear = 1

Values that rise in proportion to the light, as measured data such as a reflectance mosaic is often stretched to. A value from 0 to 255 stands for that share of full intensity.

Srgb = 0

sRGB encoded color, as photographs and drawn maps are published.

ElevationEncoding

Enum

How an elevation tile stores its heights.

Float32 = 3

Raw little endian 32 bit floats.

Lerc = 0

Esri’s LERC compression.

TerrainRgb = 1

Mapbox Terrain-RGB PNG.

Terrarium = 2

Terrarium PNG.

ElevationOptions

How an elevation layer decodes and interprets its samples.

datum optional : GeoVerticalDatum

What the heights are measured from. Required: a layer without it is refused with InvalidArgument, because a wrong guess places the terrain tens of meters off. When the source does not say, state your guess and set referenceAssumed.

encoding optional : GeoMapLayerElevationEncoding

How a tile stores its heights. Absent, the encoding the service declares; required for a service that declares none. An ArcGIS service that serves LERC is read as LERC whatever this says.

geoidModel optional : GeoGeoidModelId

The geoid the orthometric heights refer to. Orthometric heights without one cannot be placed, so the map refuses them.

referenceAssumed optional : boolean

Whether datum and geoidModel are your guess rather than what the source states. The heights are converted the same either way. Every height read from the layer reports the assumption. Absent, false.

samples optional : GeoMapLayerElevationSamples

Where the samples sit. Absent, LERC samples sit on the corners and every other encoding on the pixel centers.

unitScale optional : number

Multiplies every decoded height. Absent, one.

verticalCrs optional : GeoVerticalCrsId

verticalOffset optional : number

Added to every height after scaling, in meters. Absent, zero.

ElevationSamples

Enum

Where a tile’s height samples sit.

Centers = 1

At the pixel centers.

Corners = 0

On the tile corners, so neighboring tiles share their edge samples.

FeatureInfo

What one layer’s service answered about a place, as geo.map.layer.get_feature_info reports it.

body : string

The service’s answer, as text.

contentType : string

The media type the layer asks its service to answer in, such as text/html.

layer : string

The name the layer is listed under.

FollowClock

GeoBounds

A box in degrees of longitude and latitude. west is greater than east for a box that crosses the antimeridian.

east : number

north : number

south : number

west : number

KeyValue

One name and value pair.

key : string

value : string

LayerColor

The color an imagery layer’s own tiles hold at a place.

color : ColorColorRgba

The pixel of the tile under the place, as the tile was decoded: before the layer’s opacity, emission and transparent color, before light, and before the layers above and below it.

finestLevel : number

The finest level the layer serves at the place. A level less than this means the finer tile has not loaded and a coarser one answered.

level : number

The tile matrix level the pixel was read from, 0 being the coarsest.

LayerColorSample

type GeoMapLayerLayerColorSample = { kind: "color"; value: GeoMapLayerLayerColor } | { kind: "notCovered"; value: GeoMapLayerNotCovered } | { kind: "notLoaded"; value: GeoMapLayerNotLoaded }

What geo.map.layer.get_color found for one imagery layer at a place.

LayerDates

The dates a layer with a time axis offers, and the one it shows.

A layer that follows the clock shows the latest date its service offers at or before the clock’s time, held between first and last.

date optional : string

The date the layer shows, written as its service writes dates, such as 2024-06-12. Absent until the map has picked one.

first : string

The earliest date the service offers.

last : string

The latest date the service advertises.

step optional : string

The time between dates as an ISO 8601 duration, such as P1D for a daily layer. Absent when the service lists its dates one by one.

LayerId

A map-owned layer’s stable UUID, independent of its provider identifier and draw order.

uuid : string

LayerInfo

One layer of the map.

area optional : GeoMapLayerGeoBounds

The ground the layer covers, as its source declares it or else as its tile grid reaches. Absent until state is ready, and absent when the area covers three quarters or more of the body’s surface, which counts as the whole body. Also absent when the layer’s grid cannot be placed in longitude and latitude.

attribution optional : string

The credit the source asks for, where it states one.

blackPoint optional : number

The linear luminance at or below which a pixel of an emissive imagery layer gives off no light, as geo.map.layer.set_emission sets it. Absent for a layer that is not emissive.

dates optional : GeoMapLayerLayerDates

The dates the layer can show and the one it shows, for a layer whose source has been read and declares a time axis.

detectPlaceholders : boolean

Whether repeated nonuniform tiles can be classified as placeholders.

elevationReference optional : GeoElevationReference

emission optional : number

The radiance, in candela per square meter, of a full white pixel of an emissive imagery layer, as geo.map.layer.set_emission sets it. Absent, the sun and sky light the layer.

error optional : string

Why source configuration failed, when state is failed.

layerId : GeoMapLayerLayerId

The handle the geo.map.layer statements take. It stays the same for the life of the layer, and no other layer of the map ever gets it.

legendUrl optional : string

The URL of the legend image a WMTS service publishes for the style the layer draws, as the service’s capabilities document writes it. Absent when the service publishes none, and for sources other than WMTS.

name : string

The name given when the layer was spawned, or else the name its source gives it once the source has been read.

opacity : number

From 0, invisible, to 1, opaque. Elevation layers always report 1.

source : string

The service URL or tile template the layer was spawned from.

time : GeoMapLayerTimeSelection

The requested time selection. dates.date reports the provider’s selected dataset value.

transparentColor optional : GeoMapLayerTransparentColor

The color an imagery layer draws clear, as geo.map.layer.set_transparent_color sets it. Absent, the layer draws every color it holds.

visible : boolean

LayerRole

Enum

What a layer gives the map.

Elevation = 1

Heights the ground is raised to. The top elevation layer wins where it has data.

Imagery = 0

Colors drawn on the ground. Imagery layers draw from the bottom up.

LayerState

Enum

Whether the map has read a layer’s source and can draw it.

Failed = 2

The source could not be read or converted to the map’s elevation reference. The layer stays saved and is read again when the project is next loaded or the layer’s source or credentials change.

Loading = 0

Source configuration has not finished.

Ready = 1

The source is configured. Individual tiles can still be missing or loading.

NotCovered

The layer serves no tile at the place.

NotLoaded

The layer serves the place, but no tile over it has loaded at any level.

Resampling

Enum

How an imagery layer’s pixels are read between their centers.

Bilinear = 0

Blends the four nearest pixels, for pictures and measured values.

Nearest = 1

Takes the nearest pixel, for class codes such as land cover, where a blend of two codes would be a third code that is in neither pixel.

TileAuth

Credentials a layer sends with every request it makes.

Query pairs are appended to every request URL: the service document and every tile. Headers are sent on every request. A browser refuses some headers on a cross-origin request unless the service allows them, so a key is more likely to work as a query pair there. A layer’s credentials are saved with the project, values included.

headers optional : Array<GeoMapLayerKeyValue>

query optional : Array<GeoMapLayerKeyValue>

TimeSelection

type GeoMapLayerTimeSelection = { kind: "followClock"; value: GeoMapLayerFollowClock } | { kind: "pinned"; value: DatetimeTimestamp }

Select dataset time independently of the viewport’s sunlight configuration.

TransparentColor

A color an imagery layer draws clear, for a service that fills the ground it has no data for with a solid color, as a JPEG service must.

color : ColorColorRgb

The color as the layer’s pixels write it, with 8-bit channels (0 to 255).

tolerance : number

How many 8-bit steps each channel of a pixel may lie from color for the pixel to draw clear.