When I switch between maps that have a different spatial reference I get an exception that the Layers have to be cleared first. So I cleared the layers and add a new ArcGISTiledMapServiceLayer, but nothing gets displayed and no exceptions. Any Ideas? private void SetMapUrl(string mapUrl)
{
MyMap.Layers.Remove(ServiceLayer);
ArcGISTiledMapServiceLayer serviceLayer = Resources["ServiceLayer"] as ArcGISTiledMapServiceLayer;
serviceLayer.Url = mapUrl;
MyMap.Layers.Insert(0, serviceLayer);
if (UseMapProxy(mapUrl))
{
string proxyUrl = BaseUrl + "/ArcGisMapProxyHandler.ashx";
serviceLayer.ProxyURL = proxyUrl;
}
else
serviceLayer.ProxyURL = "";
}