Is it possible to snap (drag and snap) a feature to another feature in the same layer?
OpenLayers.Control.Snapping module but it's snapping only to the points.
Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. It only takes a minute to sign up.Sign up to join this community
The OpenLayers snapping controls will snap to points and nodes in a line/polygon. It will even snap to 'pseudo nodes' like the intersections between lines. See this example for more - OpenLayers Snapping and Splitting.
If what you are actually after (and if it is I would recommend making your question clearer) is moving a whole polygon/line as one (i.e. not node by node) until it snapped with another feature then I am afraid I am not sure. I am highly doubtful and I've certainly never come across anything like that. Someone else may be able to shed some mroe light though.