Class DefaultLayer
- java.lang.Object
-
- org.openstreetmap.josm.data.imagery.DefaultLayer
-
public class DefaultLayer extends java.lang.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 Summary
Fields Modifier and Type Field Description private java.lang.String
layerName
private java.lang.String
style
private java.lang.String
tileMatrixSet
-
Constructor Summary
Constructors Constructor Description DefaultLayer(ImageryInfo.ImageryType imageryType, java.lang.String layerName, java.lang.String style, java.lang.String tileMatrixSet)
Constructor
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static DefaultLayer
fromJson(jakarta.json.JsonObject o, ImageryInfo.ImageryType type)
Factory method creating DefaultLayer from JSON objectsjava.lang.String
getLayerName()
Returns layer name of the default layer.java.lang.String
getStyle()
Returns style for this WMS / WMTS layer to use.java.lang.String
getTileMatrixSet()
Returns default tileMatrixSet.jakarta.json.JsonObject
toJson()
Returns JSON representation of the default layer object.
-
-
-
Field Detail
-
layerName
private final java.lang.String layerName
-
tileMatrixSet
private final java.lang.String tileMatrixSet
-
style
private final java.lang.String style
-
-
Constructor Detail
-
DefaultLayer
public DefaultLayer(ImageryInfo.ImageryType imageryType, java.lang.String layerName, java.lang.String style, java.lang.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 java.lang.String getLayerName()
Returns layer name of the default layer.- Returns:
- layer name of the default layer
-
getTileMatrixSet
public java.lang.String getTileMatrixSet()
Returns default tileMatrixSet. Only usable for WMTS- Returns:
- default tileMatrixSet. Only usable for WMTS
-
getStyle
public java.lang.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 objecttype
- of ImageryType serialized- Returns:
- DefaultLayer instance based on JSON object
-
-