You can navigate a scene view (a 3D map):
- Using built-in navigation (described on this page), such as panning, zooming, and changing pitch
- By programmatically changing camera position
The following table summarizes the built-in navigation capabilities of the SceneView control.
Navigate with touch
The SceneView control provides built-in support for navigating a scene using touch.
There are three navigation modes available using touch: single finger pan, multiple finger zoom and pan, and multiple finger rotate and pitch. Place one finger on the display to use single finger pan. Spread, pinch, or drag two or more fingers on the display to enter pan and zoom mode, or place multiple fingers on the display at a consistent distance to navigate in heading and pitch mode. The following list describes the touch gestures used to execute navigation operations in each mode.
- Pan mode (single finger)
- Pan and zoom mode (multiple fingers)
- Spread—Zooms in
- Pinch—Zooms out
- Heading and pitch mode (multiple fingers)
- Drag up and down—Changes pitch
- Drag left and right—Changes heading
If the desired navigation gesture is not initially recognized, remove your fingers and replace them on the display.
Programmatically change camera position
Your applications can programmatically navigate a 3D scene by creating a new camera and setting it to the scene view. A camera defines the location from which you are viewing the scene.
You can enable subsurface navigation in code by
Set the camera
For example, to point the camera to toward the Snowdon mountainside, as shown in the following code snippet and image, use these values:
- For 3D location, use 53.06 latitude, -4.04 longitude, 1289 metres above sea level
- For heading, use 295 degrees
- For pitch, use 71 degrees
var snowdonCamera = new Camera(53.06, -4.04, 1289, 295, 71, 0);
Now you have a new camera you can apply to your scene view. You can apply it immediately using SetViewpointCamera as shown in the code below, or the camera can be animated to the new position using one of the asynchronous methods.