src/util/PolygonSplitter.js
function (contours, resultContours) {
                var doesCross = false;

                for (var i = 0, len = contours.length; i < len; i++) {
                    var contourInfo = this.splitContour(contours[i]);
                    if (contourInfo.polygons.length > 1) {
                        doesCross = true;
                    }
                    resultContours.push(contourInfo);
                }

                return doesCross;
            }
function (contours, resultContours) {
                var doesCross = false;

                for (var i = 0, len = contours.length; i < len; i++) {
                    var contourInfo = this.splitContour(contours[i]);
                    if (contourInfo.polygons.length > 1) {
                        doesCross = true;
                    }
                    resultContours.push(contourInfo);
                }

                return doesCross;
            }
function ( contours , resultContours ) { var doesCross = false ; for ( var i = 0 , len = contours . length ; i < len ; i ++ ) { var contourInfo = this . splitContour ( contours [ i ] ) ; if ( contourInfo . polygons . length > 1 ) { doesCross = true ; } resultContours . push ( contourInfo ) ; } return doesCross ; }
Splits an array of polygons that cross the anti-meridian or contain a pole.

@param {Array} contours an array of arrays of Locations or Positions
Each array entry defines one of this polygon's boundaries.
@param {Array} resultContours an empty array to put the result of the split. Each element will have the
shape of PolygonSplitter.formatContourOutput
@returns {Boolean} true if one of the boundaries crosses the anti-meridian otherwise false
Splits an array of polygons that cross the anti - meridian or contain a pole .