0

Is it possible to snap (drag and snap) a feature to another feature in the same layer?

I found OpenLayers.Control.Snapping module but it's snapping only to the points.

1

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.

  • I agree with you, the only tools that I know that can snaps many nodes at a time are the ArcGIS 10.x topology tools such the edges to topology snapper. – Below the Radar May 9 '13 at 15:03
  • You mentioning topology has suddenly made me remember the JavaScript Topology Suite. This might have something in it? I have not ever looked at it myself though so you're on your own! github.com/bjornharrtell/jsts – Rob Quincey May 9 '13 at 15:24
  • if you can create a tool that snaps entire polygon with JTS, you are really great! It is possible, but no one have done it in the Open community for now. – Below the Radar May 9 '13 at 15:31
  • Yes, I would like to move a whole polygon as one and snap it to another polygon (edge to edge). – Achaja May 13 '13 at 6:24

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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