문제

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?

도움이 되었습니까?

해결책

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.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top