Class: HexBin

ol.source. HexBin


new HexBin(options)

A source for hexagonal binning

Parameters:
Name Type Description
options Object

ol.source.VectorOptions + ol.HexGridOptions

Properties
Name Type Argument Description
source ol.source.Vector

Source

size number <optional>

size of the hexagon in map units, default 80000

origin ol.coordinate <optional>

origin of the grid, default [0,0]

layout HexagonLayout <optional>

grid layout, default pointy

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

Members


_hexgrid :ol.HexGrid

The HexGrid

Type:

Methods


clear()

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

Inherited From:

getGridGeomAt(coord)

Get the hexagon geometry at the coord

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

getHexFeatures()

Get hexagons without circular dependencies (vs. getFeatures)

Returns:
Type
Array.<ol.Feature>

getLayout()

Get the inner HexGrid layout.

Returns:
Type
HexagonLayout

getOrigin()

Get the inner HexGrid origin.

Returns:
Type
ol.Coordinate

getSize()

Get the inner HexGrid size.

Returns:
Type
number

setLayout(newLayout, noreset)

Set the inner HexGrid layout.

Parameters:
Name Type Description
newLayout HexagonLayout
noreset boolean

If true, reset will not be called (It need to be called through)


setOrigin(newLayout, noreset)

Set the inner HexGrid origin.

Parameters:
Name Type Description
newLayout ol.Coordinate
noreset boolean

If true, reset will not be called (It need to be called through)


setSize(newSize, noreset)

Set the inner HexGrid size.

Parameters:
Name Type Description
newSize number
noreset boolean

If true, reset will not be called (It need to be called through)