Yes it is required to set the Fields property to ensure proper type serialization, or the fallback will be strings.
if (fields == null) { jw.WriteProperty(pair.Key, (pair.Value != null) ? string.Format(CultureInfo.InvariantCulture, "{0}", new object[] { pair.Value }) : null); }
public static void WriteAttributes(ArcGISJsonWriter jw, IDictionary<string, object> attributes, bool onlyDirty, Dictionary<string, object> dirtyList, List<string> fields, string objectIdField)
GraphicsLayer gl = layer as GraphicsLayer; if (gl != null) { var graphicsByGeometry = gl.Graphics.GroupBy(x => x.Geometry.GetType()); foreach (var group in graphicsByGeometry) { List<Graphic> graphics = group.ToList(); FeatureSet fs = new FeatureSet(graphics); jsonfeaturesets.JsonFeatures.Add(fs.ToJson(true)); } }
Aangemelde leden kunnen berichten plaatsen, updates volgen en meer. Nieuw hier? Registreer een gratis account.
Find useful guides, FAQs, and documents to help you navigate and make the most of Esri Community.