import ScaleRangeSliderViewModel from "@arcgis/core/widgets/ScaleRangeSlider/ScaleRangeSliderViewModel.js";const ScaleRangeSliderViewModel = await $arcgis.import("@arcgis/core/widgets/ScaleRangeSlider/ScaleRangeSliderViewModel.js");- Inheritance:
- ScaleRangeSliderViewModel→
Accessor
- Since
- ArcGIS Maps SDK for JavaScript 4.13
Provides the logic for the ScaleRangeSlider widget and component.
Constructors
Constructor
Parameters
| Parameter | Type | Description | Required |
|---|---|---|---|
| properties | | |
Properties
| Property | Type | Class |
|---|---|---|
declaredClass readonly inherited | ||
| | ||
| | ||
| | ||
| | ||
| | ||
scaleRanges readonly | ReturnType<typeof ScaleRanges.fromScaleRange> | |
| | ||
state readonly | | |
| |
layer
When provided, the initial minScale and maxScale values will match the layer's.
When a tiled layer is used, the slider will be restricted from moving the slider thumbs past the lods of the layer's tiling scheme.
Since version 4.28, when a MapImageLayer is used, the slider will be restricted from moving past the min/max scale defined on the map service.
The unavailable scale range will be designated with a dashed line.
maxScale
- Type
- number
The maximum scale of the active scale range. When the maxScale reaches the maxScaleLimit, the maxScale value becomes 0 and there is no maximum scale set.
minScale
- Type
- number
The minimum scale of the active scale range. When the minScale reaches the minScaleLimit, the minScale value becomes 0 and there is no minimum scale set.
scaleRanges
- Type
- ReturnType<typeof ScaleRanges.fromScaleRange>
The valid scale ranges available based on the slider position.
sliderViewModel
- Type
- SliderViewModel
The [SliderViewModel]SliderViewModel for supporting the scale range slider widget.
view
- Type
- MapViewOrSceneView | null | undefined
Methods
| Method | Signature | Class |
|---|---|---|
mapScaleToSlider(scale: number): number | | |
mapSliderToScale(value: number): number | |