private void MyDrawObject_DrawComplete(object sender, ESRI.ArcGIS.Client.DrawEventArgs args) { GraphicsLayer graphicsLayer = MyMap.Layers["MyGraphicsLayer"] as GraphicsLayer; Envelope envelope = (Envelope)args.Geometry; Polygon rectangle = new Polygon(); PointCollection pointCollection = new PointCollection { new MapPoint(envelope.XMin, envelope.YMin), new MapPoint(envelope.XMin, envelope.YMax), new MapPoint(envelope.XMax, envelope.YMax), new MapPoint(envelope.XMax, envelope.YMin), new MapPoint(envelope.XMin, envelope.YMin) }; rectangle.Rings.Add(pointCollection); ESRI.ArcGIS.Client.Graphic graphic = new ESRI.ArcGIS.Client.Graphic() { Geometry = rectangle, Symbol = _activeSymbol, }; graphicsLayer.Graphics.Add(graphic); }
Membros conectados podem postar, seguir atualizações e mais. Novo aqui? Registre uma conta gratuita.
Find useful guides, FAQs, and documents to help you navigate and make the most of Esri Community.