Reputation: 1645
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.
Upvotes: 2
Views: 2235
Reputation: 2376
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
Upvotes: 1