[OpenLayers-Commits] r12392 - sandbox/jsdoc/jsd/OpenLayers/Layer

commits-20090109 at openlayers.org commits-20090109 at openlayers.org
Sat Sep 17 16:18:56 EDT 2011


Author: mpriour
Date: 2011-09-17 13:18:55 -0700 (Sat, 17 Sep 2011)
New Revision: 12392

Modified:
   sandbox/jsdoc/jsd/OpenLayers/Layer/WMS.js
Log:
Add Grid with autoconverrted doc tags

Modified: sandbox/jsdoc/jsd/OpenLayers/Layer/WMS.js
===================================================================
--- sandbox/jsdoc/jsd/OpenLayers/Layer/WMS.js	2011-09-17 19:57:12 UTC (rev 12391)
+++ sandbox/jsdoc/jsd/OpenLayers/Layer/WMS.js	2011-09-17 20:18:55 UTC (rev 12392)
@@ -9,13 +9,20 @@
  * @requires OpenLayers/Tile/Image.js
  */
 
+/**
+ * Class: OpenLayers.Layer.WMS
+ * Instances of OpenLayers.Layer.WMS are used to display data from OGC Web
+ *     Mapping Services. Create a new WMS layer with the <OpenLayers.Layer.WMS>
+ *     constructor.
+ * 
+ * Inherits from:
+ *  @extends OpenLayers.Layer.Grid
+ */
 OpenLayers.Layer.WMS = OpenLayers.Class(OpenLayers.Layer.Grid, {
 
     /**
-     * Hashtable of default parameter key/value pairs 
      * @const Constant: DEFAULT_PARAMS
-     * @type {Object}
-     * @memberOf OpenLayers.Layer.WMS.prototype
+     * @type {Object}  Hashtable of default parameter key/value pairs 
      */
     DEFAULT_PARAMS: { service: "WMS",
                       version: "1.1.1",
@@ -25,80 +32,92 @@
                      },
     
     /**
+     * Property: reproject
      * *Deprecated*. See http://trac.openlayers.org/wiki/SphericalMercator
      * for information on the replacement for this functionality. 
-     * Try to reproject this layer if its coordinate reference system
+     * @type {boolean}  Try to reproject this layer if its coordinate reference system
      *           is different than that of the base layer.  Default is false.  
      *           Set this in the layer options.  Should be set to false in 
      *           most cases.
-     * @type {boolean}
-     * @memberOf OpenLayers.Layer.WMS.prototype
      */
     reproject: false,
  
     /**
-     * Default is true for WMS layer.
-     * @type {boolean}
-     * @memberOf OpenLayers.Layer.WMS.prototype
+     * APIProperty: isBaseLayer
+     * @type {boolean}  Default is true for WMS layer
      */
     isBaseLayer: true,
     
     /**
-     * Should the BBOX commas be encoded? The WMS spec says 'no', 
+     * APIProperty: encodeBBOX
+     * @type {boolean}  Should the BBOX commas be encoded? The WMS spec says 'no', 
      * but some services want it that way. Default false.
-     * @type {boolean}  
      */
     encodeBBOX: false,
     
     /** 
-     * If true, the image format will not be automagicaly switched 
+     * APIProperty: noMagic 
+     * @type {boolean}  If true, the image format will not be automagicaly switched 
      *     from image/jpeg to image/png or image/gif when using 
      *     TRANSPARENT=TRUE. Also isBaseLayer will not changed by the  
-     *     constructor. Default false.
-     * @type {boolean}
-     * @memberOf OpenLayers.Layer.WMS.prototype
+     *     constructor. Default false. 
      */ 
     noMagic: false,
     
     /**
-     *   Keys in this object are EPSG codes for which the axis order
+     * Property: yx
+     * @type {Object}  Keys in this object are EPSG codes for which the axis order
      *     is to be reversed (yx instead of xy, LatLon instead of LonLat), with
      *     true as value. This is only relevant for WMS versions >= 1.3.0.
-     * @type {Object}
-     * @memberOf OpenLayers.Layer.WMS.prototype
      */
     yx: {'EPSG:4326': true},
     
-     /**
-      * Instances of OpenLayers.Layer.WMS are used to display data from OGC Web
-      *     Mapping Services. Create a new WMS layer with the <OpenLayers.Layer.WMS>
-      *     constructor.
-      *
-      * <pre>
-      * // The code below creates a transparent WMS layer with additional options.
-      * var wms = new OpenLayers.Layer.WMS(
-      *     "NASA Global Mosaic",
-      *     "http://wms.jpl.nasa.gov/wms.cgi", 
-      *     {
-      *         layers: "modis,global_mosaic",
-      *         transparent: true
-      *     }, {
-      *         opacity: 0.5,
-      *         singleTile: true
-      * });
-      * </pre>
-      *
-      * @param {string} name  A name for the layer
-      * @param {string} url  Base url for the WMS
-      *                (e.g. http://wms.jpl.nasa.gov/wms.cgi)
-      * @param {Object} params  An object with key/value pairs representing the
-      *                   GetMap query string parameters and parameter values.
-      * @param {Object=} options options - {Object} Hashtable of extra options to tag onto the layer.
-      *     These options include all properties listed above, plus the ones
-      *     inherited from superclasses.
-      * @constructor OpenLayers.Layer.WMS
-      * @extends OpenLayers.Layer.Grid
-      */
+    /**
+     * @constructor Constructor: OpenLayers.Layer.WMS
+     * Create a new WMS layer object
+     *
+     * Examples:
+     *
+     * The code below creates a simple WMS layer using the image/jpeg format.
+     * (code)
+     * var wms = new OpenLayers.Layer.WMS("NASA Global Mosaic",
+     *                                    "http://wms.jpl.nasa.gov/wms.cgi", 
+     *                                    {layers: "modis,global_mosaic"});
+     * (end)
+     * Note the 3rd argument (params). Properties added to this object will be
+     * added to the WMS GetMap requests used for this layer's tiles. The only
+     * mandatory parameter is "layers". Other common WMS params include
+     * "transparent", "styles" and "format". Note that the "srs" param will
+     * always be ignored. Instead, it will be derived from the baseLayer's or
+     * map's projection.
+     *
+     * The code below creates a transparent WMS layer with additional options.
+     * (code)
+     * var wms = new OpenLayers.Layer.WMS("NASA Global Mosaic",
+     *                                    "http://wms.jpl.nasa.gov/wms.cgi", 
+     *                                    {
+     *                                        layers: "modis,global_mosaic",
+     *                                        transparent: true
+     *                                    }, {
+     *                                        opacity: 0.5,
+     *                                        singleTile: true
+     *                                    });
+     * (end)
+     * Note that by default, a WMS layer is configured as baseLayer. Setting
+     * the "transparent" param to true will apply some magic (see <noMagic>).
+     * The default image format changes from image/jpeg to image/png, and the
+     * layer is not configured as baseLayer.
+     *
+     * Parameters:
+     * @param {string} name  A name for the layer
+     * @param {string} url  Base url for the WMS
+     *                (e.g. http://wms.jpl.nasa.gov/wms.cgi)
+     * @param {Object} params  An object with key/value pairs representing the
+     *                   GetMap query string parameters and parameter values.
+     * @param {Object=} options options - {Object} Hashtable of extra options to tag onto the layer.
+     *     These options include all properties listed above, plus the ones
+     *     inherited from superclasses.
+     */
     initialize: function(name, url, params, options) {
         var newArguments = [];
         //uppercase params
@@ -134,8 +153,8 @@
     },    
 
     /**
+     * Method: destroy
      * Destroy this layer
-     * @methodOf OpenLayers.Layer.WMS.prototype
      */
     destroy: function() {
         // for now, nothing special to do here. 
@@ -144,10 +163,11 @@
 
     
     /**
+     * Method: clone
      * Create a clone of this layer
      *
+     * Returns:
      * @return {OpenLayers.Layer.WMS}  An exact clone of this layer
-     * @methodOf OpenLayers.Layer.WMS.prototype
      */
     clone: function (obj) {
         
@@ -167,11 +187,12 @@
     },    
     
     /**
+     * APIMethod: reverseAxisOrder
      * Returns true if the axis order is reversed for the WMS version and
      * projection of the layer.
      * 
+     * Returns:
      * @return {boolean}  true if the axis order is reversed, false otherwise.
-     * @methodOf OpenLayers.Layer.WMS.prototype
      */
     reverseAxisOrder: function() {
         return (parseFloat(this.params.VERSION) >= 1.3 && 
@@ -179,15 +200,17 @@
     },
     
     /**
+     * Method: getURL
      * Return a GetMap query string for this layer
      *
+     * Parameters:
      * @param {OpenLayers.Bounds} bounds  A bounds representing the bbox for the
      *                                request.
      *
+     * Returns:
      * @return {string}  A string with the layer's url and parameters and also the
      *          passed-in bounds and appropriate tile size specified as 
      *          parameters.
-     * @methodOf OpenLayers.Layer.WMS.prototype
      */
     getURL: function (bounds) {
         bounds = this.adjustBounds(bounds);
@@ -206,14 +229,15 @@
     },
 
     /**
+     * APIMethod: mergeNewParams
      * Catch changeParams and uppercase the new params to be merged in
      *     before calling changeParams on the super class.
      * 
      *     Once params have been changed, the tiles will be reloaded with
      *     the new parameters.
      * 
+     * Parameters:
      * @param {Object} newParams  Hashtable of new params to use
-     * @methodOf OpenLayers.Layer.WMS.prototype
      */
     mergeNewParams:function(newParams) {
         var upperParams = OpenLayers.Util.upperCaseObject(newParams);
@@ -223,17 +247,19 @@
     },
 
     /** 
+     * APIMethod: getFullRequestString
      * Combine the layer's url with its params and these newParams. 
      *   
      *     Add the SRS parameter from projection -- this is probably
      *     more eloquently done via a setProjection() method, but this 
      *     works for now and always.
      *
+     * Parameters:
      * @param {Object} newParams 
      * @param {string} altUrl  Use this as the url instead of the layer's url
      * 
+     * Returns:
      * @return {string}  
-     * @methodOf OpenLayers.Layer.WMS.prototype
      */
     getFullRequestString:function(newParams, altUrl) {
         var mapProjection = this.map.getProjectionObject();



More information about the Commits mailing list