I'm thinking this should be easy, but I can't find any information on how to do this programmatically. I am porting an ArcMap Extension that has a move function for a point feature. We use the ISnapEnvironment and other Snapping classes to do this. I can't, for the life of me find any examples or how to do this in ArcGIS Pro SDK. I know how to move a point, but I need the user to be able to drag to the new location.
I love how the built in move edit works in ArcGIS Pro. If I can figure out a way to just capture the move do some application specific processing, that would be good too.
Any help would be most appreciated!
My workflow to move a feature (point, line, polygon) is:
1. When mouse down on a feature, hide the selected feature (set layer's query) and store mouse down location
2. Add overlay (MapView.AddOverlay) using geometry and symbol from this feature
3. In MouseMove event of MapTool, detect when mouse location hover overlay, use GeometryEngine.NearestPoint or GeometryEngine.Distance. If mouse down and move, calculate move distance from mouse down location to current mouse location
4. Offset overlay geometry with this distance
5. Use MapView.UpdateOverlay to update overlay with new calculated geometry.
6. When mouse up, update feature's geometry with new geometry. Don't update feature's geometry while mouse moving, it's too slow.
7. When unselect (click to other location,...), remove overlay and show the feature.