Select to view content in your preferred language

Edit Point, move to XY

1211
2
05-31-2013 10:00 AM
KenMorefield
Regular Contributor
I'm wondering if somebody has a code sample to help me out... I'm using the editor widget in one of my applications and it works great.  What I'd like to be able to do is to select a point location from a feature layer, and move the point to a specific XY coordinate.  I can currently click and drag a point just fine, but I'm trying to figure out how to get that point to an EXACT coordinate... Any ideas?  So the user will click a point, then fill out a Latitude textbox and a longitude textbox.  A submit button will then trigger the point to move to the Lat/Long location and save the edit all in one action...

Thanks,
Ken
0 Kudos
2 Replies
KellyHutchins
Esri Notable Contributor
One option might be to create a right-click context menu for the feature that allows the user to enter the new x,y location. Here's an example that shows how to create a context menu.

http://developers.arcgis.com/en/javascript/jssamples/graphics_contextmenu.html
0 Kudos
KenMorefield
Regular Contributor
Hi Kelly,
Thanks for the pointer.  What I'm really struggling with is how to go about passing an XY coordinate to the editor in order to "move" a selected feature.  It seems as though the "move" functionality only applies to mouse-clicks in a drag and drop kind of way...  I don't know if I need to use the snapping manager in some fashion, to snap my point to an XY coordinate?  I know I can get what I need using geoprocessing services (I've done it), but it is a really cumbersome process that does not run very quickly for the user.  So if I had a textbox for latitude, a textbox for longitude, how do I pass those values to the "selected" editable feature in such a way as to move that feature (and commit the edit)?  Anybody have an idea if this is possible?

Thanks so much!
Ken
0 Kudos