You have to set the map extent to null by code like: MyMap.Extent = null;
MyMap.Layers.Clear(); MyMap.Extent = null; ArcGISTiledMapServiceLayer arcgisLayer = new ArcGISTiledMapServiceLayer(); Envelope env = new Envelope();
Envelope env = new Envelope();
To change the Spatialreference of a map, you have first to clear all the layers and to set the map extent to null before adding your new layers.I also recommend you to instantiate a new layer each time you change the URL instead of reusing the same one.
different spatial reference
What exactly are you having a problem with? From what I can see of what you have pasted is that you never added open street map to the map control.MyMap.Layers.Add(osmLayer); <-- missing
Les membres connectés peuvent publier, suivre les mises à jour, et plus encore. Nouveau ici ? Inscrivez-vous gratuitement.
Find useful guides, FAQs, and documents to help you navigate and make the most of Esri Community.