Merge pull request #1898 from ahocevar/events

Document events
This commit is contained in:
Andreas Hocevar
2014-03-26 14:13:59 +01:00
31 changed files with 216 additions and 19 deletions

View File

@@ -8,6 +8,7 @@ goog.require('ol.source.VectorFile');
/**
* @constructor
* @extends {ol.source.VectorFile}
* @fires {@link ol.source.VectorEvent} ol.source.VectorEvent
* @param {olx.source.GeoJSONOptions=} opt_options Options.
* @todo stability experimental
*/

View File

@@ -8,6 +8,7 @@ goog.require('ol.source.VectorFile');
/**
* @constructor
* @extends {ol.source.VectorFile}
* @fires {@link ol.source.VectorEvent} ol.source.VectorEvent
* @param {olx.source.GPXOptions=} opt_options Options.
* @todo stability experimental
*/

View File

@@ -8,6 +8,7 @@ goog.require('ol.source.VectorFile');
/**
* @constructor
* @extends {ol.source.VectorFile}
* @fires {@link ol.source.VectorEvent} ol.source.VectorEvent
* @param {olx.source.IGCOptions=} opt_options Options.
* @todo stability experimental
*/

View File

@@ -8,6 +8,7 @@ goog.require('ol.source.VectorFile');
/**
* @constructor
* @extends {ol.source.VectorFile}
* @fires {@link ol.source.VectorEvent} ol.source.VectorEvent
* @param {olx.source.KMLOptions=} opt_options Options.
* @todo stability experimental
*/

View File

@@ -8,6 +8,7 @@ goog.require('ol.source.VectorFile');
/**
* @constructor
* @extends {ol.source.VectorFile}
* @fires {@link ol.source.VectorEvent} ol.source.VectorEvent
* @param {olx.source.OSMXMLOptions=} opt_options Options.
*/
ol.source.OSMXML = function(opt_options) {

View File

@@ -8,6 +8,7 @@ goog.require('ol.source.VectorFile');
/**
* @constructor
* @extends {ol.source.VectorFile}
* @fires {@link ol.source.VectorEvent} ol.source.VectorEvent
* @param {olx.source.TopoJSONOptions=} opt_options Options.
* @todo stability experimental
*/

View File

@@ -22,6 +22,7 @@ goog.require('ol.xml');
/**
* @constructor
* @extends {ol.source.Vector}
* @fires {@link ol.source.VectorEvent} ol.source.VectorEvent
* @param {olx.source.VectorFileOptions=} opt_options Options.
* @todo stability experimental
*/

View File

@@ -21,7 +21,17 @@ goog.require('ol.structs.RBush');
* @enum {string}
*/
ol.source.VectorEventType = {
/**
* Triggered when a feature is added to the source.
* @event ol.source.VectorEvent#addfeature
* @todo stability experimental
*/
ADDFEATURE: 'addfeature',
/**
* Triggered when a feature is removed from the source.
* @event ol.source.VectorEvent#removefeature
* @todo stability experimental
*/
REMOVEFEATURE: 'removefeature'
};
@@ -30,6 +40,7 @@ ol.source.VectorEventType = {
/**
* @constructor
* @extends {ol.source.Source}
* @fires {@link ol.source.VectorEvent} ol.source.VectorEvent
* @param {olx.source.VectorOptions=} opt_options Vector source options.
* @todo stability experimental
*/
@@ -372,7 +383,9 @@ ol.source.VectorEvent = function(type, opt_feature) {
goog.base(this, type);
/**
* The feature being added or removed.
* @type {ol.Feature|undefined}
* @todo stability experimental
*/
this.feature = opt_feature;