]> dev.renevier.net Git - syp.git/blob - openlayers/lib/OpenLayers/Layer/MapServer/Untiled.js
initial commit
[syp.git] / openlayers / lib / OpenLayers / Layer / MapServer / Untiled.js
1 /* Copyright 2006-2008 MetaCarta, Inc., published under the Clear BSD license.
2  * See http://svn.openlayers.org/trunk/openlayers/license.txt for the full text
3  * of the license. */
4
5  
6 /**
7  * @requires OpenLayers/Layer/MapServer.js
8  * @requires OpenLayers/Console.js
9  */
10
11 /**
12  * Class: OpenLayers.Layer.MapServer.Untiled
13  * *Deprecated*.  To be removed in 3.0.  Instead use OpenLayers.Layer.MapServer
14  *     and pass the option 'singleTile' as true.
15  * 
16  * Inherits from: 
17  *  - <OpenLayers.Layer.MapServer>
18  */
19 OpenLayers.Layer.MapServer.Untiled = OpenLayers.Class(OpenLayers.Layer.MapServer, {
20
21     /**
22      * APIProperty: singleTile
23      * {singleTile} Always true for untiled.
24      */
25     singleTile: true,
26
27     /**
28      * Constructor: OpenLayers.Layer.MapServer.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.MapServer.prototype.initialize.apply(this, arguments);
38         
39         var msg = "The OpenLayers.Layer.MapServer.Untiled class is deprecated and " +
40                   "will be removed in 3.0. Instead, you should use the " +
41                   "normal OpenLayers.Layer.MapServer 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.MapServer.Untiled>} An exact clone of this layer
52      */
53     clone: function (obj) {
54         
55         if (obj == null) {
56             obj = new OpenLayers.Layer.MapServer.Untiled(this.name,
57                                                          this.url,
58                                                          this.params,
59                                                          this.options);
60         }
61
62         //get all additions from superclasses
63         obj = OpenLayers.Layer.MapServer.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.MapServer.Untiled"
71 });