API (v3.0.0-dev) - Giro3D
    Preparing search index...

    Class MaskLayer<UserData>

    A ColorLayer that can be used to mask parts of a map. The source can be any source supported by the color layers.

    Type Parameters

    Hierarchy (View Summary)

    Index

    Constructors

    Properties

    backgroundColor: Color
    colorMap: ColorMap | null = null

    The colormap of this layer

    computeMinMax: boolean
    extent: Extent | null = null

    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.

    isMaskLayer: boolean = true

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

    isMemoryUsage: true = ...

    Readonly flag to indicate that his object implements MemoryUsage.

    isPickableFeatures: true
    name: string | undefined

    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.

    Accessors

    • get blendingMode(): BlendingMode

      Gets or sets the blending mode of this layer.

      Returns BlendingMode

    • set blendingMode(v: BlendingMode): void

      Parameters

      Returns void

    • get brightness(): number

      Gets or sets the brightness of this layer.

      Returns number

    • set brightness(v: number): void

      Parameters

      • v: number

      Returns void

    • get contrast(): number

      Gets or sets the contrast of this layer.

      Returns number

    • set contrast(v: number): void

      Parameters

      • v: number

      Returns void

    • get elevationRange(): ElevationRange | null

      Gets the elevation range of this layer, if any.

      Returns ElevationRange | null

    • set elevationRange(range: ElevationRange | null): void

      Sets the elevation range of this layer. Setting it to null removes the elevation range.

      Parameters

      Returns void

    • get instance(): Instance

      Returns Instance

    • get loading(): boolean

      Gets whether the object is currently performing an asynchronous operation.

      Returns boolean

    • get maskMode(): MaskMode

      Gets or set the mask mode.

      Returns MaskMode

    • set maskMode(v: MaskMode): void

      Parameters

      Returns void

    • get opacity(): number

      Gets or sets the opacity of this layer.

      Returns number

    • set opacity(v: number): void

      Parameters

      • v: number

      Returns void

    • 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 ready(): boolean

      Returns boolean

    • get saturation(): number

      Gets or sets the saturation of this layer.

      Returns number

    • set saturation(v: number): void

      Parameters

      • v: number

      Returns void

    • get visible(): boolean

      Gets or sets the visibility of this layer.

      Returns boolean

    • set visible(v: boolean): void

      Parameters

      • v: boolean

      Returns void

    Methods

    • Adjusts the extent to avoid visual artifacts.

      Parameters

      • 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 GridExtent

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

    • Immediately applies a temporary texture to the target while the actual texture is being asynchronously processed, to avoid displaying a black texture.

      Parameters

      Returns void

    • Resets all render targets to a blank state and repaint all the targets.

      Parameters

      • Optionalextent: Extent

        An optional extent to limit the region to clear.

      Returns void

    • Parameters

      • extent: Extent

        The extent to test.

      Returns boolean

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

    • Disposes the layer. This releases all resources held by this layer.

      Returns void

    • 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 | undefined

      The layer final extent.

    • Get the pixels colors of this layer at coordinate. This will samples all pixel colors within a square region of specified size, centered at the given coordinate. Returns undefined if no non-transparent (colored) pixels are found, or if no texture is available for this coordinate.

      Note: only 8-bit layers are supported. If the layer has non 8-bit pixels, returns undefined.

      Parameters

      • params: { coordinates: Coordinates; size?: number }
        • coordinates: Coordinates

          The coordinate to sample.

        • Optionalsize?: number

          The size, in pixels, of the square to sample

          1
          

      Returns Color[] | undefined

      The colors

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

      Returns Feature<Geometry, { [x: string]: any }>[]

      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, { [x: string]: any }>[]

      Array of features intersecting the extent (can be empty)

    • Returns true if this layer has loaded data for this node.

      Parameters

      • nodeId: number

      Returns boolean

    • Called when the layer has finished initializing.

      Returns Promise<void>

    • Called when the rendering context has been lost.

      Returns void

    • Called when the rendering context has been restored.

      Returns void

    • Parameters

      • texture: Texture

      Returns void

    • Returns void

    • Updates the provided node with content from this layer.

      Parameters

      Returns void