added missing semicolons; while at it also introduced some array length caching and simplified var assignments. Non-functional change. Thanks rot for spotting this. (closes #2019)
git-svn-id: http://svn.openlayers.org/trunk/openlayers@9147 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
This commit is contained in:
@@ -52,7 +52,7 @@ OpenLayers.Format.WFSDescribeFeatureType = OpenLayers.Class(
|
|||||||
|
|
||||||
var attributes = node.attributes;
|
var attributes = node.attributes;
|
||||||
var attr, name;
|
var attr, name;
|
||||||
for(var i=0; i<attributes.length; ++i) {
|
for(var i=0, len=attributes.length; i<len; ++i) {
|
||||||
attr = attributes[i];
|
attr = attributes[i];
|
||||||
name = attr.name;
|
name = attr.name;
|
||||||
if(name.indexOf("xmlns") == 0) {
|
if(name.indexOf("xmlns") == 0) {
|
||||||
@@ -66,7 +66,7 @@ OpenLayers.Format.WFSDescribeFeatureType = OpenLayers.Class(
|
|||||||
|
|
||||||
// map complexTypes to names of customTypes
|
// map complexTypes to names of customTypes
|
||||||
var complexType, customType;
|
var complexType, customType;
|
||||||
for(var i=0; i<complexTypes.length; ++i) {
|
for(var i=0, len=complexTypes.length; i<len; ++i) {
|
||||||
complexType = complexTypes[i];
|
complexType = complexTypes[i];
|
||||||
customType = customTypes[complexType.typeName];
|
customType = customTypes[complexType.typeName];
|
||||||
if(customTypes[complexType.typeName]) {
|
if(customTypes[complexType.typeName]) {
|
||||||
@@ -80,7 +80,7 @@ OpenLayers.Format.WFSDescribeFeatureType = OpenLayers.Class(
|
|||||||
// the schema reader with the metadata found in the
|
// the schema reader with the metadata found in the
|
||||||
// customTypes hash
|
// customTypes hash
|
||||||
"typeName": node.getAttribute("name")
|
"typeName": node.getAttribute("name")
|
||||||
}
|
};
|
||||||
this.readChildNodes(node, complexType);
|
this.readChildNodes(node, complexType);
|
||||||
obj.complexTypes.push(complexType);
|
obj.complexTypes.push(complexType);
|
||||||
},
|
},
|
||||||
@@ -102,7 +102,7 @@ OpenLayers.Format.WFSDescribeFeatureType = OpenLayers.Class(
|
|||||||
var element = {};
|
var element = {};
|
||||||
var attributes = node.attributes;
|
var attributes = node.attributes;
|
||||||
var attr;
|
var attr;
|
||||||
for(var i=0; i<attributes.length; ++i) {
|
for(var i=0, len=attributes.length; i<len; ++i) {
|
||||||
attr = attributes[i];
|
attr = attributes[i];
|
||||||
element[attr.name] = attr.value;
|
element[attr.name] = attr.value;
|
||||||
}
|
}
|
||||||
@@ -110,7 +110,7 @@ OpenLayers.Format.WFSDescribeFeatureType = OpenLayers.Class(
|
|||||||
var type = element.type;
|
var type = element.type;
|
||||||
if(!type) {
|
if(!type) {
|
||||||
type = {};
|
type = {};
|
||||||
this.readChildNodes(node, type)
|
this.readChildNodes(node, type);
|
||||||
element.restriction = type;
|
element.restriction = type;
|
||||||
element.type = type.base;
|
element.type = type.base;
|
||||||
}
|
}
|
||||||
@@ -149,7 +149,7 @@ OpenLayers.Format.WFSDescribeFeatureType = OpenLayers.Class(
|
|||||||
readRestriction: function(node, obj) {
|
readRestriction: function(node, obj) {
|
||||||
var children = node.childNodes;
|
var children = node.childNodes;
|
||||||
var child, nodeName, value;
|
var child, nodeName, value;
|
||||||
for(var i=0; i<children.length; ++i) {
|
for(var i=0, len=children.length; i<len; ++i) {
|
||||||
child = children[i];
|
child = children[i];
|
||||||
if(child.nodeType == 1) {
|
if(child.nodeType == 1) {
|
||||||
nodeName = child.nodeName.split(":").pop();
|
nodeName = child.nodeName.split(":").pop();
|
||||||
|
|||||||
@@ -95,12 +95,10 @@ OpenLayers.Format.WMSGetFeatureInfo = OpenLayers.Class(OpenLayers.Format.XML, {
|
|||||||
*/
|
*/
|
||||||
read_msGMLOutput: function(data) {
|
read_msGMLOutput: function(data) {
|
||||||
var response = [];
|
var response = [];
|
||||||
var layerNodes, n;
|
var layerNodes = this.getSiblingNodesByTagCriteria(data,
|
||||||
layerNodes = this.getSiblingNodesByTagCriteria(data,
|
|
||||||
this.layerIdentifier);
|
this.layerIdentifier);
|
||||||
if (layerNodes) {
|
if (layerNodes) {
|
||||||
n = layerNodes.length;
|
for (var i=0, len=layerNodes.length; i<len; ++i) {
|
||||||
for (var i = 0; i < n; i++) {
|
|
||||||
var node = layerNodes[i];
|
var node = layerNodes[i];
|
||||||
var layerName = node.nodeName;
|
var layerName = node.nodeName;
|
||||||
if (node.prefix) {
|
if (node.prefix) {
|
||||||
|
|||||||
Reference in New Issue
Block a user