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); }
Los miembros registrados pueden publicar, seguir actualizaciones y más. ¿Nuevo aquí? Regístrate gratis.
Find useful guides, FAQs, and documents to help you navigate and make the most of Esri Community.