void popertiesMenu_Click(object sender, EventArgs e)
        {
            if (layerTree.SelectedNode.Tag is SpreadSheetLayer)
            {
                SpreadSheetLayer target = (SpreadSheetLayer)layerTree.SelectedNode.Tag;
                DataWizard.ShowPropertiesSheet(target);

                target.CleanUp();
                LoadTree();
            }
            else if (layerTree.SelectedNode.Tag is SpreadSheetLayer || layerTree.SelectedNode.Tag is Object3dLayer)
            {
                Object3dProperties props = new Object3dProperties();
                props.layer = (Object3dLayer)layerTree.SelectedNode.Tag;
                //   props.ShowDialog();
                props.Owner = Earth3d.MainWindow;
                props.Show();
            }
            else if (layerTree.SelectedNode.Tag is GroundOverlayLayer)
            {
                GroundOverlayProperties props = new GroundOverlayProperties();
                props.Overlay = ((GroundOverlayLayer)layerTree.SelectedNode.Tag).Overlay;
                props.OverlayLayer = ((GroundOverlayLayer)layerTree.SelectedNode.Tag);
                props.Owner = Earth3d.MainWindow;
                props.Show();
            }
            else if (layerTree.SelectedNode.Tag is GreatCirlceRouteLayer)
            {
                GreatCircleProperties props = new GreatCircleProperties();
                props.Layer = ((GreatCirlceRouteLayer)layerTree.SelectedNode.Tag);
                props.Owner = Earth3d.MainWindow;
                props.Show();
            }
        }
        private static Layer LoadGroundOverlayFile(string path, string parentFrame, bool interactive)
        {
            GroundOverlayLayer layer = new GroundOverlayLayer();

            layer.CreateFromFile(path);
            layer.Overlay.north = Earth3d.MainWindow.viewCamera.Lat + 5;
            layer.Overlay.south = Earth3d.MainWindow.viewCamera.Lat - 5;
            layer.Overlay.west = Earth3d.MainWindow.viewCamera.Lng - 5;
            layer.Overlay.east = Earth3d.MainWindow.viewCamera.Lng + 5;

            layer.Enabled = true;
            layer.Name = path.Substring(path.LastIndexOf('\\') + 1);
            LayerList.Add(layer.ID, layer);
            layer.ReferenceFrame = currentMap;
            AllMaps[currentMap].Layers.Add(layer);
            AllMaps[currentMap].Open = true;
            version++;
            LoadTree();

            if (interactive)
            {
                GroundOverlayProperties props = new GroundOverlayProperties();
                props.Overlay = layer.Overlay;
                props.OverlayLayer = layer;
                props.Owner = Earth3d.MainWindow;
                props.Show();
            }
            return layer;
        }