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 }); } }
Přihlášení členové mohou přispívat, sledovat aktualizace a další. Jste tu noví? Zaregistrujte si bezplatný účet.
Find useful guides, FAQs, and documents to help you navigate and make the most of Esri Community.