Polyline polyline = new Polyline(); void draw_DrawComplete(object sender, DrawEventArgs e) { draw.IsEnabled = false; GraphicsLayer l = this.MyMap.Layers["MyGraphicsLayer"] as GraphicsLayer; Symbol s = this.LayoutRoot.Resources["MyRedLineSymbol"] as Symbol; if (polyline.Paths.Count == 2) { l.Graphics.Clear(); l.Graphics.Add(new Graphic() { Geometry = polyline, Symbol = s }); } else { polyline.Paths.Add((e.Geometry as Polyline).Paths[0]); l.Graphics.Add(new Graphic() { Geometry = e.Geometry, Symbol = s }); } }
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.