◷ Reading Time: 1 minute
FlexRule.Extensions.Geo
This extension enables Geo operations.
geoDistance
Calculates the distance between two locations based on latitude and longitude.
geoDistance (loc1, loc2, unit)
- loc1, loc2: objects to represent a location based on latitude and longitude.
{latitude: value, longitude: value}
- latitude: value in double
- longitude: value in double
- unit: allows defining the result’s unit. The default value is kilometers.
- k: Kilometers
- m: Miles
- n: Nautical Miles