Distance Calculator
interface DistanceCalculator
Content copied to clipboard
Distance calculator for WGS84 (Earth as spheroid). Should be initialized by latitude and used in some not far around area.
Fast and precise for nearby points (distance <= 200 km). Expected error is 0.04%.
In other cases (distance 200 km), uses DistanceCalculator.distanceOnSphere function.
To obtain DistanceCalculator instance, please, use MapboxSearchSdk.serviceProvider.
Return
Distance in meters.