APP_Geocoder::distance( float $lat_1, float $lng_1, float $lat_2, float $lng_2, string $unit )
Calculates distance between to points.
Package
Description Description
Parameters Parameters
- $lat_1
(float) (Required) Latitude of the first point.
- $lng_1
(float) (Required) Longitude of the first point.
- $lat_2
(float) (Required) Latitude of the second point.
- $lng_2
(float) (Required) Longitude of the second point.
- $unit
(string) (Required) Distance unit (mi or km).
Return Return
(int)