Pan while editing vertices causes edit graphic to revert to original geometry

671
0
02-19-2012 02:24 PM
BenGiles
New Contributor
I'm observing this behaviour in v2.7 of the API:

EXPECTED:

1. I create an edit toolbar and cause it to be activated on a feature.
2. I add or move vertices on the feature and the graphic updates accordingly.
3. I pan the map or otherwise change the extent.
4. The graphic of the feature I'm editing maintains the edited geometry.

WHAT HAPPENS:

1. I create an edit toolbar and cause it to be activated on a feature.
2. I add or move vertices on the feature and the graphic updates accordingly.
3. I pan the map or otherwise change the extent.
4. The graphic of the feature I'm editing reverts to the geometry of the feature before editing began. However the vertices and ghost vertices remain in their edited position.

TO REPLICATE:

1. Go to this sample: http://help.arcgis.com/en/webapi/javascript/arcgis/demos/ed/ed_toolbar.html
2. Double click a feature to begin editing vertices.
3. Move a vertex.
4. Pan the map.

My question is, how do I get my expected behaviour?

I suppose you could do this (haven't tried it though):

1. Create event handler for onVertexAdd and onVertexMoveStop, storing the new geometry.
2. Create an event handler for map extent change and set the geometry of the edit feature to the last geometry set in (1).

But this seems hackish. The fact that the behaviour is "weird" in the sample above is telling.

Thanks
0 Kudos
0 Replies