private ESRI.ArcGIS.Client.Geometry.Polygon DrawCircle(ESRI.ArcGIS.Client.Geometry.MapPoint center, double radius, int pointsCount = 360) { ESRI.ArcGIS.Client.Geometry.Polygon p = new ESRI.ArcGIS.Client.Geometry.Polygon(); ESRI.ArcGIS.Client.Geometry.PointCollection pcol = new ESRI.ArcGIS.Client.Geometry.PointCollection(); double slice = 2 * Math.PI / pointsCount; for (int i = 0; i <= pointsCount; i++) { double rad = slice * i; double px = center.X + xRadius * Math.Cos(rad); double py = center.Y + YRadius * Math.Sin(rad); pcol.Add(new ESRI.ArcGIS.Client.Geometry.MapPoint(px, py)); } p.Rings.Add(pcol); return p; }
Aangemelde leden kunnen berichten plaatsen, updates volgen en meer. Nieuw hier? Registreer een gratis account.
Find useful guides, FAQs, and documents to help you navigate and make the most of Esri Community.