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
@NarendranathMandal , right now the result graphics are only created when they are shown in the view, see #resultAreaProperties
Could that be the reason you are not getting the results in the console?
I have included that show properties in UtilityNetworkTrace. But still I am not getting the graphics results in the console.
Also refer to related post: Utility Network Trace Result - Esri Community
@NarendranathMandal Many people are out of the office this week, we'll get back to you with a resolution or more questions next week.
@NarendranathMandal can you confirm that a polygon result area is drawn in the map after a trace is run and you toggle on the result area?
Also in your function, you need a parameter since the event emits a graphic.
function getResult(graphic) {console.log(graphic)}
Yes . a polygon result area is drawn in the map , Only the function is not getting trigger .
In your UtilityNetworkTrace constructor, make sure you have enableResultArea defined and set to TRUE. The you will see the result area toggle, at which point, if you toggle, it fires the callback. See images below.
Thank You , I got the area . Any idea how i can get the atributes print in the console or export the atributes from the trace result ?