Adding back events documentation.
When the list of event types became unconstrained in 501b42228a, we lost the documentation for events that are triggered. This change adds the list of events triggered to the API docs for events properties.
This commit is contained in:
@@ -139,10 +139,7 @@ OpenLayers.Control = OpenLayers.Class({
|
||||
* APIProperty: events
|
||||
* {<OpenLayers.Events>} Events instance for listeners and triggering
|
||||
* control specific events.
|
||||
*/
|
||||
events: null,
|
||||
|
||||
/**
|
||||
*
|
||||
* Register a listener for a particular event with the following syntax:
|
||||
* (code)
|
||||
* control.events.register(type, obj, listener);
|
||||
@@ -161,6 +158,7 @@ OpenLayers.Control = OpenLayers.Class({
|
||||
* activate - Triggered when activated.
|
||||
* deactivate - Triggered when deactivated.
|
||||
*/
|
||||
events: null,
|
||||
|
||||
/**
|
||||
* Constructor: OpenLayers.Control
|
||||
|
||||
@@ -32,7 +32,16 @@ OpenLayers.Control.DrawFeature = OpenLayers.Class(OpenLayers.Control, {
|
||||
callbacks: null,
|
||||
|
||||
/**
|
||||
* Supported event types:
|
||||
* APIProperty: events
|
||||
* {<OpenLayers.Events>} Events instance for listeners and triggering
|
||||
* control specific events.
|
||||
*
|
||||
* Register a listener for a particular event with the following syntax:
|
||||
* (code)
|
||||
* control.events.register(type, obj, listener);
|
||||
* (end)
|
||||
*
|
||||
* Supported event types (in addition to those from <OpenLayers.Control.events>):
|
||||
* featureadded - Triggered when a feature is added
|
||||
*/
|
||||
|
||||
|
||||
@@ -23,13 +23,22 @@
|
||||
OpenLayers.Control.Geolocate = OpenLayers.Class(OpenLayers.Control, {
|
||||
|
||||
/**
|
||||
* Supported event types:
|
||||
* - *locationupdated* Triggered when browser return a new position. Listeners will
|
||||
* APIProperty: events
|
||||
* {<OpenLayers.Events>} Events instance for listeners and triggering
|
||||
* control specific events.
|
||||
*
|
||||
* Register a listener for a particular event with the following syntax:
|
||||
* (code)
|
||||
* control.events.register(type, obj, listener);
|
||||
* (end)
|
||||
*
|
||||
* Supported event types (in addition to those from <OpenLayers.Control.events>):
|
||||
* locationupdated - Triggered when browser return a new position. Listeners will
|
||||
* receive an object with a 'position' property which is the browser.geolocation.position
|
||||
* native object, as well as a 'point' property which is the location transformed in the
|
||||
* current map projection.
|
||||
* - *locationfailed* Triggered when geolocation has failed
|
||||
* - *locationuncapable* Triggered when control is activated on a browser
|
||||
* locationfailed - Triggered when geolocation has failed
|
||||
* locationuncapable - Triggered when control is activated on a browser
|
||||
* which doesn't support geolocation
|
||||
*/
|
||||
|
||||
|
||||
@@ -170,7 +170,16 @@ OpenLayers.Control.GetFeature = OpenLayers.Class(OpenLayers.Control, {
|
||||
filterType: OpenLayers.Filter.Spatial.BBOX,
|
||||
|
||||
/**
|
||||
* Supported event types:
|
||||
* APIProperty: events
|
||||
* {<OpenLayers.Events>} Events instance for listeners and triggering
|
||||
* control specific events.
|
||||
*
|
||||
* Register a listener for a particular event with the following syntax:
|
||||
* (code)
|
||||
* control.events.register(type, obj, listener);
|
||||
* (end)
|
||||
*
|
||||
* Supported event types (in addition to those from <OpenLayers.Control.events>):
|
||||
* beforefeatureselected - Triggered when <click> is true before a
|
||||
* feature is selected. The event object has a feature property with
|
||||
* the feature about to select
|
||||
|
||||
@@ -18,15 +18,16 @@
|
||||
OpenLayers.Control.Measure = OpenLayers.Class(OpenLayers.Control, {
|
||||
|
||||
/**
|
||||
* APIProperty: events
|
||||
* {<OpenLayers.Events>} Events instance for listeners and triggering
|
||||
* control specific events.
|
||||
*
|
||||
* Register a listener for a particular event with the following syntax:
|
||||
* (code)
|
||||
* control.events.register(type, obj, listener);
|
||||
* (end)
|
||||
*
|
||||
* Listeners will be called with a reference to an event object. The
|
||||
* properties of this event depends on exactly what happened.
|
||||
*
|
||||
* Supported control event types (in addition to those from <OpenLayers.Control>):
|
||||
* Supported event types (in addition to those from <OpenLayers.Control.events>):
|
||||
* measure - Triggered when a measurement sketch is complete. Listeners
|
||||
* will receive an event with measure, units, order, and geometry
|
||||
* properties.
|
||||
|
||||
@@ -24,16 +24,16 @@
|
||||
OpenLayers.Control.SLDSelect = OpenLayers.Class(OpenLayers.Control, {
|
||||
|
||||
/**
|
||||
* APIProperty: events
|
||||
* {<OpenLayers.Events>} Events instance for listeners and triggering
|
||||
* control specific events.
|
||||
*
|
||||
* Register a listener for a particular event with the following syntax:
|
||||
* (code)
|
||||
* control.events.register(type, obj, listener);
|
||||
* (end)
|
||||
*
|
||||
* Listeners will be called with a reference to an event object. The
|
||||
* properties of this event depends on exactly what happened.
|
||||
*
|
||||
* Supported control event types (in addition to those from
|
||||
* <OpenLayers.Control>):
|
||||
* Supported event types (in addition to those from <OpenLayers.Control.events>):
|
||||
* selected - Triggered when a selection occurs. Listeners receive an
|
||||
* event with *filters* and *layer* properties. Filters will be an
|
||||
* array of OpenLayers.Filter objects created in order to perform
|
||||
|
||||
@@ -22,12 +22,21 @@
|
||||
OpenLayers.Control.SelectFeature = OpenLayers.Class(OpenLayers.Control, {
|
||||
|
||||
/**
|
||||
* Supported event types:
|
||||
* - *beforefeaturehighlighted* Triggered before a feature is highlighted
|
||||
* - *featurehighlighted* Triggered when a feature is highlighted
|
||||
* - *featureunhighlighted* Triggered when a feature is unhighlighted
|
||||
* - *boxselectionstart* Triggered before box selection starts
|
||||
* - *boxselectionend* Triggered after box selection ends
|
||||
* APIProperty: events
|
||||
* {<OpenLayers.Events>} Events instance for listeners and triggering
|
||||
* control specific events.
|
||||
*
|
||||
* Register a listener for a particular event with the following syntax:
|
||||
* (code)
|
||||
* control.events.register(type, obj, listener);
|
||||
* (end)
|
||||
*
|
||||
* Supported event types (in addition to those from <OpenLayers.Control.events>):
|
||||
* beforefeaturehighlighted - Triggered before a feature is highlighted
|
||||
* featurehighlighted - Triggered when a feature is highlighted
|
||||
* featureunhighlighted - Triggered when a feature is unhighlighted
|
||||
* boxselectionstart - Triggered before box selection starts
|
||||
* boxselectionend - Triggered after box selection ends
|
||||
*/
|
||||
|
||||
/**
|
||||
|
||||
@@ -18,15 +18,16 @@
|
||||
OpenLayers.Control.Snapping = OpenLayers.Class(OpenLayers.Control, {
|
||||
|
||||
/**
|
||||
* APIProperty: events
|
||||
* {<OpenLayers.Events>} Events instance for listeners and triggering
|
||||
* control specific events.
|
||||
*
|
||||
* Register a listener for a particular event with the following syntax:
|
||||
* (code)
|
||||
* control.events.register(type, obj, listener);
|
||||
* (end)
|
||||
*
|
||||
* Listeners will be called with a reference to an event object. The
|
||||
* properties of this event depends on exactly what happened.
|
||||
*
|
||||
* Supported control event types (in addition to those from <OpenLayers.Control>):
|
||||
* Supported event types (in addition to those from <OpenLayers.Control.events>):
|
||||
* beforesnap - Triggered before a snap occurs. Listeners receive an
|
||||
* event object with *point*, *x*, *y*, *distance*, *layer*, and
|
||||
* *snapType* properties. The point property will be original point
|
||||
|
||||
@@ -19,15 +19,16 @@
|
||||
OpenLayers.Control.Split = OpenLayers.Class(OpenLayers.Control, {
|
||||
|
||||
/**
|
||||
* APIProperty: events
|
||||
* {<OpenLayers.Events>} Events instance for listeners and triggering
|
||||
* control specific events.
|
||||
*
|
||||
* Register a listener for a particular event with the following syntax:
|
||||
* (code)
|
||||
* control.events.register(type, obj, listener);
|
||||
* (end)
|
||||
*
|
||||
* Listeners will be called with a reference to an event object. The
|
||||
* properties of this event depends on exactly what happened.
|
||||
*
|
||||
* Supported control event types (in addition to those from <OpenLayers.Control>):
|
||||
* Supported event types (in addition to those from <OpenLayers.Control.events>):
|
||||
* beforesplit - Triggered before a split occurs. Listeners receive an
|
||||
* event object with *source* and *target* properties.
|
||||
* split - Triggered when a split occurs. Listeners receive an event with
|
||||
|
||||
@@ -22,31 +22,40 @@
|
||||
OpenLayers.Control.TransformFeature = OpenLayers.Class(OpenLayers.Control, {
|
||||
|
||||
/**
|
||||
* Supported event types:
|
||||
* - *beforesetfeature* Triggered before a feature is set for
|
||||
* APIProperty: events
|
||||
* {<OpenLayers.Events>} Events instance for listeners and triggering
|
||||
* control specific events.
|
||||
*
|
||||
* Register a listener for a particular event with the following syntax:
|
||||
* (code)
|
||||
* control.events.register(type, obj, listener);
|
||||
* (end)
|
||||
*
|
||||
* Supported event types (in addition to those from <OpenLayers.Control.events>):
|
||||
* beforesetfeature - Triggered before a feature is set for
|
||||
* tranformation. The feature will not be set if a listener returns
|
||||
* false. Listeners receive a *feature* property, with the feature
|
||||
* that will be set for transformation. Listeners are allowed to
|
||||
* set the control's *scale*, *ratio* and *rotation* properties,
|
||||
* which will set the initial scale, ratio and rotation of the
|
||||
* feature, like the <setFeature> method's initialParams argument.
|
||||
* - *setfeature* Triggered when a feature is set for tranformation.
|
||||
* setfeature - Triggered when a feature is set for tranformation.
|
||||
* Listeners receive a *feature* property, with the feature that
|
||||
* is now set for transformation.
|
||||
* - *beforetransform* Triggered while dragging, before a feature is
|
||||
* beforetransform - Triggered while dragging, before a feature is
|
||||
* transformed. The feature will not be transformed if a listener
|
||||
* returns false (but the box still will). Listeners receive one or
|
||||
* more of *center*, *scale*, *ratio* and *rotation*. The *center*
|
||||
* property is an <OpenLayers.Geometry.Point> object with the new
|
||||
* center of the transformed feature, the others are Floats with the
|
||||
* scale, ratio or rotation change since the last transformation.
|
||||
* - *transform* Triggered while dragging, when a feature is transformed.
|
||||
* transform - Triggered while dragging, when a feature is transformed.
|
||||
* Listeners receive an event object with one or more of *center*,
|
||||
* *scale*, *ratio* and *rotation*. The *center* property is an
|
||||
* scale*, *ratio* and *rotation*. The *center* property is an
|
||||
* <OpenLayers.Geometry.Point> object with the new center of the
|
||||
* transformed feature, the others are Floats with the scale, ratio
|
||||
* or rotation change of the feature since the last transformation.
|
||||
* - *transformcomplete* Triggered after dragging. Listeners receive
|
||||
* transformcomplete - Triggered after dragging. Listeners receive
|
||||
* an event object with the transformed *feature*.
|
||||
*/
|
||||
|
||||
|
||||
@@ -155,7 +155,16 @@ OpenLayers.Control.WMSGetFeatureInfo = OpenLayers.Class(OpenLayers.Control, {
|
||||
hoverRequest: null,
|
||||
|
||||
/**
|
||||
* Supported event types (in addition to those from <OpenLayers.Control>):
|
||||
* APIProperty: events
|
||||
* {<OpenLayers.Events>} Events instance for listeners and triggering
|
||||
* control specific events.
|
||||
*
|
||||
* Register a listener for a particular event with the following syntax:
|
||||
* (code)
|
||||
* control.events.register(type, obj, listener);
|
||||
* (end)
|
||||
*
|
||||
* Supported event types (in addition to those from <OpenLayers.Control.events>):
|
||||
* beforegetfeatureinfo - Triggered before the request is sent.
|
||||
* The event object has an *xy* property with the position of the
|
||||
* mouse click or hover event that triggers the request.
|
||||
|
||||
@@ -136,7 +136,16 @@ OpenLayers.Control.WMTSGetFeatureInfo = OpenLayers.Class(OpenLayers.Control, {
|
||||
hoverRequest: null,
|
||||
|
||||
/**
|
||||
* Supported event types (in addition to those from <OpenLayers.Control>):
|
||||
* APIProperty: events
|
||||
* {<OpenLayers.Events>} Events instance for listeners and triggering
|
||||
* control specific events.
|
||||
*
|
||||
* Register a listener for a particular event with the following syntax:
|
||||
* (code)
|
||||
* control.events.register(type, obj, listener);
|
||||
* (end)
|
||||
*
|
||||
* Supported event types (in addition to those from <OpenLayers.Control.events>):
|
||||
* beforegetfeatureinfo - Triggered before each request is sent.
|
||||
* The event object has an *xy* property with the position of the
|
||||
* mouse click or hover event that triggers the request and a *layer*
|
||||
|
||||
@@ -58,6 +58,21 @@ OpenLayers.Layer = OpenLayers.Class({
|
||||
alwaysInRange: null,
|
||||
|
||||
/**
|
||||
* Constant: RESOLUTION_PROPERTIES
|
||||
* {Array} The properties that are used for calculating resolutions
|
||||
* information.
|
||||
*/
|
||||
RESOLUTION_PROPERTIES: [
|
||||
'scales', 'resolutions',
|
||||
'maxScale', 'minScale',
|
||||
'maxResolution', 'minResolution',
|
||||
'numZoomLevels', 'maxZoomLevel'
|
||||
],
|
||||
|
||||
/**
|
||||
* APIProperty: events
|
||||
* {<OpenLayers.Events>}
|
||||
*
|
||||
* Register a listener for a particular event with the following syntax:
|
||||
* (code)
|
||||
* layer.events.register(type, obj, listener);
|
||||
@@ -87,22 +102,6 @@ OpenLayers.Layer = OpenLayers.Class({
|
||||
* will receive an object with a *map* property referencing the map and
|
||||
* a *layer* property referencing the layer.
|
||||
*/
|
||||
|
||||
/**
|
||||
* Constant: RESOLUTION_PROPERTIES
|
||||
* {Array} The properties that are used for calculating resolutions
|
||||
* information.
|
||||
*/
|
||||
RESOLUTION_PROPERTIES: [
|
||||
'scales', 'resolutions',
|
||||
'maxScale', 'minScale',
|
||||
'maxResolution', 'minResolution',
|
||||
'numZoomLevels', 'maxZoomLevel'
|
||||
],
|
||||
|
||||
/**
|
||||
* APIProperty: events
|
||||
* {<OpenLayers.Events>}
|
||||
*/
|
||||
events: null,
|
||||
|
||||
|
||||
@@ -24,6 +24,9 @@
|
||||
OpenLayers.Layer.Vector = OpenLayers.Class(OpenLayers.Layer, {
|
||||
|
||||
/**
|
||||
* APIProperty: events
|
||||
* {<OpenLayers.Events>}
|
||||
*
|
||||
* Register a listener for a particular event with the following syntax:
|
||||
* (code)
|
||||
* layer.events.register(type, obj, listener);
|
||||
@@ -36,7 +39,7 @@ OpenLayers.Layer.Vector = OpenLayers.Class(OpenLayers.Layer, {
|
||||
* object - {Object} A reference to layer.events.object.
|
||||
* element - {DOMElement} A reference to layer.events.element.
|
||||
*
|
||||
* Supported map event types (in addition to those from <OpenLayers.Layer>):
|
||||
* Supported map event types (in addition to those from <OpenLayers.Layer.events>):
|
||||
* beforefeatureadded - Triggered before a feature is added. Listeners
|
||||
* will receive an object with a *feature* property referencing the
|
||||
* feature to be added. To stop the feature from being added, a
|
||||
|
||||
@@ -35,6 +35,9 @@ OpenLayers.Map = OpenLayers.Class({
|
||||
},
|
||||
|
||||
/**
|
||||
* APIProperty: events
|
||||
* {<OpenLayers.Events>}
|
||||
*
|
||||
* Register a listener for a particular event with the following syntax:
|
||||
* (code)
|
||||
* map.events.register(type, obj, listener);
|
||||
@@ -44,43 +47,42 @@ OpenLayers.Map = OpenLayers.Class({
|
||||
* properties of this event depends on exactly what happened.
|
||||
*
|
||||
* All event objects have at least the following properties:
|
||||
* - *object* {Object} A reference to map.events.object.
|
||||
* - *element* {DOMElement} A reference to map.events.element.
|
||||
* object - {Object} A reference to map.events.object.
|
||||
* element - {DOMElement} A reference to map.events.element.
|
||||
*
|
||||
* Browser events have the following additional properties:
|
||||
* - *xy* {<OpenLayers.Pixel>} The pixel location of the event (relative
|
||||
* xy - {<OpenLayers.Pixel>} The pixel location of the event (relative
|
||||
* to the the map viewport).
|
||||
* - other properties that come with browser events
|
||||
*
|
||||
* Supported map event types:
|
||||
* - *preaddlayer* triggered before a layer has been added. The event
|
||||
* preaddlayer - triggered before a layer has been added. The event
|
||||
* object will include a *layer* property that references the layer
|
||||
* to be added. When a listener returns "false" the adding will be
|
||||
* aborted.
|
||||
* - *addlayer* triggered after a layer has been added. The event object
|
||||
* addlayer - triggered after a layer has been added. The event object
|
||||
* will include a *layer* property that references the added layer.
|
||||
* - *preremovelayer* triggered before a layer has been removed. The event
|
||||
* preremovelayer - triggered before a layer has been removed. The event
|
||||
* object will include a *layer* property that references the layer
|
||||
* to be removed. When a listener returns "false" the removal will be
|
||||
* aborted.
|
||||
* - *removelayer* triggered after a layer has been removed. The event
|
||||
* removelayer - triggered after a layer has been removed. The event
|
||||
* object will include a *layer* property that references the removed
|
||||
* layer.
|
||||
* - *changelayer* triggered after a layer name change, order change,
|
||||
* changelayer* triggered after a layer name change, order change,
|
||||
* opacity change, params change, visibility change (due to resolution
|
||||
* thresholds) or attribution change (due to extent change). Listeners
|
||||
* will receive an event object with *layer* and *property* properties.
|
||||
* The *layer* property will be a reference to the changed layer. The
|
||||
* *property* property will be a key to the changed property (name,
|
||||
* order, opacity, params, visibility or attribution).
|
||||
* - *movestart* triggered after the start of a drag, pan, or zoom
|
||||
* - *move* triggered after each drag, pan, or zoom
|
||||
* - *moveend* triggered after a drag, pan, or zoom completes
|
||||
* - *zoomend* triggered after a zoom completes
|
||||
* - *mouseover* triggered after mouseover the map
|
||||
* - *mouseout* triggered after mouseout the map
|
||||
* - *mousemove* triggered after mousemove the map
|
||||
* - *changebaselayer* triggered after the base layer changes
|
||||
* movestart* triggered after the start of a drag, pan, or zoom
|
||||
* move - triggered after each drag, pan, or zoom
|
||||
* moveend - triggered after a drag, pan, or zoom completes
|
||||
* zoomend - triggered after a zoom completes
|
||||
* mouseover - triggered after mouseover the map
|
||||
* mouseout - triggered after mouseout the map
|
||||
* mousemove - triggered after mousemove the map
|
||||
* changebaselayer - triggered after the base layer changes
|
||||
*/
|
||||
|
||||
/**
|
||||
|
||||
@@ -20,15 +20,19 @@
|
||||
OpenLayers.Strategy.Save = OpenLayers.Class(OpenLayers.Strategy, {
|
||||
|
||||
/**
|
||||
* APIProperty: events
|
||||
* {<OpenLayers.Events>} An events object that handles all
|
||||
* events on the strategy object.
|
||||
*
|
||||
* Register a listener for a particular event with the following syntax:
|
||||
* (code)
|
||||
* strategy.events.register(type, obj, listener);
|
||||
* (end)
|
||||
*
|
||||
* Supported event types:
|
||||
* - *start* Triggered before saving
|
||||
* - *success* Triggered after a successful transaction
|
||||
* - *fail* Triggered after a failed transaction
|
||||
* start - Triggered before saving
|
||||
* success - Triggered after a successful transaction
|
||||
* fail - Triggered after a failed transaction
|
||||
*
|
||||
*/
|
||||
|
||||
|
||||
@@ -23,22 +23,25 @@
|
||||
*/
|
||||
OpenLayers.Tile = OpenLayers.Class({
|
||||
|
||||
/**
|
||||
* Supported event types:
|
||||
* - *beforedraw* Triggered before the tile is drawn. Used to defer
|
||||
* drawing to an animation queue. To defer drawing, listeners need
|
||||
* to return false, which will abort drawing. The queue handler needs
|
||||
* to call <draw>(true) to actually draw the tile.
|
||||
* - *loadstart* Triggered when tile loading starts.
|
||||
* - *loadend* Triggered when tile loading ends.
|
||||
* - *reload* Triggered when an already loading tile is reloaded.
|
||||
* - *unload* Triggered before a tile is unloaded.
|
||||
*/
|
||||
|
||||
/**
|
||||
* APIProperty: events
|
||||
* {<OpenLayers.Events>} An events object that handles all
|
||||
* events on the tile.
|
||||
*
|
||||
* Register a listener for a particular event with the following syntax:
|
||||
* (code)
|
||||
* tile.events.register(type, obj, listener);
|
||||
* (end)
|
||||
*
|
||||
* Supported event types:
|
||||
* beforedraw - Triggered before the tile is drawn. Used to defer
|
||||
* drawing to an animation queue. To defer drawing, listeners need
|
||||
* to return false, which will abort drawing. The queue handler needs
|
||||
* to call <draw>(true) to actually draw the tile.
|
||||
* loadstart - Triggered when tile loading starts.
|
||||
* loadend - Triggered when tile loading ends.
|
||||
* reload - Triggered when an already loading tile is reloaded.
|
||||
* unload - Triggered before a tile is unloaded.
|
||||
*/
|
||||
events: null,
|
||||
|
||||
|
||||
Reference in New Issue
Block a user