示例#1
0
        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;
            }
        }
示例#2
0
        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;
            }
        }
示例#3
0
        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;
            }
        }
示例#4
0
 private void handleLayerSelectabilityChangeRequested(Object sender, LayerActionEventArgs e)
 {
     // do nothing at this point
 }