Skip To ContentArcGIS for DevelopersSign In Dashboard
Class: esri/widgets/ScaleRangeSlider/ScaleRanges
Inheritance: ScaleRanges Accessor
Since: ArcGIS API for JavaScript 4.13

The ScaleRanges class represents the ranges of scales for the the ScaleRangeSlider widget.

See also:

Property Overview

Any properties can be set, retrieved or listened to. See the Working with Properties topic.
NameTypeSummaryClass
String

The name of the class.

more details
more detailsAccessor

The recommended scales at each of the named scale ranges.

more details
more detailsScaleRanges

Property Details

declaredClass Stringreadonly inherited

The name of the class. The declared class name is formatted as esri.folder.className.

RecommendedScales Objectstatic,constant

The recommended scales at each of the named scale ranges.

Properties:
world Number
continent Number
Default Value:50000000
countriesBig Number
Default Value:25000000
countriesSmall Number
Default Value:12000000
statesProvinces Number
Default Value:6000000
stateProvince Number
Default Value:3000000
counties Number
Default Value:1500000
county Number
Default Value:750000
metropolitanArea Number
Default Value:320000
cities Number
Default Value:160000
city Number
Default Value:80000
town Number
Default Value:40000
neighborhood Number
Default Value:20000
streets Number
Default Value:10000
street Number
Default Value:5000
buildings Number
Default Value:2500
building Number
Default Value:1250
smallBuilding Number
Default Value:800
rooms Number
Default Value:400
room Number
Default Value:100

Method Overview

NameReturn TypeSummaryClass
Number

Clamps the scale to the closest minScale or maxScale on the scale range.

more details
more detailsScaleRanges
Boolean

Determines whether the given scale is within the current scale range.

more details
more detailsScaleRanges
NamedScaleRange

Finds the scale range name at a given index.

more details
more detailsScaleRanges
ScaleRanges

Helper to create a ScaleRanges object from a minimum and maximum scale.

more details
more detailsScaleRanges
Boolean

Determines if the input scale value can be considered to be at the smallest scale range edge.

more details
more detailsScaleRanges
Boolean

Determines if the input scale value can be considered to be at the largest scale range edge.

more details
more detailsScaleRanges

Method Details

clampScale(scale){Number}

Clamps the scale to the closest minScale or maxScale on the scale range. If the provided scale goes beyond the allowed range, it snaps back to the clamped value.

Parameter:
scale Number

The scale value from the slider.

Returns:
TypeDescription
NumberThe scale number to which the slider will clamp.
contains(scale){Boolean}

Determines whether the given scale is within the current scale range.

Parameter:
scale Number

The scale value.

Returns:
TypeDescription
BooleanIf true, the scale is contained within the range.
findScaleRangeByIndex(index){NamedScaleRange}

Finds the scale range name at a given index.

Parameter:
index Number

The index of the scale.

Returns:
TypeDescription
NamedScaleRangeThe named scale range for the given index.
fromScaleRange(minScale, maxScale){ScaleRanges}

Helper to create a ScaleRanges object from a minimum and maximum scale.

Parameters:
minScale Number

The minimum scale.

maxScale Number

The maximum scale.

Returns:
TypeDescription
ScaleRangesThe scale ranges.
isMaxScaleEdge(scale){Boolean}

Determines if the input scale value can be considered to be at the smallest scale range edge.

Parameter:
scale

The scale value to test against the scale range.

Returns:
TypeDescription
BooleanIf true, the input scale value is considered to be at the smallest scale range.
isMinScaleEdge(scale){Boolean}

Determines if the input scale value can be considered to be at the largest scale range edge.

Parameter:
scale

The scale value to test against the scale range.

Returns:
TypeDescription
BooleanIf true, the input scale value is considered to be at the largest scale range.

Type Definitions

NamedScaleRange Object

The NamedScaleRange provides the minimum and maxium scale of an named scale id.

Properties:

The named scale range, such as "room" or "metropolitan area"

minScale Number

The minimum scale.

maxScale Number

The maximum scale.

API Reference search results

NameTypeModule
Loading...
d wrapper -->