DataBinningOptions Object

Note

Bing Maps Web Control SDK retirement

Bing Maps Web Control SDK is deprecated and will be retired. Free (Basic) account customers can continue to use Bing Maps Web Control SDK until June 30th, 2025. Enterprise account customers can continue to use Bing Maps Web Control SDK until June 30th, 2028. To avoid service disruptions, all implementations using Bing Maps Web Control SDK will need to be updated to use Azure Maps Web SDK by the retirement date that applies to your Bing Maps for Enterprise account type. For detailed migration guidance, see Migrate from Bing Maps Web Control SDK and Migrate Bing Maps Enterprise applications to Azure Maps with GitHub Copilot.

Azure Maps is Microsoft's next-generation maps and geospatial services for developers. Azure Maps has many of the same features as Bing Maps for Enterprise, and more. To get started with Azure Maps, create a free Azure subscription and an Azure Maps account. For more information about azure Maps, see Azure Maps Documentation. For migration guidance, see Bing Maps Migration Overview.

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.