Map MyMap = MapApplication.Current.Map; LayerCollection MyLayers = MyMap.Layers; Layer BaseLayer = null; foreach (Layer MyLayer in MyLayers) { if ((MyLayer is ArcGISTiledMapServiceLayer) || (MyLayer is OpenStreetMapLayer)) { BaseLayer = MyLayer; } } if (!BaseLayer.Visible) { BaseLayer.Visible = true; } else { BaseLayer.Visible = false; }
Membros conectados podem postar, seguir atualizações e mais. Novo aqui? Registre uma conta gratuita.
Find useful guides, FAQs, and documents to help you navigate and make the most of Esri Community.