Map.Layers.Clear(); collLayers.Remove(collLayers["BaseLayer"]);//layers collection Map.UpdateLayout(); lyr.ID = "BaseLayer"; Map = new ESRI.ArcGIS.Client.Map() { Extent = lyr.FullExtent, MaximumResolution=((TiledMapServiceLayer)lyr).TileInfo.Lods[0].Resolution , MinimumResolution = ((TiledMapServiceLayer)lyr).TileInfo.Lods[((TiledMapServiceLayer)lyr).TileInfo.Lods.Length-1].Resolution }; Map.Layers.Add(lyr);// add new base layer first foreach (Layer l in collLayers) // restore other layers { Map.Layers.Add(l); } Map.UpdateLayout();
LayerCollection layerCollection = MyMap.Layers; MyMap.Layers = null; MyMap.Extent = null; (layerCollection[0] as ArcGISTiledMapServiceLayer).Url = myNewBaseLayerUrl; MyMap.Layers = layerCollection;