コード例 #1
0
 public void DisplayVoTableLayer(VoTableLayer layer)
 {
     if (VOTableDisplay != null)
     {
         VOTableDisplay.Invoke(layer, new EventArgs());
     }
 }
コード例 #2
0
        public static Layer FromXml(XmlNode layerNode, bool someFlag)
        {
            string layerClassName = layerNode.Attributes.GetNamedItem("Type").Value.ToString();

            string overLayType = layerClassName.Replace("TerraViewer.", "");

            if (overLayType == null)
            {
                return(null);
            }

            Layer newLayer = null;

            switch (overLayType)
            {
            case "SpreadSheetLayer":
                newLayer = new SpreadSheetLayer();
                break;

            case "GreatCirlceRouteLayer":
                newLayer = new GreatCirlceRouteLayer();
                break;

            case "GridLayer":
                newLayer = new GridLayer();
                break;

            case "ImageSetLayer":
                newLayer = new ImageSetLayer();
                break;

            case "Object3dLayer":
                newLayer = new Object3dLayer();
                break;

            case "OrbitLayer":
                newLayer = new OrbitLayer();
                break;

            case "VoTableLayer":
                newLayer = new VoTableLayer();
                break;

            default:
                return(null);
            }

            //Force inheritance.
            // TODO: Understand why this breaks in SS .8
            //Script.Literal("for(var method in this){\n /*if (({}).toString.call(this[method]).match(/\\s([a-zA-Z]+)/)[1].toLowerCase() == 'function'){\n*/ newLayer[method] = this[method];/*\n}*/\n}");

            newLayer.InitFromXml(layerNode);

            return(newLayer);
        }