Hi,
I am working on a offline application using ArcGIS Runtime for .NET and my requirement is to create Layer visibility control for local Base map layer. Can someone suggest me how to call dynamic local layer in ArcGIS Runtime for .NET and to display its sub layers in Layer visibility control (Layer On/Off Control).
Hi Asser,
Thanks for your kind support.But it seems like the code uses dynamic online service layer.I am working on a offline application,so i cant use online dynamic service layer.Also i want to know is it possible to use local dynamic layer in arcgis runtime sdk for .net.I see that it is possible to use local dynamic layer in ArcGIS Runtime sdk for wpf.But when i try to call it in sdk for .net it looks like unsupported.
Hi Sandeep,
You can not chose to show or hide specific sub layers in a tiled layer, Tiled layers is a cached tiles that you define what visible and what is not before creating it. So you only have the ability to show or hide the whole layer.
You can do that with Dynamic layer and show or hide the sub layers the way you want. And this desktop sample will show you how to do it
Thanks,
Asser
I am using a local tiled layer as basemap and want its sublayers to appear in layer visibility control.This is the code I am using to bind Layers of Basemap.
<TreeView Grid.Row="1" ItemsSource="{Binding ElementName=MyMap, Path=Layers}" Margin="20">
<TreeView.ItemContainerStyle>
<Style TargetType="TreeViewItem">
<Setter Property="TreeViewItem.IsExpanded" Value="True" />
<Setter Property="Focusable" Value="False" />
</Style>
</TreeView.ItemContainerStyle>
<TreeView.ItemTemplate>
<HierarchicalDataTemplate ItemsSource="{Binding ChildLayers}">
<Grid Width="150">
<Grid.RowDefinitions>
<RowDefinition />
</Grid.RowDefinitions>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto" />
<ColumnDefinition Width="*" />
</Grid.ColumnDefinitions>
<TextBlock Grid.Row="0" Grid.Column="0" Grid.ColumnSpan="2"
Text="{Binding DisplayName}" FontSize="16" Margin="0,8,0,0"/>
<CheckBox Grid.Row="1" Grid.Column="0" IsChecked="{Binding IsVisible, Mode=TwoWay}" />
<Slider Grid.Row="1" Grid.Column="1" Value="{Binding Opacity, Mode=TwoWay}"
TickFrequency="0.01" Minimum="0" Maximum="1" />
</Grid>
</HierarchicalDataTemplate>
</TreeView.ItemTemplate>
</TreeView>
But it binds the Basemap as a single layer. I want to show its sub layers in Tree view.So that I can show all layers used in Basemap in treeview list.
Please can you clarify which specific type of layer or types of layer you are referring to?
Cheers
Mike
Les membres connectés peuvent publier, suivre les mises à jour, et plus encore. Nouveau ici ? Inscrivez-vous gratuitement.
Find useful guides, FAQs, and documents to help you navigate and make the most of Esri Community.