coding style in WMSCapabilities/v1.js, no functional change

git-svn-id: http://svn.openlayers.org/trunk/openlayers@12210 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
This commit is contained in:
Éric Lemoine
2011-08-08 04:50:36 +00:00
parent 61b291ee67
commit d79aa2ec3b
+9 -6
View File
@@ -113,6 +113,8 @@ OpenLayers.Format.WMSCapabilities.v1 = OpenLayers.Class(
layer.formats = capability.request.getmap.formats; layer.formats = capability.request.getmap.formats;
} }
var i, len;
// deal with property inheritance // deal with property inheritance
if(parentLayer) { if(parentLayer) {
// add style // add style
@@ -133,9 +135,10 @@ OpenLayers.Format.WMSCapabilities.v1 = OpenLayers.Class(
"dimensions", "dimensions",
"authorityURLs"]; "authorityURLs"];
var key, j; var key;
for (j=0; j<attributes.length; j++) {
key = attributes[j]; for (i=0, len=attributes.length; i<len; i++) {
key = attributes[i];
if (key in parentLayer) { if (key in parentLayer) {
// only take parent value if not present (null or undefined) // only take parent value if not present (null or undefined)
if (layer[key] == null) { if (layer[key] == null) {
@@ -157,15 +160,15 @@ OpenLayers.Format.WMSCapabilities.v1 = OpenLayers.Class(
} }
} }
for (j=0; j<complexAttr.length; j++) { for (i=0, len=complexAttr.length; i<len; i++) {
key = complexAttr[j]; key = complexAttr[i];
layer[key] = OpenLayers.Util.applyDefaults( layer[key] = OpenLayers.Util.applyDefaults(
layer[key], parentLayer[key]); layer[key], parentLayer[key]);
} }
} }
// process sublayers // process sublayers
for (var i=0, len=layer.nestedLayers.length; i<len; i++) { for (i=0, len=layer.nestedLayers.length; i<len; i++) {
var childLayer = layer.nestedLayers[i]; var childLayer = layer.nestedLayers[i];
this.processLayer(capability, childLayer, layer); this.processLayer(capability, childLayer, layer);
} }