Did you figure out what was going on? I seem to have the same problem:
Geometry has a spatial reference before the edit.
Geometry does not have a spatial reference after the edit.
Hi,
Thank you for reporting this bug.If you had tried to move the geometry using EditGeometry, Editor, or EditorWidget, there is currently a bug that SpatialReference becomes null if geometry was Polyline/Polygon after this operation. We will try to include the fix in future versions.
In the meantime, you can subscribe to EditGeometry.GeometryEdit and correct the geometry
SpatialReference spatialReference;
private void EditGeometry_GeometryEdit(object sender, EditGeometry.GeometryEditEventArgs e)
{
if (e.Action == EditGeometry.Action.GeometryMoved)
{
// this should not happen
if (e.Geometry.SpatialReference == null)
{
if (spatialReference == null && e.Graphic.Geometry.SpatialReference != null)
spatialReference = e.Graphic.Geometry.SpatialReference;
}
}
if (e.Action == EditGeometry.Action.EditCompleted)
{
// this is just a workaround
if(e.Graphic.Geometry.SpatialReference == null && spatialReference != null)
e.Graphic.Geometry.SpatialReference = spatialReference;
}
}