ArcGIS Pro 3.8 API Reference Guide
ArcGIS.Desktop.Mapping Namespace / FeatureLayer Class / ArePreviousObservationsVisible Property
Example

In This Topic
    ArePreviousObservationsVisible Property
    In This Topic
    Gets whether Previous Observations will be displayed.
    Syntax
    public bool ArePreviousObservationsVisible {get;}
    Public ReadOnly Property ArePreviousObservationsVisible As Boolean
    Example
    Check Previous Observation and Track Line Visibility
    {
      //The layer must be track aware and spatial for these settings
      //to have an effect
      if (streamLayer.TrackType != TrackType.Spatial)
      {
        // not track aware and spatial
      }
      await QueuedTask.Run(() =>
      {
        if (!streamLayer.AreTrackLinesVisible)
        {
          streamLayer.SetTrackLinesVisibility(true);
        }
    
        if (!streamLayer.ArePreviousObservationsVisible)
        {
          streamLayer.SetPreviousObservationsVisibility(true);
        }
      });
    }
    Make Track Lines and Previous Observations Visible
    {
      //The layer must be track aware and spatial for these settings
      //to have an effect
    
      if (streamLayer.TrackType != TrackType.Spatial)
      {
        // not track aware and spatial
      }
    
      await QueuedTask.Run(() =>
      {
        //Note: Setting PreviousObservationsCount larger than the
        //"SetExpirationMaxCount()" has no effect
        streamLayer.SetPreviousObservationsCount(6);
        if (!streamLayer.AreTrackLinesVisible)
        {
          streamLayer.SetTrackLinesVisibility(true);
        }
    
        if (!streamLayer.ArePreviousObservationsVisible)
        {
          streamLayer.SetPreviousObservationsVisibility(true);
        }
      });
    }
    Requirements

    Target Platforms: Windows 11 Home, Pro, Enterprise (64 bit)

    ArcGIS Pro version: 3.0 or higher.
    See Also