Navigation related configuration settings on the View.
Property Overview
Name | Type | Summary | Class | |
---|---|---|---|---|
Boolean | more details Indicates if single finger touch drag events are enabled or disabled. | more details | Navigation | |
String | more details The name of the class. | more details | Accessor | |
GamepadSettings | more details Gamepad navigation specific configuration settings. | more details | Navigation | |
Boolean | more details When | more details | Navigation | |
Boolean | more details Indicates whether the view can be zoomed in or out with the mouse wheel. | more details | Navigation |
Property Details
-
browserTouchPanEnabled BooleanSince: ArcGIS API for JavaScript 4.14
-
Indicates if single finger touch drag events are enabled or disabled. When
false
, the map cannot be panned with single finger touch gesture on touch devices. This will allow web pages to scroll down without panning the map on touch devices. While single touch panning and zooming is disabled, the map can still be panned, zoomed, and rotated (if unconstrained) with two fingers. This property does not affect mouse-based dragging.- Default Value:true
Example:// Disable single touch panning in a MapView. const view = new MapView({ container: "viewDiv", map: new Map({ basemap: "streets-vector" }) }); view.navigation.browserTouchPanEnabled = false;
-
The name of the class. The declared class name is formatted as
esri.folder.className
.
-
gamepad GamepadSettings
-
Gamepad navigation specific configuration settings.
Example:// Disable the gamepad usage in MapView const view = new MapView({ container: "viewDiv", map: new Map({ basemap: "satellite" }), center: [176.185, -37.643], zoom: 13, navigation: { gamepad: { enabled: false } } }); // Disable gamepad usage in SceneView. const view = new SceneView({ container: "viewDiv", map: new Map({ basemap: "satellite", ground: "world-elevation" }), camera: { position: [176.171, -37.660, 2000], heading: 0, tilt: 60 }, navigation: { gamepad: { enabled: false } } });
-
momentumEnabled BooleanSince: ArcGIS API for JavaScript 4.14
-
When
true
, the view will temporarily continue to pan after the pointer (e.g. mouse, stylus, finger) has lifted.- Default Value:true
Example:// Disable pan animation in the MapView. const view = new MapView({ container: "viewDiv", map: new Map({ basemap: "streets-vector" }) }); view.navigation.momentumEnabled = false;
-
mouseWheelZoomEnabled BooleanSince: ArcGIS API for JavaScript 4.14
-
Indicates whether the view can be zoomed in or out with the mouse wheel. When a map occupies part the screen, page navigation may be difficult at times since mouse wheel movement over the map can be interpreted as map zooming rather than page scrolling. In some cases, setting
mouseWheelZoomEnabled
tofalse
can make scrollable webpages with maps easier to navigate.- Default Value:true
Example:// To disable mouse wheel zooming in a MapView. const view = new MapView({ container: "viewDiv", map: new Map({ basemap: "streets-vector" }) }); view.navigation.mouseWheelZoomEnabled = false;
Method Overview
Name | Return Type | Summary | Class | |
---|---|---|---|---|
more details Adds one or more handles which are to be tied to the lifecycle of the object. | more details | Accessor |
Method Details
-
own(handleOrHandles)inheritedSince: ArcGIS API for JavaScript 4.24
-
Adds one or more handles which are to be tied to the lifecycle of the object. The handles will be removed when the object is destroyed.
// Manually manage handles const handle = reactiveUtils.whenOnce(() => !view.updating) .then(() => { wkidSelect.disabled = false; }); handle.remove(); // Assign a handle using own() this.own(reactiveUtils.whenOnce(() => !view.updating) .then(() => { wkidSelect.disabled = false; }));
Parameter:handleOrHandles WatchHandle|WatchHandle[]Handles marked for removal once the object is destroyed.