Converting given Geometry into a PointCollection in ArcGIS

02-28-2020 08:11 AM
New Contributor III

I'm working on JavaFX desktop application and using the ArcGIS SDK v100.7.0. There is a scenario in my code, where i need to create a Polyline from a Geometry object. I'm getting this geometry from the SketchEditor using sketchEditor.getGeometry(). I actually want to add a Point to the sketchEditor geometry when in Polyline creation mode using the point Lat Long inserted by the user and not by mouse click on map. How do i get the sketch geometry into a PointCollecion, add my new Point into the collection, create Polygon from this collection and then pass this polygon back to the sketchEditor.start() method. How do i achieve this?

0 Kudos
1 Reply
Esri Contributor

Hi Fuzail,

You can create a GeometryBuilder using GeometryBuilder.create(Geometry) and use that to add the new Point. Hope that helps.


0 Kudos