Caching array length instead of accessing it with each iteration. r=crschmidt (closes #1636)
git-svn-id: http://svn.openlayers.org/trunk/openlayers@7627 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
This commit is contained in:
@@ -58,7 +58,7 @@ OpenLayers.Layer.PointTrack = OpenLayers.Class(OpenLayers.Layer.Vector, {
|
||||
var lines = new Array(pointFeatures.length-1);
|
||||
|
||||
var pointFeature, startPoint, endPoint;
|
||||
for(var i = 0; i < pointFeatures.length; i++) {
|
||||
for(var i=0, len=pointFeatures.length; i<len; i++) {
|
||||
pointFeature = pointFeatures[i];
|
||||
endPoint = pointFeature.geometry;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user