internal KMLScreenOverlay(XmlElement element, KMLFile source) : base(element, source) { foreach (XmlNode oChild in element.ChildNodes) { if (oChild.NodeType != XmlNodeType.Element) continue; XmlElement oChildElement = oChild as XmlElement; if (oChildElement.Name.Equals("overlayXY")) { m_oOverlayXY = new KMLVec2(oChildElement); } else if (oChildElement.Name.Equals("screenXY")) { m_oScreenXY = new KMLVec2(oChildElement); } else if (oChildElement.Name.Equals("rotationXY")) { m_oRotationXY = new KMLVec2(oChildElement); } else if (oChildElement.Name.Equals("size")) { m_oSize = new KMLVec2(oChildElement); } else if (oChildElement.Name.Equals("rotation")) { m_dRotation = Single.Parse(oChildElement.InnerText, CultureInfo.InvariantCulture); } } }
internal KMLIconStyle(XmlElement element, KMLFile source) : base(element, source) { bool blHotSpotSet = false; foreach (XmlNode oChild in element.ChildNodes) { if (oChild.NodeType != XmlNodeType.Element) continue; XmlElement oChildElement = oChild as XmlElement; if (oChildElement.Name.Equals("scale")) { m_fScale = Single.Parse(oChildElement.InnerText, CultureInfo.InvariantCulture); } else if (oChildElement.Name.Equals("heading")) { m_fHeading = Single.Parse(oChildElement.InnerText, CultureInfo.InvariantCulture); } else if (oChildElement.Name.Equals("Icon")) { m_oIcon = new KMLIconOrLink(oChildElement, source); } else if (oChildElement.Name.Equals("hotSpot")) { m_oHotSpot = new KMLVec2(oChildElement); blHotSpotSet = true; } } if (!blHotSpotSet) m_oHotSpot = new KMLVec2(0.5, 0.5, KMLUnits.fraction, KMLUnits.fraction); }