private void AddOperationalLayers()
{
// Clear the operational layers from the map
Map myMap = MyMapView.Map;
myMap.OperationalLayers.Clear();
// Loop through the selected items in the operational layers list box
foreach (var item in LayerListView.SelectedItems)
{
// Get the service uri for each selected item
var layerInfo = (KeyValuePair<string, string>)item;
var layerUri = new Uri(layerInfo.Value);
// Create a new map image layer, set it 50% opaque, and add it to the map
ArcGISMapImageLayer layer = new ArcGISMapImageLayer(layerUri);
layer.Opacity = 0.5;
myMap.OperationalLayers.Add(layer);
}
}