DataBinningOptions Object

A set options the define how a data binning layer is rendered.

Name Type Description
aggregationProperty string The name of a property in the Pushpin.metadata object on which to perform calculations (average, count, sum) against the pushpins in each data bin.
colorCallback function (binInfo: DataBinInfo, min: DataBinMetrics, max: DataBinMetrics) A callback function which defines the color a data bin polygon should be. This callback recieves data bin information along with the min and max calculated metrics for the data set. If set, this callback function must return a color value (string color or Color object).
dataBinType DataBinType The shape of the data bin to generate. Default: hexagon
distanceUnits SpatialMath.DistanceUnits The distance units of the radius option. Default: meters
polygonOptions PolygonOptions The default options used for rendering the data bin polygons.
radius number A spatial distance which will be converted into a pixel distance at the equater and used to generate symetrically sized data bins that have the apprimate spatial distance radius. Default: 1000
scaleCallback function(binInfo: DataBinMetrics, min: DataBinMetrics, max: DataBinMetrics) A callback function which defines how much to scale a data bins size. This callback recieves data bin information along with the min and max calculated metrics for the data set. If set, this callback function must return a number between 0 and 1.