]> dev.renevier.net Git - syp.git/blob - openlayers/lib/OpenLayers/Layer/WMS/Untiled.js
initial commit
[syp.git] / openlayers / lib / OpenLayers / Layer / WMS / Untiled.js
1 /* Copyright (c) 2006-2008 MetaCarta, Inc., published under the Clear BSD
2  * license.  See http://svn.openlayers.org/trunk/openlayers/license.txt for the
3  * full text of the license. */
4
5  
6 /**
7  * @requires OpenLayers/Layer/WMS.js
8  * @requires OpenLayers/Console.js
9  */
10
11 /**
12  * Class: OpenLayers.Layer.WMS.Untiled
13  * *Deprecated*.  To be removed in 3.0.  Instead use OpenLayers.Layer.WMS and 
14  *     pass the option 'singleTile' as true.
15  * 
16  * Inherits from: 
17  *  - <OpenLayers.Layer.WMS>
18  */
19 OpenLayers.Layer.WMS.Untiled = OpenLayers.Class(OpenLayers.Layer.WMS, {
20
21     /**
22      * APIProperty: singleTile
23      * {singleTile} Always true for untiled.
24      */
25     singleTile: true,
26
27     /**
28      * Constructor: OpenLayers.Layer.WMS.Untiled
29      *
30      * Parameters:
31      * name - {String} 
32      * url - {String} 
33      * params - {Object} 
34      * options - {Object} 
35      */
36     initialize: function(name, url, params, options) {
37         OpenLayers.Layer.WMS.prototype.initialize.apply(this, arguments);
38         
39         var msg = "The OpenLayers.Layer.WMS.Untiled class is deprecated and " +
40                   "will be removed in 3.0. Instead, you should use the " +
41                   "normal OpenLayers.Layer.WMS class, passing it the option " +
42                   "'singleTile' as true.";
43         OpenLayers.Console.warn(msg);
44     },    
45
46     /**
47      * Method: clone
48      * Create a clone of this layer
49      *
50      * Returns:
51      * {<OpenLayers.Layer.WMS.Untiled>} An exact clone of this layer
52      */
53     clone: function (obj) {
54         
55         if (obj == null) {
56             obj = new OpenLayers.Layer.WMS.Untiled(this.name,
57                                                    this.url,
58                                                    this.params,
59                                                    this.options);
60         }
61
62         //get all additions from superclasses
63         obj = OpenLayers.Layer.WMS.prototype.clone.apply(this, [obj]);
64
65         // copy/set any non-init, non-simple values here
66
67         return obj;
68     }, 
69
70     CLASS_NAME: "OpenLayers.Layer.WMS.Untiled"
71 });