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 void AddGreatCircleLayer()
        {
            GreatCirlceRouteLayer layer = new GreatCirlceRouteLayer();

            layer.LatStart = Earth3d.MainWindow.viewCamera.Lat;
            layer.LatEnd = Earth3d.MainWindow.viewCamera.Lat - 5;
            layer.LngStart = Earth3d.MainWindow.viewCamera.Lng;
            layer.LngEnd = Earth3d.MainWindow.viewCamera.Lng + 5;
            layer.Width = 4;
            layer.Enabled = true;
            layer.Name = Language.GetLocalizedText(1144, "Great Circle Route");
            LayerList.Add(layer.ID, layer);
            layer.ReferenceFrame = currentMap;
            AllMaps[currentMap].Layers.Add(layer);
            AllMaps[currentMap].Open = true;
            version++;
            LoadTree();

            GreatCircleProperties props = new GreatCircleProperties();
            props.Layer = layer;
            props.Owner = Earth3d.MainWindow;
            props.Show();
        }