private void GraphicsLayer_MouseLeftButtonDown(object sender, GraphicMouseButtonEventArgs e) { var l = MyMap.Layers["DestinationLayer"] as GraphicsLayer; // This code clones the geometry (i.e. Polygon) var g = new Graphic() { Geometry = Geometry.Clone(e.Graphic.Geometry) }; // This code clones the attributes. foreach (var item in g.Attributes) g.Attributes[item.Key] = item.Value; l.Graphics.Add(g); }
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.