Skip to content

Commit

Permalink
coding style in WMSCapabilities/v1.js, no functional change
Browse files Browse the repository at this point in the history
git-svn-id: http://svn.openlayers.org/trunk/openlayers@12210 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
  • Loading branch information
Éric Lemoine committed Aug 8, 2011
1 parent 61b291e commit d79aa2e
Showing 1 changed file with 9 additions and 6 deletions.
15 changes: 9 additions & 6 deletions lib/OpenLayers/Format/WMSCapabilities/v1.js
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,8 @@ OpenLayers.Format.WMSCapabilities.v1 = OpenLayers.Class(
layer.formats = capability.request.getmap.formats;
}

var i, len;

// deal with property inheritance
if(parentLayer) {
// add style
Expand All @@ -133,9 +135,10 @@ OpenLayers.Format.WMSCapabilities.v1 = OpenLayers.Class(
"dimensions",
"authorityURLs"];

var key, j;
for (j=0; j<attributes.length; j++) {
key = attributes[j];
var key;

for (i=0, len=attributes.length; i<len; i++) {
key = attributes[i];
if (key in parentLayer) {
// only take parent value if not present (null or undefined)
if (layer[key] == null) {
Expand All @@ -157,15 +160,15 @@ OpenLayers.Format.WMSCapabilities.v1 = OpenLayers.Class(
}
}

for (j=0; j<complexAttr.length; j++) {
key = complexAttr[j];
for (i=0, len=complexAttr.length; i<len; i++) {
key = complexAttr[i];
layer[key] = OpenLayers.Util.applyDefaults(
layer[key], parentLayer[key]);
}
}

// 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];
this.processLayer(capability, childLayer, layer);
}
Expand Down

0 comments on commit d79aa2e

Please sign in to comment.