~mortenoh/+junk/dhis2-detailed-import-export

« back to all changes in this revision

Viewing changes to gis/dhis-gis-geostat/mfbase/openlayers/lib/OpenLayers/Layer/WMS/Untiled.js

  • Committer: larshelge at gmail
  • Date: 2009-03-03 16:46:36 UTC
  • Revision ID: larshelge@gmail.com-20090303164636-2sjlrquo7ib1gf7r
Initial check-in

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
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
 */
 
9
 
 
10
/**
 
11
 * Class: OpenLayers.Layer.WMS.Untiled
 
12
 * *Deprecated*.  To be removed in 3.0.  Instead use OpenLayers.Layer.WMS and 
 
13
 *     pass the option 'singleTile' as true.
 
14
 * 
 
15
 * Inherits from: 
 
16
 *  - <OpenLayers.Layer.WMS>
 
17
 */
 
18
OpenLayers.Layer.WMS.Untiled = OpenLayers.Class(OpenLayers.Layer.WMS, {
 
19
 
 
20
    /**
 
21
     * APIProperty: singleTile
 
22
     * {singleTile} Always true for untiled.
 
23
     */
 
24
    singleTile: true,
 
25
 
 
26
    /**
 
27
     * Constructor: OpenLayers.Layer.WMS.Untiled
 
28
     *
 
29
     * Parameters:
 
30
     * name - {String} 
 
31
     * url - {String} 
 
32
     * params - {Object} 
 
33
     * options - {Object} 
 
34
     */
 
35
    initialize: function(name, url, params, options) {
 
36
        OpenLayers.Layer.WMS.prototype.initialize.apply(this, arguments);
 
37
        
 
38
        var msg = "The OpenLayers.Layer.WMS.Untiled class is deprecated and " +
 
39
                  "will be removed in 3.0. Instead, you should use the " +
 
40
                  "normal OpenLayers.Layer.WMS class, passing it the option " +
 
41
                  "'singleTile' as true.";
 
42
        OpenLayers.Console.warn(msg);
 
43
    },    
 
44
 
 
45
    /**
 
46
     * Method: clone
 
47
     * Create a clone of this layer
 
48
     *
 
49
     * Returns:
 
50
     * {<OpenLayers.Layer.WMS.Untiled>} An exact clone of this layer
 
51
     */
 
52
    clone: function (obj) {
 
53
        
 
54
        if (obj == null) {
 
55
            obj = new OpenLayers.Layer.WMS.Untiled(this.name,
 
56
                                                   this.url,
 
57
                                                   this.params,
 
58
                                                   this.options);
 
59
        }
 
60
 
 
61
        //get all additions from superclasses
 
62
        obj = OpenLayers.Layer.WMS.prototype.clone.apply(this, [obj]);
 
63
 
 
64
        // copy/set any non-init, non-simple values here
 
65
 
 
66
        return obj;
 
67
    }, 
 
68
 
 
69
    CLASS_NAME: "OpenLayers.Layer.WMS.Untiled"
 
70
});