I couldn't find any example of creating a polygon in Unity, I hope you can help me.
Hi,
Code snippets that show how to create a polygon for the ArcGIS Maps SDK for Unity are completely wrong. This code works for creating a polygon.
ArcGISPolygonBuilder pb = new ArcGISPolygonBuilder(ArcGISSpatialReference.WGS84());pb.AddPoint(x1, y1);pb.AddPoint(x2, y2);pb.AddPoint(x3, y3);pb.AddPoint(x4, y4);
ArcGISPolygon polgon= (ArcGISPolygon)pb.ToGeometry();
Hello,
There are code snippets that show how to create a polygon for the ArcGIS Maps SDK for Unity available on the developers guide pages (see below). Hopefully this will help!
https://developers.arcgis.com/unity/spatial-and-data-analysis/geometry/#polygon
Les membres connectés peuvent publier, suivre les mises à jour, et plus encore. Nouveau ici ? Inscrivez-vous gratuitement.
Find useful guides, FAQs, and documents to help you navigate and make the most of Esri Community.