fix up comments

git-svn-id: http://svn.openlayers.org/trunk/openlayers@3591 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
This commit is contained in:
euzuro
2007-07-05 17:57:27 +00:00
parent cb3a2566bb
commit 9e8c1a22c7
+26 -34
View File
@@ -1,7 +1,7 @@
/* Copyright (c) 2006 MetaCarta, Inc., published under a modified BSD license. /* Copyright (c) 2006 MetaCarta, Inc., published under a modified BSD license.
* See http://svn.openlayers.org/trunk/openlayers/repository-license.txt * See http://svn.openlayers.org/trunk/openlayers/repository-license.txt
* for the full text of the license. */ * for the full text of the license. */
// @requires OpenLayers/Layer/Grid.js
/** /**
* @requires OpenLayers/Layer/Grid.js * @requires OpenLayers/Layer/Grid.js
* *
@@ -29,13 +29,6 @@ OpenLayers.Layer.MapServer.prototype =
* Constructor: OpenLayers.Layer.MapServer * Constructor: OpenLayers.Layer.MapServer
* Create a new MapServer layer object * Create a new MapServer layer object
* *
* Example:
* (code)
* layer = new OpenLayers.Layer.MapServer( "OpenLayers WMS",
* "http://labs.metacarta.com/wms/vmap0", {layers: 'basic'},
* {gutter: 15});
* (end)
*
* Parameters: * Parameters:
* name - {String} A name for the layer * name - {String} A name for the layer
* url - {String} Base url for the MapServer CGI * url - {String} Base url for the MapServer CGI
@@ -43,9 +36,6 @@ OpenLayers.Layer.MapServer.prototype =
* params - {Object} An object with key/value pairs representing the * params - {Object} An object with key/value pairs representing the
* GetMap query string parameters and parameter values. * GetMap query string parameters and parameter values.
* options - {Ojbect} Hashtable of extra options to tag onto the layer * options - {Ojbect} Hashtable of extra options to tag onto the layer
*
* Return:
* A new OpenLayers.Layer.MapServer instance
*/ */
initialize: function(name, url, params, options) { initialize: function(name, url, params, options) {
var newArguments = new Array(); var newArguments = new Array();
@@ -90,13 +80,14 @@ OpenLayers.Layer.MapServer.prototype =
}, },
/** /**
* addTile creates a tile, initializes it, and * Method: addTile
* adds it to the layer div. * Creates a tile, initializes it, and adds it to the layer div.
* *
* @param {<OpenLayers.Bounds>} bounds * Parameters:
* bounds - {<OpenLayers.Bounds>}
* *
* @returns The added OpenLayers.Tile.Image * Return:
* @type OpenLayers.Tile.Image * {<OpenLayers.Tile.Image>} The added OpenLayers.Tile.Image
*/ */
addTile:function(bounds,position) { addTile:function(bounds,position) {
var url = this.getURL(bounds); var url = this.getURL(bounds);
@@ -108,12 +99,13 @@ OpenLayers.Layer.MapServer.prototype =
* Return a query string for this layer * Return a query string for this layer
* *
* Parameters: * Parameters:
* bounds - {<OpenLayers.Bounds>} A bounds representing the bbox for the * bounds - {<OpenLayers.Bounds>} A bounds representing the bbox
* request * for the request
* *
* Return: * Return:
* {String} A string with the layer's url and parameters and also the * {String} A string with the layer's url and parameters and also
* passed-in bounds and appropriate tile size specified as parameters * the passed-in bounds and appropriate tile size specified
* as parameters.
*/ */
getURL: function (bounds) { getURL: function (bounds) {
bounds = this.adjustBounds(bounds); bounds = this.adjustBounds(bounds);
@@ -139,15 +131,14 @@ OpenLayers.Layer.MapServer.prototype =
* Method: getFullRequestString * Method: getFullRequestString
* combine the layer's url with its params and these newParams. * combine the layer's url with its params and these newParams.
* *
* Parameter: {Object} newParams * Parameter:
* new parameters that should be added to the request string. * newParams - {Object} New parameters that should be added to the
* request string.
* altUrl - {String} (optional) Replace the URL in the full request
* string with the provided URL.
* *
* Parameter: {String} altUrl * Return:
* optional, replace the URL in the full request string with the * {String} A string with the layer's url and parameters embedded in it.
* provided URL.
*
* Return: {String}
* A string with the layer's url and parameters embedded in it.
*/ */
getFullRequestString:function(newParams, altUrl) { getFullRequestString:function(newParams, altUrl) {
// use layer's url unless altUrl passed in // use layer's url unless altUrl passed in
@@ -176,12 +167,13 @@ OpenLayers.Layer.MapServer.prototype =
} }
var paramsString = OpenLayers.Util.getParameterString(allParams); var paramsString = OpenLayers.Util.getParameterString(allParams);
/* MapServer needs '+' seperating things like bounds/height/width. // MapServer needs '+' seperating things like bounds/height/width.
Since typically this is URL encoded, we use a slight hack: we // Since typically this is URL encoded, we use a slight hack: we
depend on the list-like functionality of getParameterString to // depend on the list-like functionality of getParameterString to
leave ',' only in the case of list items (since otherwise it is // leave ',' only in the case of list items (since otherwise it is
encoded) then do a regular expression replace on the , characters // encoded) then do a regular expression replace on the , characters
to '+' */ // to '+'
//
paramsString = paramsString.replace(/,/g, "+"); paramsString = paramsString.replace(/,/g, "+");
if (paramsString != "") { if (paramsString != "") {