• JMap.Geometry.checkLine

    Throw an error if the provided parameter is not a valid polygon.

    Parameters

    • line: JLine

      The line object to check

    Returns void

    Example

    let line = [[ 10, 10 ], [ 11, 11 ], [ 12, 12 ]]
    // The following instruction will not throw an error
    JMap.Geometry.checkLine(line)

    line = [] // empty line
    // The following instruction will throw an error
    JMap.Geometry.checkLine(line)