Class Layers
- java.lang.Object
-
- org.openstreetmap.josm.data.imagery.vectortile.mapbox.style.Layers
-
public class Layers extends Object
Mapbox style layers- Since:
- 17862
- See Also:
- https://docs.mapbox.com/mapbox-gl-js/style-spec/layers/
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description (package private) static class
Layers.Type
The layer type.
-
Field Summary
Fields Modifier and Type Field Description private static Pattern
CURLY_BRACES
private static String
EMPTY_STRING
private Expression
filter
An optional expressionprivate String
id
A required unique layer nameprivate int
maxZoom
The max zoom for the layerprivate int
minZoom
The min zoom for the layerprivate String
paint
Default paint properties for this layerprivate static String
PAINT
private static char
SEMI_COLON
private String
source
A source description to be used with this layer.private String
sourceLayer
Layer to use from the vector tile source.private String
styleId
The id for the style -- used for image pathsprivate Layers.Type
type
The required type
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
equals(Object other)
Expression
getFilter()
Get the filter for this layerString
getId()
Get the unique id for this layerString
getSource()
Get the source that this applies toString
getSourceLayer()
Get the layer that this applies toLayers.Type
getType()
Get the type of this layerint
hashCode()
private static String
parsePaintBackground(javax.json.JsonObject paintObject)
private static String
parsePaintCircle(javax.json.JsonObject paintObject)
private static String
parsePaintFill(javax.json.JsonObject paintObject)
private static String
parsePaintLine(javax.json.JsonObject layoutObject, javax.json.JsonObject paintObject)
private String
parsePaintSymbol(javax.json.JsonObject layoutObject, javax.json.JsonObject paintObject)
String
toString()
Converts this layer object to a mapcss entry string (to be parsed later)
-
-
-
Field Detail
-
EMPTY_STRING
private static final String EMPTY_STRING
- See Also:
- Constant Field Values
-
SEMI_COLON
private static final char SEMI_COLON
- See Also:
- Constant Field Values
-
CURLY_BRACES
private static final Pattern CURLY_BRACES
-
PAINT
private static final String PAINT
- See Also:
- Constant Field Values
-
type
private final Layers.Type type
The required type
-
filter
private final Expression filter
An optional expression
-
maxZoom
private final int maxZoom
The max zoom for the layer
-
minZoom
private final int minZoom
The min zoom for the layer
-
source
private final String source
A source description to be used with this layer. Required for everything butLayers.Type.BACKGROUND
-
sourceLayer
private final String sourceLayer
Layer to use from the vector tile source. Only allowed withSourceType.VECTOR
.
-
-
Constructor Detail
-
Layers
public Layers(javax.json.JsonObject layerInfo)
Create a layer object- Parameters:
layerInfo
- The info to use to create the layer
-
-
Method Detail
-
getFilter
public Expression getFilter()
Get the filter for this layer- Returns:
- The filter
-
getType
public Layers.Type getType()
Get the type of this layer- Returns:
- The layer type
-
parsePaintLine
private static String parsePaintLine(javax.json.JsonObject layoutObject, javax.json.JsonObject paintObject)
-
parsePaintCircle
private static String parsePaintCircle(javax.json.JsonObject paintObject)
-
parsePaintSymbol
private String parsePaintSymbol(javax.json.JsonObject layoutObject, javax.json.JsonObject paintObject)
-
parsePaintBackground
private static String parsePaintBackground(javax.json.JsonObject paintObject)
-
parsePaintFill
private static String parsePaintFill(javax.json.JsonObject paintObject)
-
toString
public String toString()
Converts this layer object to a mapcss entry string (to be parsed later)
-
getSourceLayer
public String getSourceLayer()
Get the layer that this applies to- Returns:
- The layer name
-
-