laptop and a wrench

Bug

The watch method on the connectionStatus property of a StreamLayerView does not execute in a SceneView.

Last Published: August 6, 2018 ArcGIS API for JavaScript
Bug ID Number BUG-000115331
SubmittedJuly 13, 2018
Last ModifiedJune 5, 2024
Applies toArcGIS API for JavaScript
Version found4.8
Operating SystemWindows OS
Operating System Version10.0 64 Bit
StatusWill Not Be Addressed

Additional Information

This appears to be app specific. 2D and 3D handle resolving the layerView slightly differently. The app appears to work for 2D because the layerView is resolved before the StreamLayer is connected. In the `whenLayerView` block, the `connectionStatus` is initially disconnected. The watcher later fires when the status changes to `connected`. For 3D, this isn't the case so the watcher never fires. This means that the `processConnect` function is never invoked. The application shouldn't assume that the initial state of the `connectionStatus` is `disconnected`. In the `mapView.whenLayerView(layerView)` block you first need to check what the `connectionStatus` is currently set to, e.g.: mapView.whenLayerView(streamLayer).then(function(layerView) { streamLayerView = layerView; if (layerView.connectionStatus === "connected") { processConnect(); } layerView.watch("connectionStatus", function(value) { ... } If you call `streamLayerView.disconnect()`, the watcher event does get fired.

Steps to Reproduce

Bug ID: BUG-000115331

Software:

  • ArcGIS API for JavaScript

Get notified when the status of a bug changes

Download the Esri Support App

Discover more on this topic

Get help from ArcGIS experts

Contact technical support

Download the Esri Support App

Go to download options