Class DefaultLayer

java.lang.Object
org.openstreetmap.josm.data.imagery.DefaultLayer

public class DefaultLayer extends Object
Simple class representing default layer that might be set in imagery information This simple class is needed - as for WMS there is different information needed to specify layer than for WMTS
  • Field Details

  • Constructor Details

    • DefaultLayer

      public DefaultLayer(ImageryInfo.ImageryType imageryType, String layerName, String style, String tileMatrixSet)
      Constructor
      Parameters:
      imageryType - for which this layer is defined
      layerName - as returned by getIdentifier for WMTS and getName for WMS
      style - of the layer
      tileMatrixSet - only for WMTS - tileMatrixSet to use
  • Method Details

    • getLayerName

      public String getLayerName()
      Returns layer name of the default layer.
      Returns:
      layer name of the default layer
    • getTileMatrixSet

      Returns default tileMatrixSet. Only usable for WMTS
      Returns:
      default tileMatrixSet. Only usable for WMTS
    • getStyle

      public String getStyle()
      Returns style for this WMS / WMTS layer to use.
      Returns:
      style for this WMS / WMTS layer to use
    • toJson

      public jakarta.json.JsonObject toJson()
      Returns JSON representation of the default layer object.
      Returns:
      JSON representation of the default layer object
    • fromJson

      public static DefaultLayer fromJson(jakarta.json.JsonObject o, ImageryInfo.ImageryType type)
      Factory method creating DefaultLayer from JSON objects
      Parameters:
      o - serialized DefaultLayer object
      type - of ImageryType serialized
      Returns:
      DefaultLayer instance based on JSON object