• JMap.Geometry.convertLength

    Converts the distance from a unit to another.

    Parameters

    Returns number

    Throws

    if invalid parameters

    Example

    // returns 2 kilometers in miles
    JMap.Geometry.convertLength(2, "miles")

    // returns 200 meters in yards
    JMap.Geometry.convertLength(200, "yards", "meters")