Public Sub SetTrackLinesVisibility( _ ByVal trackLinesVisible As Boolean _ )
public void SetTrackLinesVisibility( bool trackLinesVisible )
Parameters
- trackLinesVisible
- Indicates whether Track Lines should be displayed.
Public Sub SetTrackLinesVisibility( _ ByVal trackLinesVisible As Boolean _ )
public void SetTrackLinesVisibility( bool trackLinesVisible )
| Exception | Description |
|---|---|
| ArcGIS.Core.CalledOnWrongThreadException | This method or property must be called within the lambda passed to QueuedTask.Run. |
| System.InvalidOperationException | This feature layer does not support tracks. |
{
//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
}
// Note: call within QueuedTask.Run()
{
if (!streamLayer.AreTrackLinesVisible)
streamLayer.SetTrackLinesVisibility(true);
if (!streamLayer.ArePreviousObservationsVisible)
streamLayer.SetPreviousObservationsVisibility(true);
}
}
{
//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
}
// Note: call within 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);
}
}
Target Platforms: Windows 11 Home, Pro, Enterprise (64 bit)