~flavour/sahana-eden/trunk

« back to all changes in this revision

Viewing changes to static/scripts/gis/openlayers/lib/OpenLayers/Layer/KaMapCache.js

  • Committer: Fran Boon
  • Date: 2012-01-21 16:10:49 UTC
  • Revision ID: fran@aidiq.com-20120121161049-u2ytuiymn1t312c6
JS upgrade: jQuery, jQueryUI, OpenLayers, Ext, GeoExt

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
/* Copyright (c) 2006-2011 by OpenLayers Contributors (see authors.txt for 
 
1
/* Copyright (c) 2006-2012 by OpenLayers Contributors (see authors.txt for 
2
2
 * full list of contributors). Published under the Clear BSD license.  
3
3
 * See http://svn.openlayers.org/trunk/openlayers/license.txt for the
4
4
 * full text of the license. */
88
88
     */
89
89
    initialize: function(name, url, params, options) {
90
90
        OpenLayers.Layer.KaMap.prototype.initialize.apply(this, arguments);
91
 
        this.extension = this.IMAGE_EXTENSIONS[this.params.i.toLowerCase() || DEFAULT_FORMAT];
 
91
        this.extension = this.IMAGE_EXTENSIONS[this.params.i.toLowerCase() || this.DEFAULT_FORMAT];
92
92
    },
93
93
 
94
94
    /**
111
111
 
112
112
        var metaX = Math.floor(pX / this.tileSize.w / this.params.metaTileSize.w) * this.tileSize.w * this.params.metaTileSize.w;
113
113
        var metaY = Math.floor(pY / this.tileSize.h / this.params.metaTileSize.h) * this.tileSize.h * this.params.metaTileSize.h;
114
 
 
115
 
        // if url is not a string, it should be an array of strings,
116
 
        // in which case we will deterministically select one of them in
117
 
        // order to evenly distribute requests to different urls.
118
 
        //
119
 
        var url = this.url;
120
 
        if (OpenLayers.Util.isArray(url)) {
121
 
            url = this.selectUrl(paramsString, url);
122
 
        }  
123
114
    
124
115
        var components = [
125
 
            url,
126
116
            "/",
127
117
            this.params.map,
128
118
            "/",
140
130
            ".",
141
131
            this.extension
142
132
          ];
143
 
          
144
 
        return components.join("");
 
133
 
 
134
        var url = this.url;
 
135
 
 
136
        if (OpenLayers.Util.isArray(url)) {
 
137
            url = this.selectUrl(components.join(''), url);
 
138
        }
 
139
        return url + components.join("");
145
140
    },
146
141
 
147
142
    CLASS_NAME: "OpenLayers.Layer.KaMapCache"