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

commits-20090109 at openlayers.org commits-20090109 at openlayers.org
Sat Sep 17 16:26:50 EDT 2011


Author: tschaub
Date: 2011-09-17 13:26:49 -0700 (Sat, 17 Sep 2011)
New Revision: 12395

Modified:
   sandbox/jsdoc/jsd/OpenLayers/Layer/WMS.js
Log:
Class in namespace.  Indicate deprecation.

Modified: sandbox/jsdoc/jsd/OpenLayers/Layer/WMS.js
===================================================================
--- sandbox/jsdoc/jsd/OpenLayers/Layer/WMS.js	2011-09-17 20:24:02 UTC (rev 12394)
+++ sandbox/jsdoc/jsd/OpenLayers/Layer/WMS.js	2011-09-17 20:26:49 UTC (rev 12395)
@@ -10,13 +10,9 @@
  */
 
 /**
- * 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
+ * @namespace OpenLayers.Layer
+ * @class
+ * @extends OpenLayers.Layer.Grid
  */
 OpenLayers.Layer.WMS = OpenLayers.Class(OpenLayers.Layer.Grid, {
 
@@ -32,13 +28,13 @@
                      },
     
     /**
-     * Property: reproject
-     * *Deprecated*. See http://trac.openlayers.org/wiki/SphericalMercator
-     * for information on the replacement for this functionality. 
      * @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.
+     * @private
+     * @deprecated See http://trac.openlayers.org/wiki/SphericalMercator for 
+     *     information on the replacement for this functionality. 
      */
     reproject: false,
  
@@ -52,6 +48,7 @@
      * APIProperty: encodeBBOX
      * @type {boolean}  Should the BBOX commas be encoded? The WMS spec says 'no', 
      * but some services want it that way. Default false.
+     * @memberOf OpenLayers.Layer.WMS.prototype
      */
     encodeBBOX: false,
     
@@ -72,52 +69,35 @@
      */
     yx: {'EPSG:4326': true},
     
-    /**
-     * @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.
-     */
+     /**
+      * 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.
+      * @constructs OpenLayers.Layer.WMS
+      */
     initialize: function(name, url, params, options) {
         var newArguments = [];
         //uppercase params
@@ -155,6 +135,7 @@
     /**
      * Method: destroy
      * Destroy this layer
+     * @memberOf OpenLayers.Layer.WMS.prototype
      */
     destroy: function() {
         // for now, nothing special to do here. 
@@ -168,6 +149,7 @@
      *
      * Returns:
      * @return {OpenLayers.Layer.WMS}  An exact clone of this layer
+     * @memberOf OpenLayers.Layer.WMS.prototype
      */
     clone: function (obj) {
         
@@ -193,6 +175,7 @@
      * 
      * Returns:
      * @return {boolean}  true if the axis order is reversed, false otherwise.
+     * @memberOf OpenLayers.Layer.WMS.prototype
      */
     reverseAxisOrder: function() {
         return (parseFloat(this.params.VERSION) >= 1.3 && 
@@ -211,6 +194,8 @@
      * @return {string}  A string with the layer's url and parameters and also the
      *          passed-in bounds and appropriate tile size specified as 
      *          parameters.
+     * @memberOf OpenLayers.Layer.WMS.prototype
+     * @private
      */
     getURL: function (bounds) {
         bounds = this.adjustBounds(bounds);
@@ -238,6 +223,7 @@
      * 
      * Parameters:
      * @param {Object} newParams  Hashtable of new params to use
+     * @memberOf OpenLayers.Layer.WMS.prototype
      */
     mergeNewParams:function(newParams) {
         var upperParams = OpenLayers.Util.upperCaseObject(newParams);
@@ -260,6 +246,7 @@
      * 
      * Returns:
      * @return {string}  
+     * @memberOf OpenLayers.Layer.WMS.prototype
      */
     getFullRequestString:function(newParams, altUrl) {
         var mapProjection = this.map.getProjectionObject();



More information about the Commits mailing list