Options
All
  • Public
  • Public/Protected
  • All
Menu

Class Layer

TileLayer

Hierarchy

Index

Constructors

Properties

Methods

Constructors

constructor

Properties

Readonly id

id: string

The identifier of the Layer.

max

max: number

maximum zoom level at which data from the Layer will be displayed.

min

min: number

minimum zoom level at which data from the Layer is displayed.

name

name: string = ""

The name of the Layer

Methods

isVisible

  • isVisible(): boolean
  • Checks whether the xyz-maps tile layer is currently visible.

    example
    if (layer.isVisible()) {
      console.log("Layer is visible");
    } else {
      console.log("Layer is not visible");
    }
    

    Returns boolean

    • Returns true if the layer is visible, otherwise false.

setVisible

  • setVisible(isVisible?: boolean): void
  • Sets the visibility of the Layer.

    This function controls whether the tile layer is currently displayed or hidden.

    example
    // Create a new tile layer
    let tileLayer = new XYZMapsTileLayer();
    
    // Hide the tile layer
    tileLayer.visible(false);
    
    // Show the tile layer
    tileLayer.visible(true);
    

    Parameters

    • Optional isVisible: boolean

    Returns void

    • The current visibility state of the tile layer.

Generated using TypeDoc