private async void Initialize()
{
// Create new Map
Map myMap = new Map();
// Create uri to the map image layer
var serviceUri = new Uri(
"http://sampleserver6.arcgisonline.com/arcgis/rest/services/SampleWorldCities/MapServer");
// Create new image layer from the url
ArcGISMapImageLayer imageLayer = new ArcGISMapImageLayer(serviceUri)
{
Name = "World Cities Population"
};
// Add created layer to the basemaps collection
myMap.Basemap.BaseLayers.Add(imageLayer);
// Assign the map to the MapView
MyMapView.Map = myMap;
// Wait that the image layer is loaded and sublayer information is fetched
await imageLayer.LoadAsync();
// Assign sublayers to the listview
sublayerListView.ItemsSource = imageLayer.Sublayers;
}
}