Merge pull request #90 from fredj/2971
Remove undefined variables, r=elemoine
This commit is contained in:
@@ -88,7 +88,7 @@ OpenLayers.Layer.KaMapCache = OpenLayers.Class(OpenLayers.Layer.KaMap, {
|
||||
*/
|
||||
initialize: function(name, url, params, options) {
|
||||
OpenLayers.Layer.KaMap.prototype.initialize.apply(this, arguments);
|
||||
this.extension = this.IMAGE_EXTENSIONS[this.params.i.toLowerCase() || DEFAULT_FORMAT];
|
||||
this.extension = this.IMAGE_EXTENSIONS[this.params.i.toLowerCase() || this.DEFAULT_FORMAT];
|
||||
},
|
||||
|
||||
/**
|
||||
@@ -111,18 +111,8 @@ OpenLayers.Layer.KaMapCache = OpenLayers.Class(OpenLayers.Layer.KaMap, {
|
||||
|
||||
var metaX = Math.floor(pX / this.tileSize.w / this.params.metaTileSize.w) * this.tileSize.w * this.params.metaTileSize.w;
|
||||
var metaY = Math.floor(pY / this.tileSize.h / this.params.metaTileSize.h) * this.tileSize.h * this.params.metaTileSize.h;
|
||||
|
||||
// if url is not a string, it should be an array of strings,
|
||||
// in which case we will deterministically select one of them in
|
||||
// order to evenly distribute requests to different urls.
|
||||
//
|
||||
var url = this.url;
|
||||
if (OpenLayers.Util.isArray(url)) {
|
||||
url = this.selectUrl(paramsString, url);
|
||||
}
|
||||
|
||||
var components = [
|
||||
url,
|
||||
"/",
|
||||
this.params.map,
|
||||
"/",
|
||||
@@ -140,8 +130,13 @@ OpenLayers.Layer.KaMapCache = OpenLayers.Class(OpenLayers.Layer.KaMap, {
|
||||
".",
|
||||
this.extension
|
||||
];
|
||||
|
||||
return components.join("");
|
||||
|
||||
var url = this.url;
|
||||
|
||||
if (OpenLayers.Util.isArray(url)) {
|
||||
url = this.selectUrl(components.join(''), url);
|
||||
}
|
||||
return url + components.join("");
|
||||
},
|
||||
|
||||
CLASS_NAME: "OpenLayers.Layer.KaMapCache"
|
||||
|
||||
Reference in New Issue
Block a user