Use ii instead of len for array length cache for consistency
This commit is contained in:
@@ -270,7 +270,7 @@ ol.parser.KML = function(opt_options) {
|
|||||||
var reg = this.regExes;
|
var reg = this.regExes;
|
||||||
var coords = coordstr.replace(reg.trimSpace, '').split(reg.splitSpace);
|
var coords = coordstr.replace(reg.trimSpace, '').split(reg.splitSpace);
|
||||||
var coordArray = [];
|
var coordArray = [];
|
||||||
for (var i = 0, len = coords.length; i < len; i++) {
|
for (var i = 0, ii = coords.length; i < ii; i++) {
|
||||||
var array = coords[i].replace(reg.removeSpace, '').split(',');
|
var array = coords[i].replace(reg.removeSpace, '').split(',');
|
||||||
var pair = [];
|
var pair = [];
|
||||||
var jj = Math.min(array.length, this.dimension);
|
var jj = Math.min(array.length, this.dimension);
|
||||||
|
|||||||
@@ -16,7 +16,7 @@ ol.parser.ogc.WMSCapabilities_v1_1_0 = function() {
|
|||||||
'SRS': function(node, obj) {
|
'SRS': function(node, obj) {
|
||||||
var srs = this.getChildValue(node);
|
var srs = this.getChildValue(node);
|
||||||
var values = srs.split(/ +/);
|
var values = srs.split(/ +/);
|
||||||
for (var i = 0, len = values.length; i < len; i++) {
|
for (var i = 0, ii = values.length; i < ii; i++) {
|
||||||
obj['srs'][values[i]] = true;
|
obj['srs'][values[i]] = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -24,7 +24,7 @@ ol.parser.ogc.WMSCapabilities_v1_1_1_WMSC = function() {
|
|||||||
},
|
},
|
||||||
'Resolutions': function(node, tileset) {
|
'Resolutions': function(node, tileset) {
|
||||||
var res = this.getChildValue(node).split(' ');
|
var res = this.getChildValue(node).split(' ');
|
||||||
for (var i = 0, len = res.length; i < len; i++) {
|
for (var i = 0, ii = res.length; i < ii; i++) {
|
||||||
if (res[i] !== '') {
|
if (res[i] !== '') {
|
||||||
tileset['resolutions'].push(parseFloat(res[i]));
|
tileset['resolutions'].push(parseFloat(res[i]));
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user