FeatureSet fs = new FeatureSet() { Fields = new List<Field>() //or FeatureLayer.LayerInfo.Fields }; fs.Features.Add(new ESRI.ArcGIS.Client.Graphic() { Attributes = { { "ID", "1" } }, Geometry = new ESRI.ArcGIS.Client.Geometry.MapPoint(1, 2) }); System.ComponentModel.BackgroundWorker worker = new System.ComponentModel.BackgroundWorker(); worker.DoWork += (a, b) => { FeatureSet fs2 = (FeatureSet)b.Argument; b.Result = fs2.ToJson(); }; worker.RunWorkerCompleted += (a, b) => { MessageBox.Show(b.Result.ToString()); }; worker.RunWorkerAsync(fs);
Angemeldete Mitglieder können Beiträge verfassen, Updates folgen und mehr. Neu hier? Registriere ein kostenloses Konto.
Find useful guides, FAQs, and documents to help you navigate and make the most of Esri Community.