naveed125/geo-distance
Composer 安装命令:
composer require naveed125/geo-distance
包简介
Find distance between two points on earth. Find closest metro area.
关键字:
README 文档
README
Calculate distance between two points on earth using longitude and longitude. Can be used to find out the closest metro area based on distance.
Example:
// 1 Market St. San Francisco, California, USA
$start = array (
'lat' => 37.793629,
'long' => -122.394264
);
// Pier 39, San Francisco, California, USA
$end = array (
'lat' => 37.808868,
'long' => -122.409842
);
$gd = new GeoDistance\GeoDistance();
$distance = $gd->distance($start,$end);
echo "Distance between the two points is: {$distance} miles\n";
The above should output the following:
Distance between the two points is: 1.3532202220106
统计信息
- 总下载量: 23
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 1
- 点击次数: 0
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2017-06-05