ESRI.ArcGIS.Client.Toolkit.DataSources.Kml.KmlToFeatureDefinition.ExtractFeatureStyleInfo C# (CSharp) Method

ExtractFeatureStyleInfo() private static method

private static ExtractFeatureStyleInfo ( KMLStyle kmlStyle, System.Xml.Linq.XElement placemark ) : void
kmlStyle KMLStyle
placemark System.Xml.Linq.XElement
return void
        private static void ExtractFeatureStyleInfo(KMLStyle kmlStyle, XElement placemark)
        {
            XNamespace kmlNS = placemark.Name.Namespace;
            XElement colorElement = placemark.Element(kmlNS + "color");
            if (colorElement != null)
                kmlStyle.PolyFillColor = GetColorFromHexString(colorElement.Value);

            XElement iconElement = placemark.Element(kmlNS + "Icon");
            if (iconElement != null)
                kmlStyle.IconHref = iconElement.Value.Trim();
        }