private void handleLayerChildrenVisibleChangeRequested(Object sender, LayerActionEventArgs e) { switch (e.LayerAction) { case LayerAction.Enabled: case LayerAction.Disabled: foreach (String layerName in e.Layers) { LayerGroup group = Map.Layers[layerName] as LayerGroup; if (group != null) { foreach (ILayer layer in group) { if (layer == group.MasterLayer) { continue; } if (e.LayerAction == LayerAction.Enabled) { Map.EnableLayer(layer); } else { Map.DisableLayer(layer); } } } } break; default: break; } }
private void handleLayerSelectionChangedRequested(Object sender, LayerActionEventArgs e) { switch (e.LayerAction) { case LayerAction.Selected: Map.SelectLayers(e.Layers); break; case LayerAction.Deselected: Map.DeselectLayers(e.Layers); break; default: break; } }
private void handleVisibleLayersChangeRequested(Object sender, LayerActionEventArgs e) { switch (e.LayerAction) { case LayerAction.Enabled: foreach (String layerName in e.Layers) { Map.EnableLayer(layerName); } break; case LayerAction.Disabled: foreach (String layerName in e.Layers) { Map.DisableLayer(layerName); } break; default: break; } }
private void handleLayerSelectabilityChangeRequested(Object sender, LayerActionEventArgs e) { // do nothing at this point }