In the Document's GetMapCompleted event is it possible to get a list of the operational layers from the base map, rather than have to parse the DocumentValues property? The DocumentValues property seems to really only be a CLR object representation of the JSON that makes up the WebMap. I don't think it is.What I want to do is this:
void _webMap_GetMapCompleted(object sender, GetMapCompletedEventArgs e)
{
List<Layer> operationalLayers = e.OperationalLayers;
// Do something with those layers ...
}
Our objective is to parse the web map for everything EXCEPT the basemap and add that to an existing map. Unfortunately I'm not sure that it's reliable to do that because there could be web maps whose basemap is pertinent.Using the map like this is not reliable either because you only know what type of layer you have, not it's intended purpose (base or operational):
foreach(Layer layer in e.Map.Layers)
{
// Is layer operational or base map?
// No way to know?
}
As a last resort we could parse the DocumentValues property for a list of layer IDs for those in the operationalLayers List, then parse those out of the e.Map.Layers list. Again, this might not be reliable.Thanks,- Aaron