Bug with client-side StreamLayer

126
1
2 weeks ago
AddisonShaw
New Contributor III

There seems to be an issue with StreamLayer (ArcGIS SDK 4.29.10), specifically when you send client-side features a single time. I want to say it's a timing issue, because wrapping the sendMessageToClient in a setTimeout with a 1000ms wait fixes the issue.

Reproduced the issue here: https://codepen.io/addypizza/pen/bGJPpEg

Notice that if you wrap the above sendMessageToClient call in a 1000ms setTimeout, it works.

0 Kudos
1 Reply
UndralBatsukh
Esri Regular Contributor

Hi there, 

You need to wait for the StreamLayer is loaded and its layerView is in place. At 4.29,  you need to wait for StreamLayerView.updating becomes false once at the time of load. At 4.30, you will only need to wait for the StreamLayerView is created.  

In any case see this thread - https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/first-calls-to-sendmessagetoclien...

0 Kudos