Hi,
I try to figure out how to share a named trace configuration in order to use it through ArcGIS Enterprise.
What I have done so far :
- share a UN service to ArcGIS Entreprise 10.9
- create a webmap in Pro that uses the UN services
- add trace configurations to the map and enable sharing option
Now they are properly listed in my UN properties :
- share the webmap with Portal
Now I want to use this trace with the un-js-api-demo from https://github.com/hussein-nasser/un-js-api-demo
- connect the html exemple to the portal and webmap ItemID
- the authored traces are listed
- when tracing after adding a starting point :
{"success":false,"error":{"extendedCode":-2147208597,"message":"Un paramètre requis est absent du fichier JSON.","details":[]}}
--> parameter missing from the JSON file
Any idea ? Is the trace JSON configuration saved within the webmap JSON ?
Solved! Go to Solution.
I just pushed a fix for few bugs that I found, can you try again?
https://github.com/hussein-nasser/un-js-api-demo/blob/master/un-js-api-demo.html
I just pushed a fix for few bugs that I found, can you try again?
https://github.com/hussein-nasser/un-js-api-demo/blob/master/un-js-api-demo.html
Hi Hussein,
Thank you, it works with the -421.html file !
I still have a question, where is the JSON representing the trace configuration stored ? When looking at my webmap's JSON, I only see little information on the UN and Trace Configuration :
Regards
When you share a webmap with named trace configuration, the GUIDs of the trace configuration is persisted in the webmap definition along side the utility network layer. The full definition of the trace configuration can be retrieved through the UtilityNetworkServer by passing the GUID to /trace. This is so that you can alter the trace configuration without republishing the webmap and also to keep the definition of the webmap compact.
Thank you for the clarification
@HusseinNasser2 , I seem to be getting same error message "A required parameter is missing from the JSON" when I try to run a trace either using the Trace widget in ExB or even via the REST API.
I have a bunch of traces configured on the database. I have also shared couple of these via the webmap. The trace works in Pro. I am using ArcGIS Enterprise 11.1 , ExB 1.15
On making the Rest call, I have populated following parameters:
Trace type= downstream
Trace Locations=
[{"isFilterBarrier":false,
"globalId": {D0C706FB-B4D1-4645-A1B1-24CF0B1DE7F4}
,"percentAlong":0.5,"traceLocationType":"startingPoint"}]
traceConfigurationGlobalId = {EF2C3918-A7B5-46DC-A615-7F0EFB56FCC4}
I have also tried to populate other parameters, but it made no difference.
Any idea?
Hello,
I think you need "terminalId" key in your locations dictionary even if the feature does not have any terminal
{
"traceLocationType": locationType,
"globalId": gid,
"terminalId": terminal,
"percentAlong": percentageAlong,
"isFilterBarrier": False
}
Hi @PierreloupDucroix , Thanks for the response. It's got me a little closer to the cause. It turned out the global ID was incorrect. I didn't need the terminal ID. I can now run trace using REST API.
However using Experience Builder, I see the traceLocations parameter used on the rest call does not include the global ID. I have clicked on map to set the start location. It found the water main, but has not picked up the global ID.
This issue seems to start occurring when I created a group layer in the webmap and added water main as a sublayer under Water Line.
Looks like you figured it out, you just need to add " " on the globalid, otherwise the JSON is invalid.
[{"isFilterBarrier":false,
"globalId": "{D0C706FB-B4D1-4645-A1B1-24CF0B1DE7F4}"
,"percentAlong":0.5,
"traceLocationType":"startingPoint"}]
Now we need to figure why Trace widget isn't sending the globalid though, sounds like a bug