Hierarchy

  • CustomWxTilesLayer

Implements

  • CustomLayerInterface

Constructors

  • CustomWxTilesLayer constructor.

    Parameters

    • id: string

      The ID of the custom layer.

    • sourceID: string

      The ID of the source for the custom layer.

    • Optional opacity: number = 1

      The opacity of the custom layer.

    Returns CustomWxTilesLayer

Properties

id: string

The ID of the custom layer.

opacity: number = 1

The opacity of the custom layer.

renderingMode: "2d" | "3d" = '2d'
sourceID: string

The ID of the source for the custom layer.

type: "custom" = 'custom'

Methods

  • Checks if the noise texture needs to be created or updated based on the given power value. If the power value is the same as the current noise texture power value and the noise texture already exists, this method does nothing. Otherwise, it deletes the current noise texture, creates a new one with the given power value, and updates the noise texture power value.

    Returns

    Parameters

    • gl: WebGLRenderingContext

      The WebGL rendering context.

    • pow: number

      The power value to check against the current noise texture power value.

    Returns void

  • This method is called when the custom layer is added to the map. It sets up the WebGL program, attributes, and uniforms needed for rendering, and adds the source ID to the map style for MapBox internal pipeline and caching.

    Returns

    Parameters

    • map: any

      The map object.

    • gl: WebGLRenderingContext

      The WebGL rendering context.

    Returns void

  • This method is called when the custom layer is removed from the map. It removes the reference to the source from the map style, deletes WebGL resources, and deletes VAOs for all segments for this layer.

    Returns

    Parameters

    • map: any

      The map object.

    • gl: WebGLRenderingContext

      The WebGL rendering context.

    Returns void

  • Renders the custom layer on the map using the provided WebGL rendering context.

    Parameters

    • gl: WebGLRenderingContext

      The WebGL rendering context to use for rendering the layer.

    Returns void

Generated using TypeDoc