在openlayers中捕捉控制3

mar*_*dol 3 openlayers-3

我想在我的项目中使用snap控件.我看到了很多关于如何在openlayers 2中使用它的例子.在我的项目中我使用的是openlayers 3.在openlayers 3中是否有快照控件?

Joh*_*ell 5

不.它被标记为未解决的问题,https://github.com/openlayers/ol3/issues/1164.如果你在https://github.com/openlayers/ol3/blob/master/src/ol/interaction/modifyinteraction.jshttps://github.com/openlayers/ol3/上查看modifyinteraction和drawinteraction的源代码blob/master/src/ol/interaction/drawinteraction.js你会看到一些捕捉的机制已经存在,但是没有捕捉控制.OL3仍然处于测试阶段(编辑,伽玛)并且预算有限,因此我们要么必须等待,要么自己编写并在github上发出拉取请求:D.