Question

I want to use the snap control in my project. I saw a lot of examples on how to use it in openlayers 2. In my project I am using openlayers 3. Is there a snap control in openlayers 3?

Was it helpful?

Solution

No. It is marked as an open issue, https://github.com/openlayers/ol3/issues/1164. If you look at the source code for modifyinteraction and drawinteraction at https://github.com/openlayers/ol3/blob/master/src/ol/interaction/modifyinteraction.js and https://github.com/openlayers/ol3/blob/master/src/ol/interaction/drawinteraction.js you will see that some of the mechanics of snapping are in place already, but there is no snapping control. OL3 is still in beta (edit, gamma) and there is only a limited budget, so we will either have to wait, or write it yourself and issue a pull request on github :D.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top