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); }
サインインしたメンバーは投稿、更新のフォローなどができます。初めてですか?無料アカウントを登録してください。
Find useful guides, FAQs, and documents to help you navigate and make the most of Esri Community.