Provides the logic for the Zoom widget.
Example:
var view = new MapView({
container: "viewDiv",
map: map
});
var zoom = new Zoom({
viewModel: { // autocasts as new ZoomViewModel()
view: view
}
}, "zoomDiv");
Constructors
-
new ZoomViewModel(properties)
-
Parameter:properties Objectoptional
See the properties for a list of all the properties that may be passed into the constructor.
Property Overview
Any properties can be set, retrieved or listened to. See the Working with Properties topic.
Name | Type | Summary | Class | |
---|---|---|---|---|
Boolean | Indicates if the view can zoom in. more details | more details | ZoomViewModel | |
Boolean | Indicates if the view can zoom out. more details | more details | ZoomViewModel | |
String | The name of the class. more details | more details | Accessor | |
String | The current state of the widget. more details | more details | ZoomViewModel | |
MapView|SceneView | The view from which to operate. more details | more details | ZoomViewModel |
Property Details
-
canZoomIn Boolean
-
Indicates if the view can zoom in.
-
canZoomOut Boolean
-
Indicates if the view can zoom out.
-
Since: ArcGIS API for JavaScript 4.7
-
The name of the class. The declared class name is formatted as
esri.folder.className
.
-
state Stringreadonly
-
The current state of the widget.
Possible Values:"disabled"|"ready"
- Default Value:disabled
-
The view from which to operate.
Method Overview
Name | Return Type | Summary | Class | |
---|---|---|---|---|
Zooms the view in by an LOD factor of 0.5. more details | more details | ZoomViewModel | ||
Zooms the view out by an LOD factor of 2. more details | more details | ZoomViewModel |
Method Details
-
zoomIn()
-
Zooms the view in by an LOD factor of 0.5.
-
zoomOut()
-
Zooms the view out by an LOD factor of 2.