AMD:
require(["esri/smartMapping/heuristics/binLevel"], (binLevel) => { /* code goes here */ });
ESM:
import binLevel from "@arcgis/core/smartMapping/heuristics/binLevel.js";
Function:
esri/smartMapping/heuristics/binLevel
Since: ArcGIS Maps SDK for JavaScript 4.25
Function that suggests a fixedBinLevel in a FeatureReductionBinning visualization.
Known Limitations
- This function is not intended for use in 3D SceneViews.
Method Overview
Name | Return Type | Summary | Function |
---|---|---|---|
Promise<number> | Generates a suggested fixedBinLevel for a binning visualization based on the view scale at the time this method is called. more details | binLevel |
Method Details
-
Generates a suggested fixedBinLevel for a binning visualization based on the view scale at the time this method is called.
Parametersparams ObjectSee the table below for details about parameters that may be passed to this function.
Specificationview MapViewThe MapView where the layer will be rendered.
ReturnsType Description 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.Exampleconst fixedBinLevel = await binLevel({ view }); layer.featureReduction = { type: "binning", fixedBinLevel, // ...otherBinningProperties };