binLevel

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.

binLevel

Method Details

binLevel

Method
binLevel(params){Promise<number>}

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

Parameters
params Object

See the table below for details about parameters that may be passed to this function.

Specification
view MapView

The MapView where the layer will be rendered.

Returns
Type 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.
Example
const fixedBinLevel = await binLevel({ view });
layer.featureReduction = {
  type: "binning",
  fixedBinLevel,
  //  ...otherBinningProperties
};

Your browser is no longer supported. Please upgrade your browser for the best experience. See our browser deprecation post for more details.