source:
trunk/workshop-routing-foss4g/web/OpenLayers/lib/OpenLayers/Layer/MapServer/Untiled.js
@
76
Revision 76, 2.2 KB checked in by djay, 12 years ago (diff) | |
---|---|
|
Line | |
---|---|
1 | /* Copyright (c) 2006-2010 by OpenLayers Contributors (see authors.txt for |
2 | * full list of contributors). Published under the Clear BSD license. |
3 | * See http://svn.openlayers.org/trunk/openlayers/license.txt for the |
4 | * full text of the license. */ |
5 | |
6 | |
7 | /** |
8 | * @requires OpenLayers/Layer/MapServer.js |
9 | * @requires OpenLayers/Console.js |
10 | */ |
11 | |
12 | /** |
13 | * Class: OpenLayers.Layer.MapServer.Untiled |
14 | * *Deprecated*. To be removed in 3.0. Instead use OpenLayers.Layer.MapServer |
15 | * and pass the option 'singleTile' as true. |
16 | * |
17 | * Inherits from: |
18 | * - <OpenLayers.Layer.MapServer> |
19 | */ |
20 | OpenLayers.Layer.MapServer.Untiled = OpenLayers.Class(OpenLayers.Layer.MapServer, { |
21 | |
22 | /** |
23 | * APIProperty: singleTile |
24 | * {singleTile} Always true for untiled. |
25 | */ |
26 | singleTile: true, |
27 | |
28 | /** |
29 | * Constructor: OpenLayers.Layer.MapServer.Untiled |
30 | * |
31 | * Parameters: |
32 | * name - {String} |
33 | * url - {String} |
34 | * params - {Object} |
35 | * options - {Object} |
36 | */ |
37 | initialize: function(name, url, params, options) { |
38 | OpenLayers.Layer.MapServer.prototype.initialize.apply(this, arguments); |
39 | |
40 | var msg = "The OpenLayers.Layer.MapServer.Untiled class is deprecated and " + |
41 | "will be removed in 3.0. Instead, you should use the " + |
42 | "normal OpenLayers.Layer.MapServer class, passing it the option " + |
43 | "'singleTile' as true."; |
44 | OpenLayers.Console.warn(msg); |
45 | }, |
46 | |
47 | /** |
48 | * Method: clone |
49 | * Create a clone of this layer |
50 | * |
51 | * Returns: |
52 | * {<OpenLayers.Layer.MapServer.Untiled>} An exact clone of this layer |
53 | */ |
54 | clone: function (obj) { |
55 | |
56 | if (obj == null) { |
57 | obj = new OpenLayers.Layer.MapServer.Untiled(this.name, |
58 | this.url, |
59 | this.params, |
60 | this.getOptions()); |
61 | } |
62 | |
63 | //get all additions from superclasses |
64 | obj = OpenLayers.Layer.MapServer.prototype.clone.apply(this, [obj]); |
65 | |
66 | // copy/set any non-init, non-simple values here |
67 | |
68 | return obj; |
69 | }, |
70 | |
71 | CLASS_NAME: "OpenLayers.Layer.MapServer.Untiled" |
72 | }); |
Note: See TracBrowser
for help on using the repository browser.