private void ApplyBasemap(string basemapName)
{
// Set the basemap for the map according to the user's choice in the list box
var myMap = MyMapView.Map;
switch (basemapName)
{
case "Light Gray":
// Set the basemap to Light Gray Canvas
myMap.Basemap = Basemap.CreateLightGrayCanvas();
break;
case "Topographic":
// Set the basemap to Topographic
myMap.Basemap = Basemap.CreateTopographic();
break;
case "Streets":
// Set the basemap to Streets
myMap.Basemap = Basemap.CreateStreets();
break;
case "Imagery":
// Set the basemap to Imagery
myMap.Basemap = Basemap.CreateImagery();
break;
case "Ocean":
// Set the basemap to Oceans
myMap.Basemap = Basemap.CreateOceans();
break;
default:
break;
}
}