public class BackgroundMBLayer extends MBLayer
MBLayer wrapper around a JSONObject
representation of a "background" type latyer. All
methods act as accessors on provided JSON layer, no other state is maintained. This allows
modifications to be made cleanly with out chance of side-effect.
MBLayer.Visibility
Constructor and Description |
---|
BackgroundMBLayer(JSONObject json) |
Modifier and Type | Method and Description |
---|---|
Expression |
backgroundColor()
Maps
getBackgroundColor() to an Expression . |
Expression |
backgroundOpacity()
Maps
getBackgroundOpacity() to an Expression . |
Expression |
backgroundPattern()
Maps
getBackgroundPattern() to an Expression . |
protected SemanticType |
defaultSemanticType()
Default
SemanticType to use when generating MBLayer.getFilter() . |
Color |
getBackgroundColor()
Optional color.
|
Number |
getBackgroundOpacity()
Optional number.
|
String |
getBackgroundPattern()
Optional string.
|
Fill |
getFill(MBStyle styleContext) |
String |
getType()
Rendering type of this layer.
|
boolean |
hasBackgroundPattern() |
List<FeatureTypeStyle> |
transformInternal(MBStyle styleContext)
Transform
BackgroundMBLayer to GeoTools FeatureTypeStyle. |
create, equals, filter, getFilter, getId, getJson, getLayout, getMaxZoom, getMetadata, getMinZoom, getPaint, getRef, getSource, getSourceLayer, getVisibility, hashCode, layout, paint, toString, transform, transform, visibility
protected SemanticType defaultSemanticType()
MBLayer
SemanticType
to use when generating MBLayer.getFilter()
.
Use ANY to match all geometry, or fill in LINE, POINT, POLYGON if needed.
public Color getBackgroundColor()
public Expression backgroundColor()
getBackgroundColor()
to an Expression
.
Optional color. Defaults to #000000. Disabled by background-pattern.
public String getBackgroundPattern()
public boolean hasBackgroundPattern()
public Expression backgroundPattern()
getBackgroundPattern()
to an Expression
.
Optional string. Name of image in sprite to use for drawing an image background. For seamless patterns, image width and height must be a factor of two (2, 4, 8, ..., 512).
public Number getBackgroundOpacity()
public Expression backgroundOpacity()
public List<FeatureTypeStyle> transformInternal(MBStyle styleContext)
BackgroundMBLayer
to GeoTools FeatureTypeStyle.transformInternal
in class MBLayer
styleContext
- The MBStyle to which this layer belongs, used as a context for things
like resolving sprite and glyph names to full urls.Copyright © 1996–2023 Geotools. All rights reserved.