定制 rafaelfragoso/haversini-formula 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

rafaelfragoso/haversini-formula

最新稳定版本:2.0.0

Composer 安装命令:

composer require rafaelfragoso/haversini-formula

包简介

This PHP class can replace the Google Distance Matrix to calculate the distance between two points using latitude and longitude. It will prevent you to do massive requests to Google servers and enhance your service performance.

README 文档

README

Calculates de distance between two geocode points ????????

How to use it:

Install the library via Composer or clone the repo:

composer install rafaelfragoso/haversini-formula

After the installation is complete, you can load the class and start using it.

<?php use Haversini\Haversini; /*  * Calculate distance from Rio de Janeiro to São Paulo  * Rio: -22.906847, -43.172896  * São Paulo: -23.550520, -46.633309  */ Haversini::calculate( -22.906847, -43.172896, -23.550520, -46.633309, 'mi' // Output length unit );

Running tests

make test or make test-coverage

XDebug is required for test coverage!

Authors

See also the list of contributors who participated in this project.

License

This project is licensed under the MIT License - see the LICENSE.md file for details

统计信息

  • 总下载量: 207.25k
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 46
  • 点击次数: 5
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 45
  • Watchers: 5
  • Forks: 17
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2026-01-04

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固