Openlayers 3 stop event propagation

user3714967

I joined two examples from openlayers examples popup and drawing features. Now i want to stop on map click listener when i'm drawing features, so that popup doesn't show when i'm drawing.

tonio

Unregister your click event when drawing:

var key = map.on('click', function(evt) { … });

// when drawing
map.unByKey(key);

See http://openlayers.org/en/master/apidoc/ol.Object.html#on

本文收集自互联网,转载请注明来源。

如有侵权,请联系[email protected] 删除。

编辑于
0

我来说两句

0条评论
登录后参与评论

相关文章