Solved! Go to Solution.
public static ICollection<Field> GetFields(Graphic graphic) { var fields = new List<Field>(); foreach (var attribute in graphic.Attributes) { var field = new Field() { FieldName = attribute.Key, Alias = attribute.Key }; if (attribute.Key.ToLower() == "shape") { field.Type = Field.FieldType.Geometry; } else if (attribute.Key.ToLower() == "fid") { field.Type = Field.FieldType.OID; } else if (attribute.Key.ToLower() == "objectid") { field.Type = Field.FieldType.OID; } else if (attribute.Value is int) { field.Type = Field.FieldType.Integer; } else if (attribute.Value is double) { field.Type = Field.FieldType.Double; } else if (attribute.Value is float) { field.Type = Field.FieldType.Single; } else if (attribute.Value is DateTime) { field.Type = Field.FieldType.Date; } else { field.Type = Field.FieldType.String; } fields.Add(field); } return fields; }
Charles,
Have you checked the code under ArcGIS Runtime SDK for WPF samples (desktop application )?
Under - Geometry -> Geometry operations -> Buffer a point
Similar to what Mike suggested.
Does this help for your requirement?
Though note that the graphics returned by the service don't include the attributes. However the returned graphics are always in the same order as the input graphics so you can easily retrieve the attributes from the input graphics.