Class ColorLayer<UserData>

A layer that produces color images, such as vector data, or satellite imagery.

Type Parameters

Hierarchy (view full)




backgroundColor: Color
colorMap: ColorMap

The colormap of this layer

computeMinMax: boolean
disposed: boolean
extent: Extent

The extent of this layer

frozen: boolean = false

Disables automatic updates of this layer. Useful for debugging purposes.

id: string

The unique identifier of this layer.

interpretation: Interpretation
isColorLayer: boolean = true

Read-only flag to check if a given object is of type ColorLayer.

isLayer: boolean = true

Read-only flag to check if a given object is of type Layer.

isPickableFeatures: true = true
name: string

Optional name of this layer.

noDataOptions: NoDataOptions
resolutionFactor: number

The resolution factor applied to the textures generated by this layer.

showEmptyTextures: boolean
showTileBorders: boolean
source: ImageSource

The source of this layer

type: string
userData: UserData

An object that can be used to store custom data about the Layer.


  • get composer(): Readonly<LayerComposer>
  • Returns Readonly<LayerComposer>

  • get loading(): boolean
  • Gets whether the object is currently performing an asynchronous operation.

    Returns boolean

  • get progress(): number
  • Returns the percentage of progress, in normalized value (i.e in the [0, 1] range), of the asynchronous operations that are scheduled to run on this object. 1 means that all operations have finished.

    Returns number

  • get visible(): boolean
  • Gets or sets the visibility of this layer.

    Returns boolean

  • set visible(v): void
  • Parameters

    • v: boolean

    Returns void


  • Adjusts the extent to avoid visual artifacts.


    • originalExtent: Extent

      The original extent.

    • originalWidth: number

      The width, in pixels, of the original extent.

    • originalHeight: number

      The height, in pixels, of the original extent.

    Returns {
        extent: Extent;
        height: number;
        width: number;

    And object containing the adjusted extent, as well as adjusted pixel size.

    • extent: Extent
    • height: number
    • width: number
  • Parameters

    • extent: Extent

      The extent to test.

    Returns boolean

    true if this layer contains the specified extent, false otherwise.

  • Returns the final extent of this layer. If this layer has its own extent defined, this will be used. Otherwise, will return the source extent (if any). May return undefined if not pre-processed yet.

    Returns Extent

    The layer final extent.

  • Returns all features at some coordinates, with an optional hit tolerance radius.


    • coordinate: Coordinates


    • Optional options: {
          radius?: number;
          xTileRes?: number;
          yTileRes?: number;


      • Optional radius?: number

        Radius in pixels. Pixels inside the radius around the given coordinates will be checked for features.

      • Optional xTileRes?: number

        Tile resolution (m/px) - only required if radius is greater than 0

      • Optional yTileRes?: number

        Tile resolution (m/px) - only required if radius is greater than 0

    Returns Feature<Geometry>[]

    Array of features at coordinates (can be empty)

  • Get all features whose bounding box intersects the provided extent. Note that this returns an array of all features intersecting the given extent in random order (so it may include features whose geometries do not intersect the extent).


    Returns Feature<Geometry>[]

    Array of features intersecting the extent (can be empty)

  • Updates the provided node with content from this layer.


    • context: Context

      the context

    • node: Node

      the node to update

    Returns void