Stream

The Stream widget provides a way to display a stream layer with real-time data.

Configurable attributes

The following table describes the configurable attributes of the Stream widget.

AttributeDescription

streamLayers

Object array. The default is empty. The properties of the array item are as follows:

  • layerId—String. The layer ID of the stream layer. The layer can be fetched by themap.getLayer(layerId) method.
  • layerName—String. The layer name of the stream layer appears in the layer list.
  • startstop—Boolean. Indicates whether to provide the Start streaming and Stop streaming controls in the widget.
  • clear—Boolean. Indicates whether to provide the Clear button in the widget to clear the stream data.
  • drawPrevious—Boolean. Indicates whether to provide the Draw previous observations option in the widget. The option is affected by the stream layer configuration in the map. If the Draw Previous observations option in the map is not configured, it is set to false and the option is unavailable on the settings page.
  • spatialFilter—Boolean. Indicates whether to show the spatial filter in the widget. If mapExtentFilter and drawExtentFilter are both set to false, this configuration is ignored.
  • mapExtentFilter—Boolean. Indicates whether to provide the Limit observations to current map area option in the widget.
  • drawExtentFilter—Boolean. Indicates whether to provide the Limit observations by drawing on the map option in the widget.
  • attrFilter—Boolean. Indicates whether to provide the attribute filter in the stream.
  • filterList—Array of object. Each array item is a filter item defined on the settings page. The content of the filter item is the same as Query widget.

Example

{
  "streamLayers": [
    {
      "layerId": "stream_2684",
      "layerName": "Flights",
      "startStop": true,
      "clear": true,
      "drawPrevious": true,
      "spatialFilter": false,
      "mapExtentFilter": false,
      "drawExtentFilter": false,
      "attrFilter": true,
      "filterList": [
        {
          "name": "New Filter",
          "filterInfo": {
            "logicalOperator": "AND",
            "parts": [
              {
                "fieldObj": {
                  "name": "AltitudeFeet",
                  "label": "AltitudeFeet",
                  "shortType": "number",
                  "type": "esriFieldTypeInteger"
                },
                "operator": "numberOperatorIsLessThan",
                "valueObj": {
                  "isValid": true,
                  "type": "value",
                  "value": 1000
                },
                "interactiveObj": "",
                "caseSensitive": false,
                "expr": "AltitudeFeet < 1000"
              },
              {
                "fieldObj": {
                  "name": "ACID",
                  "label": "ACID",
                  "shortType": "string",
                  "type": "esriFieldTypeString"
                },
                "operator": "stringOperatorIsNot",
                "valueObj": {
                  "isValid": true,
                  "type": "value",
                  "value": "'a'"
                },
                "interactiveObj": "",
                "caseSensitive": false,
                "expr": "ACID <> '''a'''"
              }
            ],
            "expr": "(AltitudeFeet < 1000) AND (ACID <> '''a''')"
          }
        }
      ]
    }
  ]
}

Your browser is no longer supported. Please upgrade your browser for the best experience. See our browser deprecation post for more details.