Select to view content in your preferred language

Delete last point

170
0
05-18-2024 08:00 AM
MaríaBencomo
New Contributor

Hi!!

I'm drawing a route while the user in tapping on screen; it is possible to delete the last point been tapped?  I saving every point that has been tapped on  an ArrayList<Point>.

To draw the route, I use this method:

public Geometry drawRoute(ArrayList<Point> addPoint, int value){

PointCollection points = new PointCollection(addPoint, SpatialReferences.getWgs84());
Polyline polyline = new Polyline(points);

// densify the path as a geodesic curve and show it with the path graphic
Geometry pathGeometry = GeometryEngine
.densifyGeodetic(polyline, 1, mUnitOfMeasurement, GeodeticCurveType.GEODESIC);
path1.setGeometry(pathGeometry);

return pathGeometry;
}

 

Thanks...

0 Kudos
0 Replies