laptop and a wrench

Error

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

Última publicación: August 6, 2018 ArcGIS API for JavaScript
Número de ID del error BUG-000115331
EnviadoJuly 13, 2018
Última modificaciónJune 5, 2024
Relacionado conArcGIS API for JavaScript
Versión encontrada4.8
Sistema operativoWindows OS
Versión de sistema operativo10.0 64 Bit
EstadoWill Not Be Addressed

Información adicional

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.

Pasos para reproducir

ID del error: BUG-000115331

Software:

  • ArcGIS API for JavaScript

Recibir notificaciones cuando cambie el estado de un error

Descargar la aplicación de soporte de Esri

Descubrir más sobre este tema

Obtener ayuda de expertos en ArcGIS

Contactar con el soporte técnico

Descargar la aplicación de soporte de Esri

Ir a opciones de descarga