Change viewpoint

View inWPFUWPFormsiOSAndroid
View on GitHub

Set the map view to a new viewpoint.

Image of change viewpoint

Use case

Programatically navigate to a specified location in the map or scene. Use this to focus on a particular point or area of interest.

How to use the sample

The map view has several methods for setting its current viewpoint. Select a viewpoint from the UI to see the viewpoint changed using that method.

How it works

  1. Create a new Map object and set it to the MapView object.
  2. Change the map's Viewpoint using one of the available methods:
  3. Use MapView.SetViewpointAsync() to pan to a viewpoint.
  4. Use MapView.SetViewpointCenterAsync() to center the viewpoint on a Point.
  5. Use MyMapView.SetViewpointScaleAsync() to set a distance from the ground using a scale.
  6. Use MapView.SetViewpointGeometryAsync() to set the viewpoint to a given Geometry.

Relevant API

  • Geometry
  • Map
  • MapView
  • Point
  • Viewpoint

Additional information

Below are some other ways to set a viewpoint:

  • SetViewpoint
  • SetViewpointAsync
  • SetViewpointCenterAsync
  • SetViewpointGeometryAsync
  • SetViewpointRotationAsync
  • SetViewpointScaleAsync


animate, extent, pan, rotate, scale, view, zoom

Sample Code

<?xml version="1.0" encoding="utf-8" ?>
<ContentPage xmlns=""
      <RowDefinition Height="auto" />
      <RowDefinition Height="*" />
    <Button x:Name="ViewpointsButton" Text="Viewpoints" Clicked="OnViewpointsClicked"></Button>
    <esriUI:MapView x:Name="MyMapView" Grid.Row="1"/>