Skip to content

helpers for getting the distance between 2 2d points

Notifications You must be signed in to change notification settings

trisoftro/geo-distance

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 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

  • PHP 100.0%