JS API
Map Object
QueryEngine Object
Layer Object
Feature Object
Query Object
GeoJson Function Library (Experimental)

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. See this for a working example.

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 custom 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

map.usingLayer("PRIMARY_ROADS")
    .bufferGeometry(0.010, {side:"left", joins:"bevel", end:"flat"})
    .style({
        strokeColor: "#000000",
        fillColor: "#FF0000",
        strokeWidth: 1
    })
    .update();