Interface Layer

All Known Subinterfaces:
CanvasLayer
All Known Implementing Classes:
HeatMapLayer, ImageLayer, RasterLayer, TileLayer, VectorLayer, WMSTileLayer

public interface Layer
Base interface for a map's layer.

Layer is an abstraction that describes a data that will be displayed on a map. Layers are structural units of maps. Map is built by superposing multiple layers.

  • Method Summary

    Modifier and Type
    Method
    Description
     
    int
    Returns maximum layer zoom level.
    int
    Returns minimum layer zoom level.
    boolean
    Whether the layer is to be editable on a map.
    boolean
    Whether the layer is to be visible on a map.
    void
    Notify clients that the layer has changed and need to be redrawn.
    void
    setEditable(boolean editable)
    Sets whether the layer is to be editable on a map.
    void
    setMaxZoom(int maxZoom)
    Sets maximum zoom level up to which the layer is visible (inclusive).
    void
    setMinZoom(int minZoom)
    Sets minimum zoom level down to which the layer is visible (inclusive).
    void
    setVisible(boolean visible)
    Sets whether the layer should be visible on a map.
  • Method Details

    • getId

      Returns:
      ID of a layer
    • setVisible

      @StudioProperty(defaultValue="true") void setVisible(boolean visible)
      Sets whether the layer should be visible on a map.

      Default value: true.

      Parameters:
      visible - true/false
    • isVisible

      boolean isVisible()
      Whether the layer is to be visible on a map.
      Returns:
      true if the layer is set to be visible; otherwise false
    • setMaxZoom

      @StudioProperty void setMaxZoom(int maxZoom)
      Sets maximum zoom level up to which the layer is visible (inclusive).
      Parameters:
      maxZoom - maximum layer zoom level
    • getMaxZoom

      int getMaxZoom()
      Returns maximum layer zoom level.
      Returns:
      maximum layer zoom level
    • setMinZoom

      @StudioProperty void setMinZoom(int minZoom)
      Sets minimum zoom level down to which the layer is visible (inclusive).

      Default value: 0.

      Parameters:
      minZoom - minimum layer zoom level
    • getMinZoom

      int getMinZoom()
      Returns minimum layer zoom level.
      Returns:
      minimum layer zoom level
    • setEditable

      @StudioProperty void setEditable(boolean editable)
      Sets whether the layer is to be editable on a map.

      Default value: false.

      Parameters:
      editable - true/false
    • isEditable

      boolean isEditable()
      Whether the layer is to be editable on a map.
      Returns:
      true if the layer is set to be editable; otherwise false
    • refresh

      void refresh()
      Notify clients that the layer has changed and need to be redrawn.