JSDOC coding standards

git-svn-id: http://svn.openlayers.org/trunk/openlayers@160 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
This commit is contained in:
euzuro
2006-05-18 18:38:14 +00:00
parent 525c40fd4d
commit bfc49a3ef4

View File

@@ -1,45 +1,57 @@
/**
* @class
*/
OpenLayers.Layer.WMS = Class.create(); OpenLayers.Layer.WMS = Class.create();
OpenLayers.Layer.WMS.prototype = OpenLayers.Layer.WMS.prototype =
Object.extend( new OpenLayers.Layer.Grid(), { Object.extend( new OpenLayers.Layer.Grid(), {
// hash /** @final @type hash */
DEFAULT_PARAMS: { DEFAULT_PARAMS: { service: "WMS",
service: "WMS", version: "1.1.1",
version: "1.1.1", request: "GetMap",
request: "GetMap", srs: "EPSG:4326",
srs: "EPSG:4326", styles: "",
styles: "", exceptions: "application/vnd.ogc.se_inimage",
exceptions: "application/vnd.ogc.se_inimage", format: "image/jpeg"
format: "image/jpeg" },
},
/** /**
* @constructor
*
* @param {str} name * @param {str} name
* @param {str} url * @param {str} url
* @param {hash} params * @param {hash} params
*/ */
initialize: function(name, url, params) { initialize: function(name, url, params) {
OpenLayers.Layer.Grid.prototype.initialize.apply(this, arguments); OpenLayers.Layer.Grid.prototype.initialize.apply(this, arguments);
OpenLayers.Util.applyDefaults( this.params, this.DEFAULT_PARAMS ); OpenLayers.Util.applyDefaults(this.params, this.DEFAULT_PARAMS);
}, },
/** /**
* @param * @param {String} name
* @param {hash} params
*
* @returns A clone of this OpenLayers.Layer.WMS, with the passed-in
* parameters merged in.
* @type OpenLayers.Layer.WMS
*/ */
clone: function (name, params) { clone: function (name, params) {
var mergedParams = {} var mergedParams = {};
Object.extend(mergedParams, this.params); Object.extend(mergedParams, this.params);
Object.extend(mergedParams, params); Object.extend(mergedParams, params);
var obj = new OpenLayers.Layer.WMS(name, this.url, mergedParams); var obj = new OpenLayers.Layer.WMS(name, this.url, mergedParams);
obj.setTileSize( this.tileSize ); obj.setTileSize(this.tileSize);
return obj; return obj;
}, },
/** /**
* addTile creates a tile, initializes it (via 'draw' in this case), and * addTile creates a tile, initializes it (via 'draw' in this case), and
* adds it to the layer div. THe tile itself is then returned so that info * adds it to the layer div.
* about it can be stored for later reuse. *
* @param {OpenLayers.Bounds} bounds * @param {OpenLayers.Bounds} bounds
*
* @returns The added OpenLayers.Tile.Image
* @type OpenLayers.Tile.Image
*/ */
addTile:function(bounds,position) { addTile:function(bounds,position) {
url = this.getFullRequestString( url = this.getFullRequestString(
@@ -53,8 +65,13 @@ OpenLayers.Layer.WMS.prototype =
return tile; return tile;
}, },
/** clear out the layer's main div
*/
_initTiles: function () { _initTiles: function () {
this.div.innerHTML=""; this.div.innerHTML="";
OpenLayers.Layer.Grid.prototype._initTiles.apply(this, arguments); OpenLayers.Layer.Grid.prototype._initTiles.apply(this, arguments);
} }
/** @final @type String */
CLASS_NAME: "OpenLayers.Layer.WMS"
}); });