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
-
-
Constructor Summary
Constructors Constructor Description DefaultLayer(ImageryInfo.ImageryType imageryType, String layerName, String style, String tileMatrixSet)
Constructor
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static DefaultLayer
fromJson(javax.json.JsonObject o, ImageryInfo.ImageryType type)
Factory method creating DefaultLayer from JSON objectsString
getLayerName()
Returns layer name of the default layer.String
getStyle()
Returns style for this WMS / WMTS layer to use.String
getTileMatrixSet()
Returns default tileMatrixSet.javax.json.JsonObject
toJson()
Returns JSON representation of the default layer object.
-
-
-
Constructor Detail
-
DefaultLayer
public DefaultLayer(ImageryInfo.ImageryType imageryType, String layerName, String style, String tileMatrixSet)
Constructor- Parameters:
imageryType
- for which this layer is definedlayerName
- as returned by getIdentifier for WMTS and getName for WMSstyle
- of the layertileMatrixSet
- only for WMTS - tileMatrixSet to use
-
-
Method Detail
-
getLayerName
public String getLayerName()
Returns layer name of the default layer.- Returns:
- layer name of the default layer
-
getTileMatrixSet
public String 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 javax.json.JsonObject toJson()
Returns JSON representation of the default layer object.- Returns:
- JSON representation of the default layer object
-
fromJson
public static DefaultLayer fromJson(javax.json.JsonObject o, ImageryInfo.ImageryType type)
Factory method creating DefaultLayer from JSON objects- Parameters:
o
- serialized DefaultLayer objecttype
- of ImageryType serialized- Returns:
- DefaultLayer instance based on JSON object
-
-