Select to view content in your preferred language

Display legend of a group layer with sub feature layers

787
1
01-22-2011 11:34 PM
ChaimLevy
Emerging Contributor
Hi,

We have a map with feature layers which we would like to assign a customized WPF renderer and display map tips. So for this task, as we understood, these layers must be published and displayed as feature layers using the WPF SDK. Besides we wanted to use the SDK's legend control.

It seemed to work fine, though after assigning these layers under a group layer we couldn't display the group layer unless it's a ArcGISDynamicMapServiceLayer and using it we can't access the sub layers as feature layers (for customized rendering and map tips).

How should we solve this problem? - to display the group layer in the Legend control and still access the feature abilities of the layers below.

Thanks in advance,
Chaim
0 Kudos
1 Reply
DominiqueBroux
Esri Frequent Contributor
At the client side, a feature layer can't be attached to a group layer, it's always directly attached to the map.

If you publish a map service including group layers,  you will see the group layers hierarchy if you are using an ArcGISDynamicMapServiceLayer but you won't see the group layers if you create feature layers.

That's the default behavior. Now you can use the event Legend_Refreshed to customize the legend tree.

From my understanding, in your case you should get twice the same layer legend : one coming from the ArcGISDynamicMapService, one from the feature layer created for maptips. In this case, you could remove the feature layer legend (or to move it in the right location in the ArcGISDynamicMapService layer legend )
0 Kudos