Hi,I have an arcGISDynamicMapService which i took one of its childLayer and made it invisible. also added it as FeatureLayer to mymap. The legend is showing me both the hidden layer and the featureLayer - i want to change bindings of this specific layer onlyin order to influence only the feature layer visibility and keep the original layer hidden. (But keep the regular bindings to the other layers)Note: i have removed the featureLayer from legend - i want the user see it in the original service hierarchy.Any ideas?
Hi,thanks for replying.I have followed the sample you gave me, and it works fine.But now i have lost functionality of the legend when check/uncheck the group layer check box which the feature layer became its child after the replacement.Should i handle it myself now? or there is something else i could do?
void UpdateFeatureLayerVisibility() { if (_featureLayerItem != null && _groupLayerItem != null) _featureLayerItem.IsEnabled = _groupLayerItem.Layer.Visible && _groupLayerItem.IsEnabled; }
if (subLayerItem != _featureLayerItem) // else replacement already done { dynamicLayerItem.Layer.PropertyChanged += (s, evt) => { if (evt.PropertyName == "Visible") UpdateFeatureLayerVisibility(); }; ((ISublayerVisibilitySupport)dynamicLayerItem.Layer).VisibilityChanged += (s, evt) => UpdateFeatureLayerVisibility(); ......
サインインしたメンバーは投稿、更新のフォローなどができます。初めてですか?無料アカウントを登録してください。
Find useful guides, FAQs, and documents to help you navigate and make the most of Esri Community.