Fix some problems in the documentation.

This commit is contained in:
Xavier Mamano
2012-03-05 11:43:09 +01:00
parent d3a4275136
commit bfb379f349
45 changed files with 106 additions and 58 deletions

View File

@@ -92,7 +92,7 @@ OpenLayers.Animation = (function(window) {
* Terminates an animation loop started with <start>.
*
* Parameters:
* {Number} Identifier returned from <start>.
* id - {Number} Identifier returned from <start>.
*/
function stop(id) {
delete loops[id];

View File

@@ -187,7 +187,10 @@ OpenLayers.String = {
* APIFunction: numericIf
* Converts a string that appears to be a numeric value into a number.
*
* Returns
* Parameters:
* value - {String}
*
* Returns:
* {Number|String} a Number if the passed value is a number, a String
* otherwise.
*/

View File

@@ -35,7 +35,8 @@ OpenLayers.Control.ArgParser = OpenLayers.Class(OpenLayers.Control, {
/**
* Property: layers
* {Array(<OpenLayers.Layer>)}
* {String} Each character represents the state of the corresponding layer
* on the map.
*/
layers: null,

View File

@@ -333,11 +333,11 @@ OpenLayers.Control.GetFeature = OpenLayers.Class(OpenLayers.Control, {
},
/**
* Method selectHover
* Method: selectHover
* Callback from the handlers.hover set up when <hover> selection is on
*
* Parameters:
* evt {Object} - event object with an xy property
* evt - {Object} event object with an xy property
*/
selectHover: function(evt) {
var bounds = this.pixelToBounds(evt.xy);
@@ -459,7 +459,7 @@ OpenLayers.Control.GetFeature = OpenLayers.Class(OpenLayers.Control, {
* Sets the multiple and toggle modifiers according to the current event
*
* Parameters:
* evt {<OpenLayers.Event>}
* evt - {<OpenLayers.Event>}
*/
setModifiers: function(evt) {
this.modifiers = {

View File

@@ -616,7 +616,7 @@ OpenLayers.Control.ModifyFeature = OpenLayers.Class(OpenLayers.Control, {
* the mouse is over a vertex.
*
* Parameters:
* {Integer} Key code corresponding to the keypress event.
* evt - {Event} Keypress event.
*/
handleKeypress: function(evt) {
var code = evt.keyCode;

View File

@@ -16,7 +16,7 @@
* current map view. By default it is drawn in the lower right corner of the
* map. The href is updated as the map is zoomed, panned and whilst layers
* are switched.
* `
*
* Inherits from:
* - <OpenLayers.Control>
*/

View File

@@ -166,11 +166,11 @@ OpenLayers.Filter.Comparison = OpenLayers.Class(OpenLayers.Filter, {
* regular expression already.
*
* Parameters:
* wildCard - {<Char>} wildcard character in the above value, default
* wildCard - {Char} wildcard character in the above value, default
* is "*"
* singleChar - {<Char>) single-character wildcard in the above value
* singleChar - {Char} single-character wildcard in the above value
* default is "."
* escape - {<Char>) escape character in the above value, default is
* escapeChar - {Char} escape character in the above value, default is
* "!"
*
* Returns:

View File

@@ -418,7 +418,7 @@ OpenLayers.Format.Atom = OpenLayers.Class(OpenLayers.Format.XML, {
* node - {DOMElement} An Atom entry or feed node.
*
* Returns:
* An <OpenLayers.Feature.Vector>.
* {<OpenLayers.Feature.Vector>}
*/
parseFeature: function(node) {
var atomAttrib = {};
@@ -554,7 +554,7 @@ OpenLayers.Format.Atom = OpenLayers.Class(OpenLayers.Format.XML, {
* node - {DOMElement} An Atom entry or feed node.
*
* Returns:
* An Array of <OpenLayers.Feature.Vector>s.
* Array({<OpenLayers.Feature.Vector>})
*/
parseFeatures: function(node) {
var features = [];
@@ -578,7 +578,7 @@ OpenLayers.Format.Atom = OpenLayers.Class(OpenLayers.Format.XML, {
* node - {DOMElement} An Atom entry or feed node.
*
* Returns:
* An Array of <OpenLayers.Geometry>s.
* Array({<OpenLayers.Geometry>})
*/
parseLocations: function(node) {
var georssns = this.namespaces.georss;

View File

@@ -887,6 +887,7 @@ OpenLayers.Format.GML = OpenLayers.Class(OpenLayers.Format.XML, {
* (code)
* <gml:coordinates decimal="." cs="," ts=" ">...</gml:coordinates>
* (end)
*
* Parameters:
* geometry - {<OpenLayers.Geometry>}
*

View File

@@ -615,7 +615,7 @@ OpenLayers.Format.GML.Base = OpenLayers.Class(OpenLayers.Format.XML, {
},
/**
* Function: setGeometryTypes
* Method: setGeometryTypes
* Sets the <geometryTypes> mapping.
*/
setGeometryTypes: function() {

View File

@@ -444,7 +444,7 @@ OpenLayers.Format.GML.v3 = OpenLayers.Class(OpenLayers.Format.GML.Base, {
},
/**
* Function: setGeometryTypes
* Method: setGeometryTypes
* Sets the <geometryTypes> mapping.
*/
setGeometryTypes: function() {

View File

@@ -102,7 +102,7 @@ OpenLayers.Format.GPX = OpenLayers.Class(OpenLayers.Format.XML, {
* doc - {Element}
*
* Returns:
* An Array of <OpenLayers.Feature.Vector>s
* Array({<OpenLayers.Feature.Vector>})
*/
read: function(doc) {
if (typeof doc == "string") {

View File

@@ -287,7 +287,7 @@ OpenLayers.Format.GeoJSON = OpenLayers.Class(OpenLayers.Format.JSON, {
* <OpenLayers.Geometry>.
*
* Parameters:
* array {Object} The coordinates array from the GeoJSON fragment.
* array - {Object} The coordinates array from the GeoJSON fragment.
*
* Returns:
* {<OpenLayers.Geometry>} A geometry.

View File

@@ -90,7 +90,7 @@ OpenLayers.Format.OSM = OpenLayers.Class(OpenLayers.Format.XML, {
* doc - {Element}
*
* Returns:
* An Array of <OpenLayers.Feature.Vector>s
* Array({<OpenLayers.Feature.Vector>})
*/
read: function(doc) {
if (typeof doc == "string") {

View File

@@ -72,7 +72,7 @@ OpenLayers.Format.Text = OpenLayers.Class(OpenLayers.Format, {
* text - {String}
*
* Returns:
* An Array of <OpenLayers.Feature.Vector>s
* Array({<OpenLayers.Feature.Vector>})
*/
read: function(text) {
var lines = text.split('\n');

View File

@@ -5,7 +5,9 @@
/**
* @requires OpenLayers/Format/XML.js
*
*/
/**
* Class: OpenLayers.Format.WFSDescribeFeatureType
* Read WFS DescribeFeatureType response
*
@@ -145,8 +147,8 @@ OpenLayers.Format.WFSDescribeFeatureType = OpenLayers.Class(
* Reads restriction defined in the child nodes of a restriction element
*
* Parameters:
* node {DOMElement} - the node to parse
* obj {Object} - the object that receives the read result
* node - {DOMElement} the node to parse
* obj - {Object} the object that receives the read result
*/
readRestriction: function(node, obj) {
var children = node.childNodes;

View File

@@ -1062,6 +1062,7 @@ OpenLayers.Format.WMC.v1 = OpenLayers.Class(OpenLayers.Format.XML, {
* elName - {String} Name of element (LogoURL/DescriptionURL/MetadataURL/LegendURL)
* url - {String} URL string value
* attr - {Object} Optional attributes (width, height, format)
*
* Returns:
* {Element} A WMC element node.
*/

View File

@@ -190,7 +190,7 @@ OpenLayers.Format.WMSGetFeatureInfo = OpenLayers.Class(OpenLayers.Format.XML, {
* criteria - {String} Search string which will match some part of a tagName
*
* Returns:
* Array({DOMElement)) An array of sibling xml nodes
* Array({DOMElement}) An array of sibling xml nodes
*/
getSiblingNodesByTagCriteria: function(node, criteria){
var nodes = [];

View File

@@ -407,7 +407,7 @@ OpenLayers.Handler.Feature = OpenLayers.Class(OpenLayers.Handler, {
},
/**
* Method handleMapEvents
* Method: handleMapEvents
*
* Parameters:
* evt - {Object}

View File

@@ -35,7 +35,7 @@ OpenLayers.Lang = {
* Get the current language code.
*
* Returns:
* The current language code.
* {String} The current language code.
*/
getCode: function() {
if(!OpenLayers.Lang.code) {

View File

@@ -56,10 +56,11 @@ OpenLayers.Layer.ArcGIS93Rest = OpenLayers.Class(OpenLayers.Layer.Grid, {
* url - {String} Base url for the ArcGIS server REST service
* options - {Object} An object with key/value pairs representing the
* options and option values.
*
* Valid Options:
* format: {String} MIME type of desired image type.
* layers: {String} Comma-separated list of layers to display.
* srs: {String} Projection ID.
* format - {String} MIME type of desired image type.
* layers - {String} Comma-separated list of layers to display.
* srs - {String} Projection ID.
*/
initialize: function(name, url, params, options) {
var newArguments = [];

View File

@@ -272,7 +272,7 @@ OpenLayers.Layer.ArcIMS = OpenLayers.Class(OpenLayers.Layer.Grid, {
*
* Parameters:
* id - {String} The ArcIMS layer ID.
* queryDef - {Object} The query definition to apply to this layer.
* querydef - {Object} The query definition to apply to this layer.
*/
setLayerQuery: function(id, querydef) {
// find the matching layer, if it exists

View File

@@ -177,7 +177,7 @@ OpenLayers.Layer.Google = OpenLayers.Class(
* Hide or show the Layer
*
* Parameters:
* display - {Boolean}
* visible - {Boolean}
*/
display: function(visible) {
if (!this._dragging) {
@@ -190,7 +190,7 @@ OpenLayers.Layer.Google = OpenLayers.Class(
* Method: moveTo
*
* Parameters:
* bound - {<OpenLayers.Bounds>}
* bounds - {<OpenLayers.Bounds>}
* zoomChanged - {Boolean} Tells when zoom has changed, as layers have to
* do some init work in that case.
* dragging - {Boolean}

View File

@@ -762,7 +762,7 @@ OpenLayers.Layer.Grid = OpenLayers.Class(OpenLayers.Layer.HTTPRequest, {
* resolution - {Number}
*
* Returns:
* Object containing properties tilelon, tilelat, tileoffsetlat,
* {Object} containing properties tilelon, tilelat, tileoffsetlat,
* tileoffsetlat, tileoffsetx, tileoffsety
*/
calculateGridLayout: function(bounds, origin, resolution) {

View File

@@ -92,7 +92,7 @@ OpenLayers.Layer.KaMap = OpenLayers.Class(OpenLayers.Layer.Grid, {
* resolution - {Number}
*
* Returns:
* Object containing properties tilelon, tilelat, tileoffsetlat,
* {Object} Object containing properties tilelon, tilelat, tileoffsetlat,
* tileoffsetlat, tileoffsetx, tileoffsety
*/
calculateGridLayout: function(bounds, origin, resolution) {

View File

@@ -449,7 +449,7 @@ OpenLayers.Layer.MapGuide = OpenLayers.Class(OpenLayers.Layer.Grid, {
* resolution - {Number}
*
* Returns:
* Object containing properties tilelon, tilelat, tileoffsetlat,
* {Object} Object containing properties tilelon, tilelat, tileoffsetlat,
* tileoffsetlat, tileoffsetx, tileoffsety
*/
calculateGridLayout: function(bounds, origin, resolution) {

View File

@@ -936,7 +936,7 @@ OpenLayers.Layer.Vector = OpenLayers.Class(OpenLayers.Layer, {
* attrValue - {Mixed}
*
* Returns:
* Array(<OpenLayers.Feature.Vector>) An array of features that have the
* Array({<OpenLayers.Feature.Vector>}) An array of features that have the
* passed named attribute set to the given value.
*/
getFeaturesByAttribute: function(attrName, attrValue) {

View File

@@ -296,7 +296,7 @@ OpenLayers.Layer.WMTS = OpenLayers.Class(OpenLayers.Layer.Grid, {
* Method: moveTo
*
* Parameters:
* bound - {<OpenLayers.Bounds>}
* bounds - {<OpenLayers.Bounds>}
* zoomChanged - {Boolean} Tells when zoom has changed, as layers have to
* do some init work in that case.
* dragging - {Boolean}

View File

@@ -261,7 +261,7 @@ OpenLayers.Layer.Zoomify = OpenLayers.Class(OpenLayers.Layer.Grid, {
* resolution - {Number}
*
* Returns:
* Object containing properties tilelon, tilelat, tileoffsetlat,
* {Object} Object containing properties tilelon, tilelat, tileoffsetlat,
* tileoffsetlat, tileoffsetx, tileoffsety
*/
calculateGridLayout: function(bounds, origin, resolution) {

View File

@@ -2318,7 +2318,7 @@ OpenLayers.Map = OpenLayers.Class({
* Zoom to the full extent and recenter.
*
* Parameters:
* options -
* options - {Object}
*
* Allowed Options:
* restricted - {Boolean} True to zoom to restricted extent if it is

View File

@@ -64,6 +64,7 @@ OpenLayers.Marker = OpenLayers.Class({
/**
* Constructor: OpenLayers.Marker
*
* Parameters:
* lonlat - {<OpenLayers.LonLat>} the position of this marker
* icon - {<OpenLayers.Icon>} the icon for this marker

View File

@@ -38,6 +38,7 @@
* Parameters:
* options - {Object} Optional object whose properties will be set on the
* instance.
*
* Valid options properties:
* url - {String} URL to send requests to (required).
* fois - {Array} The features of interest (required).

View File

@@ -340,7 +340,7 @@ OpenLayers.Protocol.Script = OpenLayers.Class(OpenLayers.Protocol, {
* Register a callback for a newly created script.
*
* Parameters:
* callback: {Function} The callback to be executed when the newly added
* callback - {Function} The callback to be executed when the newly added
* script loads. This callback will be called with a single argument
* that is the JSON returned by the service.
*
@@ -361,7 +361,7 @@ OpenLayers.Protocol.Script = OpenLayers.Class(OpenLayers.Protocol, {
* Unregister a callback previously registered with the register function.
*
* Parameters:
* id: {Number} The identifer returned by the register function.
* id - {Number} The identifer returned by the register function.
*/
o.unregister = function(id) {
delete o.registry[id];

View File

@@ -54,6 +54,8 @@ OpenLayers.Protocol.WFS = function(options) {
* FeatureType at the same server url with the same typename.
* options - {Object} Default properties to be set on the protocol.
*
* Returns:
* {<OpenLayers.Protocol.WFS>}
*/
OpenLayers.Protocol.WFS.fromWMSLayer = function(layer, options) {
var typeName, featurePrefix;

View File

@@ -170,7 +170,7 @@ OpenLayers.Renderer = OpenLayers.Class({
* Uses cached copy of resolution if available to minimize computing
*
* Returns:
* The current map's resolution
* {Float} The current map's resolution
*/
getResolution: function() {
this.resolution = this.resolution || this.map.getResolution();

View File

@@ -78,7 +78,7 @@ OpenLayers.Strategy = OpenLayers.Class({
* Called to set the <layer> property.
*
* Parameters:
* {<OpenLayers.Layer.Vector>}
* layer - {<OpenLayers.Layer.Vector>}
*/
setLayer: function(layer) {
this.layer = layer;

View File

@@ -214,7 +214,8 @@ OpenLayers.Strategy.BBOX = OpenLayers.Class(OpenLayers.Strategy, {
* Method: triggerRead
*
* Parameters:
* options - Additional options for the protocol's read method (optional)
* options - {Object} Additional options for the protocol's read method
* (optional)
*
* Returns:
* {<OpenLayers.Protocol.Response>} The protocol response object

View File

@@ -127,7 +127,7 @@ OpenLayers.Strategy.Filter = OpenLayers.Class(OpenLayers.Strategy, {
* added to the layer. Others will be cached by the strategy.
*
* Parameters:
* filter - <OpenLayers.Filter> A filter for evaluating features.
* filter - {<OpenLayers.Filter>} A filter for evaluating features.
*/
setFilter: function(filter) {
this.filter = filter;

View File

@@ -146,7 +146,7 @@ OpenLayers.Strategy.Paging = OpenLayers.Class(OpenLayers.Strategy, {
* Gets or sets page length.
*
* Parameters:
* newLength: {Integer} Optional length to be set.
* newLength - {Integer} Optional length to be set.
*
* Returns:
* {Integer} The length of a page (number of features per page).

View File

@@ -368,7 +368,7 @@ OpenLayers.Style = OpenLayers.Class({
* geometry type of the passed geometry
*
* Parameters:
* geometry {<OpenLayers.Geometry>}
* geometry - {<OpenLayers.Geometry>}
*
* Returns:
* {String} key of the according symbolizer

View File

@@ -117,7 +117,9 @@ OpenLayers.Tile = OpenLayers.Class({
/** TBD 3.0 -- remove 'url' from the list of parameters to the constructor.
* there is no need for the base tile class to have a url.
*
*/
/**
* Constructor: OpenLayers.Tile
* Constructor for a new <OpenLayers.Tile> instance.
*

View File

@@ -102,7 +102,9 @@ OpenLayers.Tile.Image = OpenLayers.Class(OpenLayers.Tile, {
/** TBD 3.0 - reorder the parameters to the init function to remove
* URL. the getUrl() function on the layer gets called on
* each draw(), so no need to specify it here.
*
*/
/**
* Constructor: OpenLayers.Tile.Image
* Constructor for a new <OpenLayers.Tile.Image> instance.
*

View File

@@ -179,6 +179,9 @@ OpenLayers.Easing.Linear = {
* b - {Float} beginning position
* c - {Float} total change
* d - {Float} duration of the transition
*
* Returns:
* {Float}
*/
easeIn: function(t, b, c, d) {
return c*t/d + b;
@@ -192,6 +195,9 @@ OpenLayers.Easing.Linear = {
* b - {Float} beginning position
* c - {Float} total change
* d - {Float} duration of the transition
*
* Returns:
* {Float}
*/
easeOut: function(t, b, c, d) {
return c*t/d + b;
@@ -205,6 +211,9 @@ OpenLayers.Easing.Linear = {
* b - {Float} beginning position
* c - {Float} total change
* d - {Float} duration of the transition
*
* Returns:
* {Float}
*/
easeInOut: function(t, b, c, d) {
return c*t/d + b;
@@ -226,6 +235,9 @@ OpenLayers.Easing.Expo = {
* b - {Float} beginning position
* c - {Float} total change
* d - {Float} duration of the transition
*
* Returns:
* {Float}
*/
easeIn: function(t, b, c, d) {
return (t==0) ? b : c * Math.pow(2, 10 * (t/d - 1)) + b;
@@ -239,6 +251,9 @@ OpenLayers.Easing.Expo = {
* b - {Float} beginning position
* c - {Float} total change
* d - {Float} duration of the transition
*
* Returns:
* {Float}
*/
easeOut: function(t, b, c, d) {
return (t==d) ? b+c : c * (-Math.pow(2, -10 * t/d) + 1) + b;
@@ -252,6 +267,9 @@ OpenLayers.Easing.Expo = {
* b - {Float} beginning position
* c - {Float} total change
* d - {Float} duration of the transition
*
* Returns:
* {Float}
*/
easeInOut: function(t, b, c, d) {
if (t==0) return b;
@@ -276,6 +294,9 @@ OpenLayers.Easing.Quad = {
* b - {Float} beginning position
* c - {Float} total change
* d - {Float} duration of the transition
*
* Returns:
* {Float}
*/
easeIn: function(t, b, c, d) {
return c*(t/=d)*t + b;
@@ -289,6 +310,9 @@ OpenLayers.Easing.Quad = {
* b - {Float} beginning position
* c - {Float} total change
* d - {Float} duration of the transition
*
* Returns:
* {Float}
*/
easeOut: function(t, b, c, d) {
return -c *(t/=d)*(t-2) + b;
@@ -302,6 +326,9 @@ OpenLayers.Easing.Quad = {
* b - {Float} beginning position
* c - {Float} total change
* d - {Float} duration of the transition
*
* Returns:
* {Float}
*/
easeInOut: function(t, b, c, d) {
if ((t/=d/2) < 1) return c/2*t*t + b;

View File

@@ -933,7 +933,7 @@ OpenLayers.Util.lastSeqID = 0;
* prefix (defaults to "id_") appended with the counter value.
*
* Parameters:
* prefix {String} Optionsal string to prefix unique id. Default is "id_".
* prefix - {String} Optional string to prefix unique id. Default is "id_".
*
* Returns:
* {String} A unique id string, built on the passed in prefix.
@@ -1250,6 +1250,9 @@ OpenLayers.Util.pagePosition = function(forElement) {
* document.body or document.documentElement, depending on the document's
* compatibility mode (see
* http://code.google.com/p/doctype/wiki/ArticleClientViewportElement)
*
* Returns:
* {DOMElement}
*/
OpenLayers.Util.getViewportElement = function() {
var viewportElement = arguments.callee.viewportElement;