Toolkit Table of Contents doesn't show group layer sub-layers

916
4
Jump to solution
04-26-2022 06:16 AM
EricPfirman
New Contributor III

I am using the WPF TableOfContents control in the ESRI ArcGISRuntime Toolkit Preview version 100.13. It doesn't show the contents (sub-layers) of group layers within my MapImageLayer. Has anybody come up against this? What did you do? Should I try to install the toolkit source and try to fix this myself? Should I write my own TOC? Does anyone have a TOC control to share?

0 Kudos
1 Solution

Accepted Solutions
NathanCastle1
Esri Contributor

I’m sorry to hear that you’re seeing problems with the Toolkit’s TOC control.

Toolkit is open source, so you are always welcome to fork it, make modifications, file issues, and suggest improvements. Ideally, it would work out of the box without changes.

Does the layer display properly in the ArcGIS Online Web Map Viewer? Are you able to share the layer you’re using, or a similarly configured public service?

You may want to try explicitly loading the map image layer and all of its sublayers before adding it to the map. If it works with the explicit load, that would help narrow down the issue.

I hope that helps.

View solution in original post

4 Replies
NathanCastle1
Esri Contributor

I’m sorry to hear that you’re seeing problems with the Toolkit’s TOC control.

Toolkit is open source, so you are always welcome to fork it, make modifications, file issues, and suggest improvements. Ideally, it would work out of the box without changes.

Does the layer display properly in the ArcGIS Online Web Map Viewer? Are you able to share the layer you’re using, or a similarly configured public service?

You may want to try explicitly loading the map image layer and all of its sublayers before adding it to the map. If it works with the explicit load, that would help narrow down the issue.

I hope that helps.

EricPfirman
New Contributor III

Thank you for the suggestions. I tried viewing the map image layer in the ArcGIS Online Web Map Viewer. The layers look fine in the catalog. I have attached a screenshot of the AGOL TOC and a screenshot from the Runtime TOC so you can see the difference. In the AGOL TOC I can expand the Appraiser Info group layer while in the Runtime TOC I cannot.

Unfortunately, I cannot share the layer.

I am not sure what you mean by "explicit load". I did publish the map image layer first and then added it to a new web map.

0 Kudos
NathanCastle1
Esri Contributor

For the explicit load, I recommend waiting for `LoadAsync` on the `Map` before adding it to the `MapView`. If that doesn't work, I recommend working through the layers, and doing the same for the `ArcGISMapImageLayer` and then each of the sublayers. That will help narrow down the issue. From the behavior you're seeing, it isn't clear if the problem exists in the Toolkit or in Runtime.


0 Kudos
EricPfirman
New Contributor III

Thank you. Once I explicitly loaded the layers and sub-blayers, the TOC behaved as expected.

0 Kudos