UNPKG

ol-ext

Version:

A set of cool extensions for OpenLayers (ol) in node modules structure

14 lines (11 loc) 405 B
import ol_source_Vector from 'ol/source/Vector.js' ;(function () { var clear = ol_source_Vector.prototype.clear; /** Overwrite ol/source/Vector clear to fire clearstart / clearend event */ ol_source_Vector.prototype.clear = function(opt_fast) { this.dispatchEvent({ type: 'clearstart' }); clear.call(this, opt_fast) this.dispatchEvent({ type: 'clearend' }); }; })();