UNPKG

@arcgis/core

Version:

ArcGIS Maps SDK for JavaScript: A complete 2D and 3D mapping and data visualization API

31 lines (30 loc) 1.52 kB
/** * Function that suggests a [FeatureReductionBinning.fixedBinLevel](https://developers.arcgis.com/javascript/latest/references/core/layers/support/FeatureReductionBinning/#fixedBinLevel) in a * [FeatureReductionBinning](https://developers.arcgis.com/javascript/latest/references/core/layers/support/FeatureReductionBinning/) visualization. * * > [!WARNING] * > * > **Known Limitations** * > * > This function is not intended for use in 3D [SceneViews](https://developers.arcgis.com/javascript/latest/references/core/views/SceneView/). * * @since 4.25 */ import type { BinLevelParameters } from "./types.js"; /** * Generates a suggested [FeatureReductionBinning.fixedBinLevel](https://developers.arcgis.com/javascript/latest/references/core/layers/support/FeatureReductionBinning/#fixedBinLevel) * for a binning visualization based on the view scale at the time this method is called. * * @param parameters - The function parameters. * @returns Resolves to the suggested `fixedBinLevel` to apply to the layer at the given view scale. Set this value * to the [FeatureReductionBinning.fixedBinLevel](https://developers.arcgis.com/javascript/latest/references/core/layers/support/FeatureReductionBinning/#fixedBinLevel) * property. * @example * const fixedBinLevel = await binLevel({ view }); * layer.featureReduction = { * type: "binning", * fixedBinLevel, * // ...otherBinningProperties * }; */ export default function binLevel(parameters: BinLevelParameters): Promise<number>;