ArcGIS Pro 3.2 API Reference Guide
ArcGIS.Desktop.Mapping Namespace / MapView Class / HasNextCamera Method
Example

In This Topic
    HasNextCamera Method
    In This Topic
    Indicates whether the map view has a next camera position.
    Syntax
    public bool HasNextCamera()
    Public Function HasNextCamera() As Boolean

    Return Value

    Returns true if the map view has a next camera position.
    Remarks
    The map view will have a next camera position if the camera has changed and if the camera stack has been moved backwards.
    Example
    Go To Next Camera
    public Task<bool> ZoomToNextCameraAsync()
    {
      //Get the active map view.
      var mapView = MapView.Active;
      if (mapView == null)
        return Task.FromResult(false);
    
      //Zoom to the selected layers in the TOC
      if (mapView.HasNextCamera())
        return mapView.NextCameraAsync();
    
      return Task.FromResult(false);
    }
    Requirements

    Target Platforms: Windows 11, Windows 10

    ArcGIS Pro version: 3 or higher.
    See Also