src/builders/polylines.js
function getNextNonBoundarySegment (line, startIndex, tolerance) {
    var endIndex = startIndex;
    while (line[endIndex + 1] && outsideTile(line[endIndex], line[endIndex + 1], tolerance)) {
        endIndex++;
    }

    // If there is a line segment remaining that is within the tile, push it to the lines array
    return (line.length - endIndex >= 2) ? line.slice(endIndex) : false;
}
function getNextNonBoundarySegment (line, startIndex, tolerance) {
    var endIndex = startIndex;
    while (line[endIndex + 1] && outsideTile(line[endIndex], line[endIndex + 1], tolerance)) {
        endIndex++;
    }

    // If there is a line segment remaining that is within the tile, push it to the lines array
    return (line.length - endIndex >= 2) ? line.slice(endIndex) : false;
}
function getNextNonBoundarySegment ( line , startIndex , tolerance ) { var endIndex = startIndex ; while ( line [ endIndex + 1 ] && outsideTile ( line [ endIndex ] , line [ endIndex + 1 ] , tolerance ) ) { endIndex ++ ; } // If there is a line segment remaining that is within the tile, push it to the lines array return ( line . length - endIndex >= 2 ) ? line . slice ( endIndex ) : false ; }
Iterate through line from startIndex to find a segment not on a tile boundary, if any.
Iterate through line from startIndex to find a segment not on a tile boundary if any .