I am attampting to reference multiple maps to a single application. They all woulc consist of a mapserver and a single FeatureLayer which i would like to edit.So far I have The following XAML
<ComboBox x:Name="combo_select" Height="33" Margin="57,405,48,0" VerticalAlignment="Top" SelectionChanged="SelectionChanged">
<TextBlock Text="Standard Map" Tag="<url>/FeatureServer/0"/>
<TextBlock Text="Map Variant 2" Tag="<url>/FeatureServer/0"/>
</ComboBox>
esri:Map x:Name="Map" Background="White" Grid.Column="1" Margin="8" Grid.Row="1">
<esri:ArcGISDynamicMapServiceLayer ID="Layers" Url="<url>/MapServer"/>
<esri:FeatureLayer ID="CB" Url="<url>FeatureServer/0"
MouseLeftButtonUp="FeatureLayer_MouseLeftButtonUp" DisableClientCaching="True" AutoSave="False"
Mode="OnDemand" OutFields="*"/>
And for my C# code behind I haveprivate void SelectionChanged(object sender, System.Windows.Controls.SelectionChangedEventArgs e)
{
FeatureLayer arcgisLayer = Map.Layers["CB"] as FeatureLayer;
arcgisLayer.Url = ((ComboBox)sender).Tag as string;
I based my code on the radio button model from the sample. MY problems are 2 fold. The first is I have set it up to just change the featureLayers currently, however the layers do not change. Also my map is based on slightly differnet base maps and moving foreward i do not see the ability to change both the map url and the FeatureLayer URL.