// jQuery .on() analog Map.prototype.on = function (event, handler) { var $this = this; this.map.on(event, function (e) { handler.call($this, e); }); };