XYZ Maps Documentation
    Preparing search index...

    TileLayer

    Hierarchy (View Summary)

    Index
    id: string

    The identifier of the Layer.

    max: number

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

    min: number

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

    name: string = ''

    The name of the Layer

    • Checks whether the xyz-maps tile layer is currently visible.

      Returns boolean

      • Returns true if the layer is visible, otherwise false.
      if (layer.isVisible()) {
      console.log("Layer is visible");
      } else {
      console.log("Layer is not visible");
      }
    • Checks whether the xyz-maps tile layer is currently visible.

      Parameters

      • OptionalzoomLevel: number

      Returns boolean

      • Returns true if the layer is visible, otherwise false.
      if (layer.isVisible()) {
      console.log("Layer is visible");
      } else {
      console.log("Layer is not visible");
      }
    • Sets the visibility of the Layer.

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

      Parameters

      • OptionalisVisible: boolean

        A boolean value indicating whether the tile layer should be visible (true) or hidden (false).

      Returns void

      • The current visibility state of the tile layer.
      // Create a new tile layer
      let tileLayer = new XYZMapsTileLayer();

      // Hide the tile layer
      tileLayer.visible(false);

      // Show the tile layer
      tileLayer.visible(true);