[OpenLayers-Commits] r12210 -
trunk/openlayers/lib/OpenLayers/Format/WMSCapabilities
commits-20090109 at openlayers.org
commits-20090109 at openlayers.org
Mon Aug 8 00:50:37 EDT 2011
Author: erilem
Date: 2011-08-07 21:50:36 -0700 (Sun, 07 Aug 2011)
New Revision: 12210
Modified:
trunk/openlayers/lib/OpenLayers/Format/WMSCapabilities/v1.js
Log:
coding style in WMSCapabilities/v1.js, no functional change
Modified: trunk/openlayers/lib/OpenLayers/Format/WMSCapabilities/v1.js
===================================================================
--- trunk/openlayers/lib/OpenLayers/Format/WMSCapabilities/v1.js 2011-08-08 04:45:41 UTC (rev 12209)
+++ trunk/openlayers/lib/OpenLayers/Format/WMSCapabilities/v1.js 2011-08-08 04:50:36 UTC (rev 12210)
@@ -113,6 +113,8 @@
layer.formats = capability.request.getmap.formats;
}
+ var i, len;
+
// deal with property inheritance
if(parentLayer) {
// add style
@@ -133,9 +135,10 @@
"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) {
@@ -157,15 +160,15 @@
}
}
- 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);
}
More information about the Commits
mailing list