Hi, I'm new to ArcGIS Runtime SDK for .Net, but have been working with ArcGIS since the beginning. Anyway, I'm now playing with this API to learn this by my self. I'm struggling with a sample code clipped from the FeatureLayerEditGeometry in the GITHub Project ArcGISRuntimeSDKDotNet_Desktop.
I've copied the code and pasted it into my own solution where I do some modification to fit my data.
In the line
var geometry = await MyMapView.Editor.EditGeometryAsync(feature.Geometry);
it fails withe the following error when the geometry type is a Point: Geometry type is not supported. It Works fine for lines and polygons.
Can't find anything in the documentation that EditGeometryAsync doesn't support Point geometry, and can't understand that Point either shouldn't be supported.
Any one else out there experience this behaviour?
Regards
Harald Lund
Solved! Go to Solution.
You can use RequestPointAsync to get point.
var geometry = await editor.RequestPointAsync();
You can handle point case by replacing it and in with other types, edit it.
if (feature.Geometry.GeometryType == GeometryType.Point)
geometry = await editor.RequestPointAsync(); // cannot "edit" points, replace it with the new one
else
geometry = await editor.EditGeometryAsync(feature.Geometry); // edit geometry
You can use RequestPointAsync to get point.
var geometry = await editor.RequestPointAsync();
You can handle point case by replacing it and in with other types, edit it.
if (feature.Geometry.GeometryType == GeometryType.Point)
geometry = await editor.RequestPointAsync(); // cannot "edit" points, replace it with the new one
else
geometry = await editor.EditGeometryAsync(feature.Geometry); // edit geometry
Hi,
Thank you for your quick respons!
Ok, I've seen that, but thought that EditGeometryAsync would handle Points as well. I'll check this out and see if this fits my need of point edit handling.
Thank you again for your answer.
This approach would work, and probably is the way to do edit point anyway.
Harald
Happy to help. I marked this answered.