JS API
- Parameters
- Options
- Example
- Methods
- fitToBoundingBox
- getBoundingBox
- getInitialBoundingBox
- getLayers
- getMouseMode
- off
- on
- once
- refresh
- reset
- setMouseMode
- usingLayer
- usingNewLayer
- Events
- Parameters
- Example
- Methods
- addFeature
- addFeatureCollection
- bringForwards
- bufferGeometry
- changeProperties
- clearFilters
- clearFeatures
- clearStyle
- clipByFeatureCollection
- convertToCentroids
- filterByBoundingBox
- filterByFeatureCollection
- filterByNearest
- filterByText
- getFeatureCollection
- hide
- sendBackwards
- show
- style
- update
- usingFeature
bufferGeometry
Creates an filter that buffers geometry. Buffering geometry converts the geometry to the polygon type in the case of points or lines. The geometry is the essentially "inflated" by the factor that is provided.
Parameters
Name | Required | Description |
---|---|---|
factor | Yes | the factor represents a size (in degrees) by which to buffer (inflate) the geometry. |
options | No | An object for the configuration of the bufferGeometry filter. The possible options are shown in the section below. |
Options
Name | Default | Description |
---|---|---|
side | "both" | This option applies only to buffering of line layers. It determines the side of the line that the buffering is done. Valid values for this option are: - "both" - "left" - "right" - "inner" - "outer" |
joins | "round" | This option applies only to buffering of line layers. It describes how the joins (elbows) of the line should be buffered. Valid values for this option are: - "round" - "mitred" - "bevel" |
ends | "round" | This option applies only to buffering of line layers. It describes how the ends of the line should be buffered. Valid values for this option are: - "round" - "square" - "flat" |
mitreLimit | This option applies only to buffering of line layers. It is only applicable in the case of joins="mitred". It sets the limit of the mitre. |
Example
var qry = new Mapzania.QueryEngine();
qry.usingLayerSource("PRIMARY_ROADS")
.bufferGeometry(0.010, {side:"left", joins:"bevel", ends:"flat"})
.apply()
.then(function(data){
console.log(data);
});