Return Value
The System.UInt64 indicating the ExpirationMaxCount
Exception | Description |
---|---|
ArcGIS.Core.CalledOnWrongThreadException | This method or property must be called within the lambda passed to QueuedTask.Run. |
System.InvalidOperationException | Stream service data connection is null. |
//The layer must be track aware and spatial if (streamLayer.TrackType != TrackType.Spatial) return; //Must be on QueuedTask //get the CIM Definition var def = streamLayer.GetDefinition() as CIMFeatureLayer; //set the number of previous observations, def.PreviousObservationsCount = (int)streamLayer.GetExpirationMaxCount() - 1; //set show previous observations and track lines to true def.ShowPreviousObservations = true; def.ShowTracks = true; //commit the changes streamLayer.SetDefinition(def);
Target Platforms: Windows 11, Windows 10, Windows 8.1