Class: HexBin

ol.source. HexBin


new HexBin(options)

A source for hexagonal binning

Parameters:
Name Type Description
options

ol.source.VectorOptions + ol.HexGridOptions

Properties
Name Type Description
source ol.source.Vector

Source

size Number

size of the exagon in map units, default 80000

origin ol.coordinate

orgin of the grid, default [0,0]

layout pointy | flat

grid layout, default pointy

geometryFunction function | undefined

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

Extends

  • ol.source.Vector

Methods


getBin(f)

Get the hexagon of a feature

Parameters:
Name Type Description
f ol.Feature
Returns:

the bin id, the index of the feature in the bin and a boolean if the feature has moved to an other bin


getSource()

Get the orginal source

Returns:
Type
ol.source.Vector

reset()

Clear all bins and generate a new one