Class: GridBin

ol.source. GridBin

A source for grid binning


new GridBin(options)

Parameters:
Name Type Description
options Object

ol.source.VectorOptions + grid option

Properties
Name Type Argument Description
source ol.source.Vector

Source

size number <optional>

size of the grid in meter, default 200m

geometryFunction function <optional>

Function that takes an ol.Feature as argument and returns an ol.geom.Point as feature's center.

flatAttributes function <optional>

Function takes a bin and the features it contains and aggragate the features in the bin attributes when saving

Extends

Methods


clear()

Overwrite ol/source/Vector clear to fire clearstart / clearend event

Inherited From:
Overrides:

getGridGeomAt(coord)

Get the grid geometry at the coord

Parameters:
Name Type Description
coord ol.Coordinate
Returns:
Type
ol.geom.Polygon

setGridProjection(proj)

Set grid projection

Parameters:
Name Type Description
proj ol.ProjectionLike

setSize(size)

Set grid size

Parameters:
Name Type Description
size number