import Navigation from "@arcgis/core/views/navigation/Navigation.js";const Navigation = await $arcgis.import("@arcgis/core/views/navigation/Navigation.js");- Inheritance:
- Navigation→
Accessor
- Since
- ArcGIS Maps SDK for JavaScript 4.9
Navigation related configuration settings on the View.
Constructors
Constructor
Parameters
| Parameter | Type | Description | Required |
|---|---|---|---|
| properties | | |
Properties
| Property | Type | Class |
|---|---|---|
| | ||
| | ||
declaredClass readonly inherited | ||
gamepad readonly | | |
| |
actionMap
- Type
- NavigationActionMap
- Since
- ArcGIS Maps SDK for JavaScript 4.32
The navigation action map defines the default behavior of the navigation controls.
Example
// By default, dragging the middle mouse button (tertiary button) zooms the SceneView. By setting the tertiary// drag action to "none", that default behavior can be disabled.view.navigation.actionMap.dragTertiary = "none"; browserTouchPanEnabled
- Type
- boolean
- Since
- ArcGIS Maps SDK for JavaScript 4.14
Indicates if single finger touch View.@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; gamepad
- Type
- GamepadSettings
Gamepad navigation specific configuration settings.
Example
// Disable the gamepad usage in MapViewconst 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
- Type
- boolean
- Since
- ArcGIS Maps SDK for JavaScript 4.14
When true, the view will temporarily continue to pan after the pointer (e.g. mouse, stylus, finger) has lifted.
With respect to MapView, this property will be ignored if Config
is true and the user has requested reduced motion. See prefers-reduced-motion for more information.
- 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;