ArcGIS Runtime SDK for .NET

Navigate a scene view

You can navigate a scene view (a 3D map):

Built-in navigation

The following table summarizes the built-in navigation capabilities of the SceneView control.

NavigationMouseTouch

Pan

  • Hold left button and drag
  • Drag
    Drag gesture
  • Flick
    Flick gesture

Zoom in

  • Scroll wheel forward
  • Hold center button and drag
  • Spread
    Spread gesture

Zoom out

  • Scroll wheel backward
  • Hold center button and drag
  • Pinch
    Pinch gesture

Rotate

  • Hold right button and drag
  • Multiple finger hold and twist
    Twist gesture

Change pitch

  • Multiple fingers drag up/down
    Multiple finger drag up/down gesture

Change heading

  • Multiple fingers drag left/right
    Multiple finger drag left/right gesture

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)
    • Drag—Pans
    • Flick—Pans
  • Pan and zoom mode (multiple fingers)
    • Spread—Zooms in
    • Pinch—Zooms out
    • Drag—Pans
    • Pivot—Rotates
  • Heading and pitch mode (multiple fingers)
    • Drag up and down—Changes pitch
    • Drag left and right—Changes heading
Tip:

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.

Camera position for a scene view

The camera is shown in this image for illustration purposes; when you set camera settings (location, pitch), think of the camera class a real-life camera you're adjusting the position of.

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);

Surface elevation applied to a scene

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.

MySceneView.SetViewpointCamera(snowdonCamera);

Related topics