예제 #1
0
        public KmlIconStyle(XmlNode parent, Logger log) : this()
        {
            Log += log;
            foreach (XmlNode node in parent.ChildNodes)
            {
                string key = node.Name.ToLower();
                switch (key)
                {
                case "color":
                    Colour = new KmlColour(node.InnerText, log);
                    break;

                case "scale":
                    Scale = float.Parse(node.InnerText);
                    break;

                case "icon":
                    _icon = new KmlIcon(node, log);
                    break;

                default:
                    break;
                }
                ;
            }
        }
예제 #2
0
        public KmlBalloonStyle(XmlNode parent, Logger log) : this()
        {
            Log += log;
            if (null != parent.Attributes["id"])
            {
                _id = parent.Attributes["id"].Value;
            }
            foreach (XmlNode node in parent.ChildNodes)
            {
                string key = node.Name.ToLower();
                switch (key)
                {
                case "bgcolor":
                    _colour = new KmlColour(node.InnerText, log);
                    break;

                case "textcolor":
                    _textColour = new KmlColour(node.InnerText, log);
                    break;

                case "text":
                    _text = node.InnerText;
                    break;

                case "displaymode":
                    _visible = (node.InnerText.ToLower().Equals("hide") ? false : true);
                    break;
                }
                ;
            }
        }
예제 #3
0
파일: KmlOverlay.cs 프로젝트: hnjm/libKml
        public KmlOverlay(XmlNode parent, Logger log) : base(parent)
        {
            Log += log;
            foreach (XmlNode node in parent.ChildNodes)
            {
                string key = node.Name.ToLower();
                switch (key)
                {
                case "color":
                    _colour = new KmlColour(node, log);
                    break;

                case "drawOrder":
                    _drawOrder = Int32.Parse(node.InnerText);
                    break;

                case "Icon":
                    _icon = new KmlIcon(node, log);
                    break;
                }
                ;
            }
        }
예제 #4
0
        public KmlColourStyle(XmlNode parent, Logger log) : this()
        {
            Log += log;
            if (null != parent.Attributes["id"])
            {
                _id = parent.Attributes["id"].Value;
            }

            foreach (XmlNode node in parent.ChildNodes)
            {
                string key = node.Name.ToLower();
                switch (key)
                {
                case "color":
                    _colour = new KmlColour(node.InnerText, log);
                    break;

                case "colormode":
                    _colourMode = colourModeFromString(node.InnerText);
                    break;
                }
                ;
            }
        }
예제 #5
0
파일: KmlOverlay.cs 프로젝트: hnjm/libKml
        public new void handleNode(XmlNode node, Logger log)
        {
            string key = node.Name.ToLower();

            switch (key)
            {
            case "color":
                _colour = new KmlColour(node.InnerText, log);
                break;

            case "draworder":
                _drawOrder = int.Parse(node.InnerText);
                break;

            case "icon":
                _icon = new KmlIcon(node, log);
                break;

            default:
                base.handleNode(node, log);
                break;
            }
            ;
        }