(positions, size, startIndex, endIndex, maxLatitude = DEFAULT_MAX_LATITUDE)
| 102528 | return pointIndex; |
| 102529 | } |
| 102530 | function insertPoleVertices(positions, size, startIndex, endIndex, maxLatitude = DEFAULT_MAX_LATITUDE) { |
| 102531 | const firstLng = positions[startIndex]; |
| 102532 | const lastLng = positions[endIndex - size]; |
| 102533 | if (Math.abs(firstLng - lastLng) > 180) { |
| 102534 | const p = (0, _utils.getPointAtIndex)(positions, 0, size, startIndex); |
| 102535 | p[0] += Math.round((lastLng - firstLng) / 360) * 360; |
| 102536 | (0, _utils.push)(positions, p); |
| 102537 | p[1] = Math.sign(p[1]) * maxLatitude; |
| 102538 | (0, _utils.push)(positions, p); |
| 102539 | p[0] = firstLng; |
| 102540 | (0, _utils.push)(positions, p); |
| 102541 | } |
| 102542 | } |
| 102543 | function wrapLongitudesForShortestPath(positions, size, startIndex, endIndex) { |
| 102544 | let prevLng = positions[0]; |
| 102545 | let lng; |
no outgoing calls
no test coverage detected