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); }
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.