
Stream layer is a type of FeatureLayer.To create a StreamLayer, you must call CreateLayer method of the LayerFactory class, instead of directly using a constructor.
When you use LayerFactory.CreateLayer<T>, you need to pass in a FeatureLayerCreationParams. You should set UniqueValueRendererDefinition and ClassBreaksRendererDefinition in a FeatureLayerCreationParams only when the source stream service has associated archieved feature service layer. See ArcGIS.Core.Data.Realtime.StreamServiceFeatureClassDefinition.GetArchiveFeatureServiceLayerURL for details. That is because at the creation time a stream layer starts with empty set of features.
You can call FeatureLayer.CreateRenderer anytime later once you have sufficient features to compute and assign a ArcGIS.Core.CIM.CIMUniqueValueRenderer or ArcGIS.Core.CIM.CIMClassBreaksRenderer to a stream layer.
System.Object
ArcGIS.Desktop.Framework.Contracts.PropertyChangedBase
ArcGIS.Desktop.Mapping.MapMember
ArcGIS.Desktop.Mapping.Layer
ArcGIS.Desktop.Mapping.BasicFeatureLayer
ArcGIS.Desktop.Mapping.FeatureLayer
ArcGIS.Desktop.Mapping.StreamLayer
Target Platforms: Windows 11, Windows 10