public static IMarkerSymbol FromXElement(XElement ele) { if (ele == null) { return(null); } masSimpleMarkerStyle style = masSimpleMarkerStyle.Circle; string strStyle = ele.Attribute("style").Value; foreach (masSimpleMarkerStyle istyle in Enum.GetValues(typeof(masSimpleMarkerStyle))) { if (istyle.ToString() == strStyle) { style = istyle; break; } } Size size = new Size(); string sizeString = ele.Attribute("size").Value; string[] sizeStrings = sizeString.Split(','); size.Width = int.Parse(sizeStrings[0]); size.Height = int.Parse(sizeStrings[1]); // Color color = ColorHelper.StringToColor(ele.Attribute("color").Value); // ISimpleMarkerSymbol sym = new SimpleMarkerSymbol(style); sym.Size = size; sym.Color = color; // return(sym); }
public SimpleMarkerSymbol(masSimpleMarkerStyle style) : this() { _style = style; }