Class WMSTileLayer

All Implemented Interfaces:
Layer, org.springframework.beans.factory.Aware, org.springframework.context.ApplicationContextAware

public class WMSTileLayer extends TileLayer
A class containing information about WMS service along with parameters needed for GetMap operation requests to download tiles.

For more information about parameters format see WMS reference.

To find out information about capabilities of a WMS service (for example, available layers) request GetCapabilities operation.

It is convenient to use software like QGIS for the purpose.

  • Field Details

    • SERVICE_NAME

      public static final String SERVICE_NAME
      See Also:
    • applicationContext

      protected org.springframework.context.ApplicationContext applicationContext
  • Constructor Details

    • WMSTileLayer

      public WMSTileLayer(String id)
    • WMSTileLayer

      public WMSTileLayer(String id, String url)
  • Method Details

    • getCrs

      public CRS getCrs()
      Returns CRS used in the WMS.
      Returns:
      CRS
    • setCrs

      public void setCrs(CRS crs)
      Sets CRS to be used in the WMS.
      Parameters:
      crs - CRS to be used in the WMS
    • getLayers

      public String getLayers()
      Returns layers to display on a map.
      Returns:
      a comma-separated list of layer names
    • setLayers

      @StudioProperty public void setLayers(String layers)
      Specifies layers to display on a map.

      To find out information about available layers of the WMS service, you can request GetCapabilities operation.

      It's easier to use software like QGIS for the purpose.

      Parameters:
      layers - String which is a comma-separated list of layer names
    • getStyles

      public String getStyles()
      Returns comma-separated list of WMS styles.
      Returns:
      String which is a comma-separated list of WMS styles
    • setStyles

      @StudioProperty public void setStyles(String styles)
      Sets styles in which layers are to be rendered.
      Parameters:
      styles - a comma-separated list of WMS styles
    • getFormat

      public String getFormat()
      Returns format for the map output.
      Returns:
      format for the map output
    • setFormat

      @StudioProperty public void setFormat(String format)
      Formats for the map output. See WMS output formats for supported values.
      Parameters:
      format - String parameter
    • isTransparent

      public boolean isTransparent()
      Whether the map background is transparent.
      Returns:
      true if the map background is transparent; false otherwise
    • setTransparent

      @StudioProperty public void setTransparent(boolean transparent)
      Sets whether the map background is to be transparent. Default value is false.
      Parameters:
      transparent - true/false
    • getVersion

      public String getVersion()
      Returns service version.
      Returns:
      service version
    • setVersion

      @StudioProperty(type=ENUMERATION, options={"1.0.0","1.1.0","1.1.1","1.3.0"}, defaultValue="1.1.1") public void setVersion(String version)
      Sets service version.

      Value is one of: 1.0.0, 1.1.0, 1.1.1, 1.3.0. Default value is 1.1.1.

      Parameters:
      version - String parameter
    • setApplicationContext

      public void setApplicationContext(org.springframework.context.ApplicationContext applicationContext) throws org.springframework.beans.BeansException
      Specified by:
      setApplicationContext in interface org.springframework.context.ApplicationContextAware
      Throws:
      org.springframework.beans.BeansException
    • getMaxZoom

      public int getMaxZoom()
      Description copied from interface: Layer
      Returns maximum layer zoom level.
      Specified by:
      getMaxZoom in interface Layer
      Returns:
      maximum layer zoom level
    • setMinZoom

      public void setMinZoom(int minZoom)
      Description copied from interface: Layer
      Sets minimum zoom level down to which the layer is visible (inclusive).

      Default value: 0.

      Specified by:
      setMinZoom in interface Layer
      Parameters:
      minZoom - minimum layer zoom level
    • getMinZoom

      public int getMinZoom()
      Description copied from interface: Layer
      Returns minimum layer zoom level.
      Specified by:
      getMinZoom in interface Layer
      Returns:
      minimum layer zoom level
    • getId

      public String getId()
      Specified by:
      getId in interface Layer
      Returns:
      ID of a layer
    • setVisible

      public void setVisible(boolean visible)
      Description copied from interface: Layer
      Sets whether the layer should be visible on a map.

      Default value: true.

      Specified by:
      setVisible in interface Layer
      Parameters:
      visible - true/false
    • isVisible

      public boolean isVisible()
      Description copied from interface: Layer
      Whether the layer is to be visible on a map.
      Specified by:
      isVisible in interface Layer
      Returns:
      true if the layer is set to be visible; otherwise false
    • setEditable

      public void setEditable(boolean editable)
      Description copied from interface: Layer
      Sets whether the layer is to be editable on a map.

      Default value: false.

      Specified by:
      setEditable in interface Layer
      Parameters:
      editable - true/false
    • isEditable

      public boolean isEditable()
      Description copied from interface: Layer
      Whether the layer is to be editable on a map.
      Specified by:
      isEditable in interface Layer
      Returns:
      true if the layer is set to be editable; otherwise false
    • fireLayerChangedEvent

      protected void fireLayerChangedEvent(LayerChangedEvent event)
    • refresh

      public void refresh()
      Description copied from interface: Layer
      Notify clients that the layer has changed and need to be redrawn.
      Specified by:
      refresh in interface Layer
    • toString

      public String toString()
      Overrides:
      toString in class Object