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.
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] 删除。
我来说两句