Skip to content
import binLevel from "@arcgis/core/smartMapping/heuristics/binLevel.js";
Since
ArcGIS Maps SDK for JavaScript 4.25

Function that suggests a FeatureReductionBinning.fixedBinLevel in a FeatureReductionBinning visualization.

Known Limitations

This function is not intended for use in 3D SceneViews.

Functions

NameReturn TypeObject

binLevel

Function

Generates a suggested FeatureReductionBinning.fixedBinLevel for a binning visualization based on the view scale at the time this method is called.

Signature
binLevel (parameters: BinLevelParameters): Promise<number>
Parameters
ParameterTypeDescriptionRequired
parameters

The function parameters.

Returns
Promise<number>

Resolves to the suggested fixedBinLevel to apply to the layer at the given view scale. Set this value to the FeatureReductionBinning.fixedBinLevel property.

Example
const fixedBinLevel = await binLevel({ view });
layer.featureReduction = {
type: "binning",
fixedBinLevel,
// ...otherBinningProperties
};