import ScaleRanges from "@arcgis/core/widgets/ScaleRangeSlider/ScaleRanges.js";const ScaleRanges = await $arcgis.import("@arcgis/core/widgets/ScaleRangeSlider/ScaleRanges.js");- Inheritance:
- ScaleRanges→
Accessor
- Since
- ArcGIS Maps SDK for JavaScript 4.13
The ScaleRanges class represents the ranges of scales for the ScaleRangeSlider widget.
Constructors
Constructor
Constructor
Parameters
| Parameter | Type | Description | Required |
|---|---|---|---|
| properties | | |
See the properties table for a list of all the
properties that may be passed into the constructor.
Properties
Any properties can be set, retrieved or listened to. See the
Watch for changes
topic.
| Property | Type | Class |
|---|---|---|
RecommendedScales readonly static | | |
declaredClass readonly inherited |
RecommendedScales
readonlystatic Property
- Type
- RecommendedScales
The recommended scales at each of the named scale ranges.
Methods
| Method | Signature | Class |
|---|---|---|
fromScaleRange static | fromScaleRange(scaleRange: ScaleRange): ScaleRanges | |
clampScale(scale: number): number | | |
contains(scale: number): boolean | | |
findScaleRangeByIndex(index: number): NamedScaleRange | | |
isMaxScaleEdge(scale: number): boolean | | |
isMinScaleEdge(scale: number): boolean | |
fromScaleRange
static Method
- Signature
-
fromScaleRange (scaleRange: ScaleRange): ScaleRanges
Helper to create a ScaleRanges object from a minimum and maximum scale.
Parameters
| Parameter | Type | Description | Required |
|---|---|---|---|
| scaleRange | The scale range. | |
- Returns
- ScaleRanges
The scale ranges.
findScaleRangeByIndex
Method
- Signature
-
findScaleRangeByIndex (index: number): NamedScaleRange
Finds the scale range name at a given index.
Parameters
| Parameter | Type | Description | Required |
|---|---|---|---|
| index | The index of the scale. | |
- Returns
- NamedScaleRange
The named scale range for the given index.
Type definitions
NamedScaleRange
Type definition
The NamedScaleRange provides the minimum and maximum scale of an named scale id.
- Supertypes
- ScaleRange
id
Property
- Type
- keyof RecommendedScales
The named scale range, such as "room" or "metropolitan area".