Stream widget

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, 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 WebSocket.org.

License:

ArcGIS GeoEvent Server is required to publish stream services.

Configuring the Stream widget

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

This widget can be set to open automatically when an app starts. Click the Do not open this widget when the app starts button Do not open this widget when the app starts on the widget to turn on the option to open the widget automatically. (For widgets you need to add to the app first, you can make this setting after configuring the widget.)

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

    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 the 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 under 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 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, an expression, and provide a value in the text box.
    3. Optionally, check Ask for values. When this option is chosen, 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 if All or Any of 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 icon Edit icon 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.

Using the Stream widget

  1. Click the widget icon 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 check Limit observations by drawing on the map.
    Spatial filters
  7. Click the rectangle and draw it on the map. 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.
    Draw rectangle on the map to limit observations
  8. Check the Use attribute filter to limit observations option, and check the attribute filter you defined. Only the features meeting the requirement show on the map.
    Attribute filters
  9. You can apply spatial and attribute filters together to limit features on the map if needed.