When running the Utility network trace widget, the results will be added as graphics.
How to get the graphics results data in the console ?
I tried to trigger the events which is documented in the api documentation add-result-area. But the event is not working.
Here my code is below
Hi ,
How can i export the trace result using javascript .
Hi,
If you are calling methods on the widget directly in your code, make sure you call https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-UtilityNetworkTrace-Utili...
so that your watching on the emit will get fired.
You can also access or watch the resultArea property to get results of the trace as well at any time after a trace is run.
https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-UtilityNetworkTrace-Utili...
console.log(utilityNetworkTrace.viewModel.traceResults)
Or if you want to watch when it changes
https://developers.arcgis.com/javascript/latest/api-reference/esri-core-reactiveUtils.html
reactiveUtils.watch( () => utilityNetworkTrace.viewModel.traceResults.length, () => { //your code });