I have problem with creating new map instance.I have 2 tiled layers with different spatial reference (102100 and 54004)i try to change my map baselayer from one layer to another one. So I try to create new instance of the map with new extent and spatial reference. But layer no visible in new map (resolution = NaN)my code:lyr - is new layer
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();
what's wrong?