Hello,
I am trying to get all points of a polygon geometry.
I can't get it to work.
I try:
Esri.ArcGISRuntime.Geometry.Polygon polygon = (Esri.ArcGISRuntime.Geometry.Polygon)Esri.ArcGISRuntime.Geometry.Geometry.FromJson(geoJson);
But Polygon do not has Rings property or similar to obtain point list.
Thanks !!
Solved! Go to Solution.
Polygons (and Polylines) are made up of collection of Parts. So each ring will be a Part in the Part array
var polygon = (Polygon)Geometry.FromJson(polyJson);
foreach (var part in polygon.Parts)
{
// do something with the part
// part is an IEnumerable of segments
}
Polygons (and Polylines) are made up of collection of Parts. So each ring will be a Part in the Part array
var polygon = (Polygon)Geometry.FromJson(polyJson);
foreach (var part in polygon.Parts)
{
// do something with the part
// part is an IEnumerable of segments
}