feat: Add sphere.js getDistance
This commit is contained in:
@@ -6,3 +6,14 @@ module Sphere =
|
||||
|
||||
[<Import("getLength", "ol/sphere")>]
|
||||
let getLength geometry = jsNative
|
||||
|
||||
/// <summary>
|
||||
/// Get the great circle distance (in meters) between two geographic coordinates.
|
||||
/// @param {Array} c1 Starting coordinate.
|
||||
/// @param {Array} c2 Ending coordinate.
|
||||
/// @param {number} [radius] The sphere radius to use. Defaults to the Earth's mean radius using the WGS84 ellipsoid.
|
||||
/// @return {number} The great circle distance between the points (in meters).
|
||||
/// @api
|
||||
/// </summary>
|
||||
[<Import("getDistance", "ol/sphere")>]
|
||||
let getDistance (c1: Coordinate) (c2: Coordinate) (radius: float option) : float = jsNative
|
||||
Reference in New Issue
Block a user