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) {
|
initialize: function(name, url, params, options) {
|
||||||
OpenLayers.Layer.KaMap.prototype.initialize.apply(this, arguments);
|
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];
|
||||||
},
|
},
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -112,17 +112,7 @@ 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 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;
|
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 = [
|
var components = [
|
||||||
url,
|
|
||||||
"/",
|
"/",
|
||||||
this.params.map,
|
this.params.map,
|
||||||
"/",
|
"/",
|
||||||
@@ -141,7 +131,12 @@ OpenLayers.Layer.KaMapCache = OpenLayers.Class(OpenLayers.Layer.KaMap, {
|
|||||||
this.extension
|
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"
|
CLASS_NAME: "OpenLayers.Layer.KaMapCache"
|
||||||
|
|||||||
Reference in New Issue
Block a user