private void Initialize()
{
// Create new Map with basemap
Map myMap = new Map(Basemap.CreateTopographic());
// Create and set initial map location
MapPoint initialLocation = new MapPoint(
-11000000, 5000000, SpatialReferences.WebMercator);
myMap.InitialViewpoint = new Viewpoint(initialLocation, 100000000);
// Create feature table using a url
_featureTable = new ServiceFeatureTable(new Uri(_statesUrl));
// Create feature layer using this feature table
_featureLayer = new FeatureLayer(_featureTable);
// Set the Opacity of the Feature Layer
_featureLayer.Opacity = 0.6;
// Create a new renderer for the States Feature Layer
SimpleLineSymbol lineSymbol = new SimpleLineSymbol(
SimpleLineSymbolStyle.Solid, Color.Black, 1);
SimpleFillSymbol fillSymbol = new SimpleFillSymbol(
SimpleFillSymbolStyle.Solid, Color.Yellow, lineSymbol);
// Set States feature layer renderer
_featureLayer.Renderer = new SimpleRenderer(fillSymbol);
// Add feature layer to the map
myMap.OperationalLayers.Add(_featureLayer);
// Assign the map to the MapView
_myMapView.Map = myMap;
}