Beispiel #1
0
 private void initialise()
 {
     base.Id         = string.Empty;
     _name           = string.Empty;
     _visibility     = true;
     _open           = true;
     _atomAuthor     = string.Empty;
     _atomLink       = string.Empty;
     _address        = string.Empty;
     _addressDetails = string.Empty;
     _phoneNumber    = string.Empty;
     _snippet        = string.Empty;
     _description    = string.Empty;
     _abstractView   = null;
     _timePrimitive  = null;
     _styleUrl       = string.Empty;
     _styleSelector  = null;
     _region         = null;
     _extendedData   = null;
 }
Beispiel #2
0
        public virtual void handleNode(XmlNode node, Logger log)
        {
            string key = node.Name.ToLower();

            debug("KmlFeature handling key " + key);
            switch (key)
            {
            case "name":
                _name = node.InnerText;
                break;

            case "visibility":
                _visibility = (node.InnerText.Equals("1")) ? true : false;
                break;

            case "open":
                _open = (node.InnerText.Equals("1")) ? true : false;
                break;

            case "atom:author":
            case "author":
                _atomAuthor = node.InnerText;
                break;

            case "atom:link":
            case "link":
                _atomLink = node.InnerText;
                break;

            case "xal:addressdetails":
            case "addressdetails":
                _addressDetails = node.InnerText;
                break;

            case "phonenumber":
                _phoneNumber = node.InnerText;
                break;

            case "snippet":
                _snippet = (node.InnerXml.Length > 0) ? node.InnerXml : node.InnerText;
                break;

            case "description":
                _description = (node.InnerXml.Length > 0) ? node.InnerXml : node.InnerText;
                break;

            case "styleurl":
                _styleUrl = node.InnerText;
                break;

            case "timespan":
                _timePrimitive = new KmlTimeSpan(node, log);
                break;

            case "timestamp":
                _timePrimitive = new KmlTimeStamp(node, log);
                break;

            case "extendeddata":
            case "metadata":
                _extendedData = new KmlExtendedData(node, log);
                break;

            case "styleselector":
                throw new Exception("StyleSelector called rather than subclass");

            case "region":
                _region = new KmlRegion(node, log);
                break;

            case "lookat":
                _abstractView = new KmlLookAt(node, log);
                break;

            case "camera":
                _abstractView = new KmlCamera(node, log);
                break;

            case "style":
                _styleSelector = new KmlStyle(node, log);
                break;

            case "stylemap":
                _styleSelector = new KmlStyleMap(node, log);
                break;

            default:
                debug("skipping tag :: " + key);
                break;
            }
            ;
        }