Skip To Content
ArcGIS Developer

Stream widget

(Added at v1.2)

Use the Stream widget to visualize and control real-time data feeds from streaming feature layers. You can also apply spatial and attribute filters to limit what data is sent to the layer.

In addition to the Stream widget, the Layer List, Legend, Attribute Table, and Print widgets also work with stream layers. Since certain attributes of stream layers are dynamically updated, the attribute table only displays the attributes with a snapshot of stream layers when it opens.

Streaming feature layers connect to an ArcGIS server stream service using HTML5 WebSockets. WebSockets are a new feature of HTML5. Most modern browsers support WebSockets. For more information about WebSockets and to test if a browser supports WebSockets, visit


ArcGIS GeoEvent Server is required to publish stream services.

Configure the Stream widget

The Stream widget reads stream layers in the map and lists them in the stream layers table.

This widget can be set to open automatically when an app starts. Hover over the widget and click the Do not open this widget when the app starts button Do not open this widget when the app starts to change the setting to Open this widget automatically when the app starts. (For widgets that you need to add to the app first, you can turn on this option after configuring the widget.)

  1. Hover over the widget and click the Configure this widget button Configure this widget to open the configuration window.

    If you need to add the widget to the app first, click a widget placeholder on the Widget tab. In the Choose Widget window that opens, select the widget and click OK.

  2. Set the title for the widget, and optionally click Change widget icon if you want to replace the default icon for this widget.

    A file explorer window allows you to browse to a local image file to use it as the widget icon.

  3. All of the stream layers in the map are listed in the stream layers table. Select the layer you want to configure.
  4. Under Stream Controls, check or uncheck the following options to control the streaming capabilities:
    • Enable Stop streaming or Start streaming option
    • Enable Clear previous observations option
    • Enable Draw previous observations option (This is disabled if the Draw previous observations property is not set in the layer.)
  5. To apply spatial filters, you have the following two options:
    • Limit observations in the current map area
    • Limit observations in the user-defined area—Only the rectangle is available for drawing on the map. Click the symbol icon next to the rectangle to define its color, transparency, outline color, and width.
  6. Check Enable Attribute filter to open the Configure Stream Attribute Filter window.
    1. Click Add Filter and change the filter name in the Filter Name text box.
    2. Click Add a filter expression, select a query field, select an expression, and provide a value in the text box.
    3. Optionally, check Ask for values. When this option is checked, your input value is the default query value, and you have the choice of providing a new value to overwrite the default value at run time.
    4. You also have the option to use Add an expression set, which allows you to define and apply two filters to a single query. Depending on whether the All or Any option is selected for whether the expressions in this set are true, either features meeting all the expressions or features meeting any of the expressions in the set display on the map.
    5. Repeat the steps above to add other filters.
    6. Click OK to close the window.
  7. To modify the existing attribute filters, click the small edit button Edit. to open the Configure Stream Attribute Filter window.
  8. Repeat step 2–6 to configure other stream layers in the table.
  9. Click OK to close the configuration window for the widget.

Use the Stream widget

  1. Click the widget button in your application to open the widget panel.
  2. Choose a stream layer from the drop-down list if there is more than one layer. In this case, LABus is selected.
    Streaming controls
  3. Click Stop Streaming to stop all the data feeds, or click Start Streaming to display real-time data.
  4. Optionally, click Clear previous observations to clear all the existing features on the map.
  5. Change the numbers of previous observations you want to draw on the map if available. By default, it shows the same number defined in the map.
  6. Check the Use spatial filter to limit observations option, and select Limit observations by drawing on the map.
    Spatial filters
  7. Click the rectangle and draw it on the map.
    Rectangle drawn on the map to limit observations

    Only the features within or intersecting the rectangle on the map show. You can also check a different option to limit observations to the current map extent.

  8. Check the Use attribute filter to limit observations option, and select the attribute filter you defined.
    Attribute filters

    Only the features meeting the requirement show on the map.

  9. You can apply spatial and attribute filters together to limit features on the map if needed.