Skip to content

DiliBau/geo-distance

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 

Repository files navigation

Geo distance

Helpers for getting the distance between 2 2d points

Usage

require '/your/path/to/geo-distance.php';
$d1 = distance( array( 'lng' => '44.21', 'lat' => '23.48' ), array( 'lng' => '47.10',  'lat' => '27.40' ), EARTH_RADIUS_MILES,      'slc' );
$d2 = distance( array( 'lng' => '44.21', 'lat' => '23.48' ), array( 'lng' => '47.10',  'lat' => '27.40' ), EARTH_RADIUS_KILOMETERS, 'haversine' );
// use in any way you see it fit

Enjoy :D

About

helpers for getting the distance between 2 2d points

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages