Take the 2-minute tour ×
Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. It's 100% free, no registration required.

We are working on a project in ArcGIS JavaScript and is going fine. We want to add sticky move tolerance to our project so it will not be so easy to move features on the map.

Is it not possible to add that to our project? Does anyone know anything about that?

share|improve this question
add comment

1 Answer

In v. 3.5 of the ArcGIS JavaScript API Edit toolbar, there is an onGraphicMoveStop event that fires when you stop moving the graphic. The event gives you the graphic and a transform object, which includes a dx (delta-x) and dy (delta-y). I think these are in screen units, but I'm not sure. Anyway, you can calculate the distance the distance dragged from those, and test it against your application's sticky move tolerance value.

While I haven't worked out how to stop the point from being dragged out until you exceed sticky tolerance, I have an example on jsFiddle that stops the graphic from being written back to the FeatureLayer if the sticky tolerance isn't exceeded. The example checks onVertexMoveStop for vertex editing

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.