• JMap.Geometry.getDistance

    Returns the distance in kilometers between 2 points.

    Parameters

    Returns number

    Example

    // returns the distance between the 2 points
    const distance = JMap.Geometry.getDistance([ 10, 20 ], [ 30, 30 ])

    // returns the distance between the 2 points
    const distance = JMap.Geometry.getDistance({ x: 10, y: 20 }, { x: 30, y: 30 })