diff --git a/externs/oli.js b/externs/oli.js index 91ae1d9875..7f1d49940b 100644 --- a/externs/oli.js +++ b/externs/oli.js @@ -75,6 +75,23 @@ oli.MapBrowserEvent.prototype.pixel; +/** @interface */ +oli.MapEvent; + + +/** + * @type {ol.Map} + */ +oli.MapEvent.prototype.map; + + +/** + * @type {olx.FrameState} + */ +oli.MapEvent.prototype.frameState; + + + /** * @interface */ @@ -111,6 +128,7 @@ oli.interaction.DragAndDropEvent.prototype.projection; oli.interaction.DragAndDropEvent.prototype.file; + /** @interface */ oli.render.Event; diff --git a/src/ol/mapevent.js b/src/ol/mapevent.js index 4ac3bf4fd2..4eb7afaedb 100644 --- a/src/ol/mapevent.js +++ b/src/ol/mapevent.js @@ -27,6 +27,7 @@ ol.MapEventType = { /** * @constructor * @extends {goog.events.Event} + * @implements {oli.MapEvent} * @param {string} type Event type. * @param {ol.Map} map Map. * @param {?olx.FrameState=} opt_frameState Frame state. @@ -36,12 +37,16 @@ ol.MapEvent = function(type, map, opt_frameState) { goog.base(this, type); /** + * The map where the event occurred. * @type {ol.Map} + * @todo api */ this.map = map; /** + * The frame state at the time of the event. * @type {?olx.FrameState} + * @todo api */ this.frameState = goog.isDef(opt_frameState) ? opt_frameState : null; diff --git a/src/ol/source/vectorsource.js b/src/ol/source/vectorsource.js index 03b4ffb3b6..b8e32af113 100644 --- a/src/ol/source/vectorsource.js +++ b/src/ol/source/vectorsource.js @@ -346,6 +346,7 @@ ol.source.Vector.prototype.getExtent = function() { * * @param {string|number} id Feature identifier. * @return {ol.Feature} The feature (or `null` if not found). + * @todo api */ ol.source.Vector.prototype.getFeatureById = function(id) { var feature = this.idIndex_[id.toString()];