Class CircleMBLayer
MBLayer wrapper around a JSONObject representation of a "circle" type layer. 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.
 
- get methods: access the json directly
- query methods: provide logic / transforms to GeoTools classes as required.
- Author:
- Reggie Beckwith (Boundless)
- 
Nested Class SummaryNested ClassesModifier and TypeClassDescriptionstatic enumControls the translation reference point.static enumControls the translation reference point.Nested classes/interfaces inherited from class MBLayerMBLayer.Visibility
- 
Field Summary
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionAccess circle-blur as literal or function expression, defaults to 0Access circle-color as literal or function expression, defaults to black.Access circle-opacity, defaults to 1.Access circle-radius as literal or function expression, defaults to 5Access circle-stroke-color as literal or function expression, defaults to black.Access circle-stroke-opacity, defaults to 1.Access circle-stroke-width, defaults to 0.Access circle-translateProcesses the filter-translate into a Displacement.protected SemanticType(Optional) Amount to blur the circle. 1 blurs the circle such that only the centerpoint is full opacity.(Optional) The fill color of the circle.(Optional) The opacity at which the circle will be drawn.(Optional) Controls the scaling behavior of the circle when the map is pitched.(Optional) Circle radius in pixels.(Optional) The stroke color of the circle.(Optional) The opacity of the circle's stroke.(Optional) The width of the circle's stroke.int[](Optional) The geometry's offset.(Optional) Controls the translation reference point.getType()Rendering type of this layer.transformInternal(MBStyle styleContext) TransformCircleMBLayerto GeoTools FeatureTypeStyle.Methods inherited from class MBLayercreate, equals, filter, getFilter, getId, getJson, getLayout, getMaxZoom, getMetadata, getMinZoom, getPaint, getRef, getSource, getSourceLayer, getVisibility, hashCode, layout, paint, toString, transform, transform, visibility
- 
Constructor Details- 
CircleMBLayerpublic CircleMBLayer(JSONObject json) 
 
- 
- 
Method Details- 
defaultSemanticType
- 
getCircleRadius(Optional) Circle radius in pixels. Defaults to 5.- Returns:
- The circle radius
- Throws:
- MBFormatException- JSON provided inconsistent with specificaiton
 
- 
circleRadiusAccess circle-radius as literal or function expression, defaults to 5- Returns:
- The circle radius as literal or function expression
- Throws:
- MBFormatException- JSON provided inconsistent with specificaiton
 
- 
getCircleColor(Optional) The fill color of the circle. Defaults to #000000.- Returns:
- The fill color of the circle
- Throws:
- MBFormatException- JSON provided inconsistent with specificaiton
 
- 
circleColorAccess circle-color as literal or function expression, defaults to black.- Returns:
- The circle color as literal or function expression
- Throws:
- MBFormatException- JSON provided inconsistent with specificaiton
 
- 
getCircleBlur(Optional) Amount to blur the circle. 1 blurs the circle such that only the centerpoint is full opacity. Defaults to 0.- Returns:
- The amount to blur the circle.
- Throws:
- MBFormatException- JSON provided inconsistent with specificaiton
 
- 
circleBlurAccess circle-blur as literal or function expression, defaults to 0- Returns:
- The amount to blur the circle, as literal or function expression
- Throws:
- MBFormatException- JSON provided inconsistent with specificaiton
 
- 
getCircleOpacity(Optional) The opacity at which the circle will be drawn. Defaults to 1.- Returns:
- The opacity at which the circle will be drawn.
- Throws:
- MBFormatException- JSON provided inconsistent with specificaiton
 
- 
circleOpacityAccess circle-opacity, defaults to 1.- Returns:
- The opacity at which the circle will be drawn as literal or function expression.
- Throws:
- MBFormatException- JSON provided inconsistent with specificaiton
 
- 
getCircleTranslate(Optional) The geometry's offset. Values are [x, y] where negatives indicate left and up, respectively. Units in pixels. Defaults to 0, 0.- Returns:
- x and y offset in pixels.
- Throws:
- MBFormatException- JSON provided inconsistent with specificaiton
 
- 
circleTranslateAccess circle-translate- Returns:
- x and y offset in pixels as Point
- Throws:
- MBFormatException- JSON provided inconsistent with specificaiton
 
- 
circleTranslateDisplacementProcesses the filter-translate into a Displacement.This should handle both literals and function stops: filter-translate: [0,0] filter-translate: { property: "building-height", "stops": [[0,[0,0]],[5,[1,2]]] } filter-translate: [ 0, { property: "building-height", "TYPE":"exponential","stops": [[0,0],[30, 5]] }- Returns:
- Displacement to offset symbol
 
- 
getCircleTranslateAnchor(Optional) Controls the translation reference point.CircleMBLayer.CircleTranslateAnchor.MAP: The circle is translated relative to the map.CircleMBLayer.CircleTranslateAnchor.VIEWPORT: The circle is translated relative to the viewport.Defaults to CircleMBLayer.CircleTranslateAnchor.MAP. Requires circle-translate.- Returns:
- The translation reference point.
 
- 
getCirclePitchScale(Optional) Controls the scaling behavior of the circle when the map is pitched.CircleMBLayer.CirclePitchScale.MAP: Circles are scaled according to their apparent distance to the camera.CircleMBLayer.CirclePitchScale.VIEWPORT: Circles are not scaled.Defaults to CircleMBLayer.CirclePitchScale.MAP.- Returns:
- The circle scaling behavior.
 
- 
getCircleStrokeWidth(Optional) The width of the circle's stroke. Strokes are placed outside of the circle-radius.Units in pixels. Defaults to 0. - Returns:
- The circle stroke width.
- Throws:
- MBFormatException- JSON provided inconsistent with specificaitonthrows
 
- 
circleStrokeWidthAccess circle-stroke-width, defaults to 0.- Returns:
- The circle stroke width.
- Throws:
- MBFormatException- JSON provided inconsistent with specificaiton
 
- 
getCircleStrokeColor(Optional) The stroke color of the circle.Defaults to #000000. - Returns:
- The color of the circle stroke.
- Throws:
- MBFormatException- JSON provided inconsistent with specificaiton
 
- 
circleStrokeColorAccess circle-stroke-color as literal or function expression, defaults to black.- Returns:
- The color of the circle stroke.
- Throws:
- MBFormatException- JSON provided inconsistent with specificaiton
 
- 
getCircleStrokeOpacity(Optional) The opacity of the circle's stroke.Defaults to 1. - Returns:
- Number representing the stroke opacity.
- Throws:
- MBFormatException- JSON provided inconsistent with specificaiton
 
- 
circleStrokeOpacityAccess circle-stroke-opacity, defaults to 1.- Returns:
- Number representing the stroke opacity.
- Throws:
- MBFormatException- JSON provided inconsistent with specification
 
- 
transformInternalTransformCircleMBLayerto GeoTools FeatureTypeStyle.- Specified by:
- transformInternalin class- MBLayer
- Parameters:
- styleContext- The MBStyle to which this layer belongs, used as a context for things like resolving sprite and glyph names to full urls.
- Returns:
- FeatureTypeStyle
 
- 
getTypeRendering type of this layer.
 
-