ArcGIS Pro 3.2 API Reference Guide
ArcGIS.Desktop.Mapping Namespace / FeatureLayer Class / IsTrackAware Property
Example

In This Topic
    IsTrackAware Property
    In This Topic
    Gets whether this Feature Layer supports track related functionality.
    Syntax
    public bool IsTrackAware {get;}
    Public ReadOnly Property IsTrackAware As Boolean
    Example
    Find all Stream Layers that are Track Aware
    var trackAwareLayers = MapView.Active.Map.GetLayersAsFlattenedList()
                               .OfType<StreamLayer>().Where(sl => sl.IsTrackAware)?.ToList();
    
    Get the Track Id Field
    if (streamLayer.IsTrackAware)
    {
      var trackField = streamLayer.TrackIdFieldName;
      //TODO use the field name
    }
    
    Set the Maximum Count of Previous Observations to be Stored in Memory
    //Must be on QueuedTask
    //Set Expiration Method and Max Expiration Count
    if (streamLayer.GetExpirationMethod() != FeatureExpirationMethod.MaximumFeatureCount)
      streamLayer.SetExpirationMethod(FeatureExpirationMethod.MaximumFeatureCount);
    streamLayer.SetExpirationMaxCount(15);
    //FYI
    if (streamLayer.IsTrackAware)
    {
      //MaxCount is per track! otherwise for the entire layer
    }
    
    Requirements

    Target Platforms: Windows 11, Windows 10

    ArcGIS Pro version: 3 or higher.
    See Also