docs/examples-0.7.x/libs/leaflet-src.js
function (points, sqTolerance) {
		var reducedPoints = [points[0]];

		for (var i = 1, prev = 0, len = points.length; i < len; i++) {
			if (this._sqDist(points[i], points[prev]) > sqTolerance) {
				reducedPoints.push(points[i]);
				prev = i;
			}
		}
		if (prev < len - 1) {
			reducedPoints.push(points[len - 1]);
		}
		return reducedPoints;
	}
function (points, sqTolerance) {
		var reducedPoints = [points[0]];

		for (var i = 1, prev = 0, len = points.length; i < len; i++) {
			if (this._sqDist(points[i], points[prev]) > sqTolerance) {
				reducedPoints.push(points[i]);
				prev = i;
			}
		}
		if (prev < len - 1) {
			reducedPoints.push(points[len - 1]);
		}
		return reducedPoints;
	}
function ( points , sqTolerance ) { var reducedPoints = [ points [ 0 ] ] ; for ( var i = 1 , prev = 0 , len = points . length ; i < len ; i ++ ) { if ( this . _sqDist ( points [ i ] , points [ prev ] ) > sqTolerance ) { reducedPoints . push ( points [ i ] ) ; prev = i ; } } if ( prev < len - 1 ) { reducedPoints . push ( points [ len - 1 ] ) ; } return reducedPoints ; }
reduce points that are too close to each other to a single point
reduce points that are too close to each other to a single point