var trackAwareLayers = MapView.Active.Map.GetLayersAsFlattenedList()
.OfType<StreamLayer>().Where(sl => sl.IsTrackAware)?.ToList();
if (streamLayer.IsTrackAware) { var trackField = streamLayer.TrackIdFieldName; //TODO use the field name }
//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 }
Target Platforms: Windows 11, Windows 10, Windows 8.1