PHPackages                             houzhonghua/map\_range - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. houzhonghua/map\_range

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

houzhonghua/map\_range
======================

根据经纬度获取范围和计算相隔距离

3258PHP

Since Oct 27Pushed 4y ago1 watchersCompare

[ Source](https://github.com/h5520/map_range)[ Packagist](https://packagist.org/packages/houzhonghua/map_range)[ RSS](/packages/houzhonghua-map-range/feed)WikiDiscussions main Synced 3w ago

READMEChangelogDependenciesVersions (1)Used By (0)

使用方式
====

[](#使用方式)

```
composer require houzhonghua/map_range dev-main
```

引入
--

[](#引入)

```
use houzhonghua\map_range\Map;
```

调用生成范围方法
--------

[](#调用生成范围方法)

```
$query = new Map($lat,$lng);
$res = $query->GetRange(200); // 200 公里

// 查询条件
$where[] = ['lat','between',"{$result['minLat']},{$result['maxLat']}"];
$where[] = ['lng','between',"{$result['minLng']},{$result['maxLng']}"];
$storelist = Brandlist::where($where)
    ->field('id,title,mobile,province,city,county,address,lat,lng,pic')
    ->select()
    ->toArray();
print_r($storelist);
```

调用计算距离方法
--------

[](#调用计算距离方法)

```
$query = new Map($lat,$lng);
$res = $query->distanceBetween($fP2Lat,$fP2Lng); // 固定地点的纬度 经度
```

###  Health Score

20

—

LowBetter than 13% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity20

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity28

Early-stage or recently created project

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/57217010?v=4)[h5520](/maintainers/h5520)[@h5520](https://github.com/h5520)

---

Top Contributors

[![h5520](https://avatars.githubusercontent.com/u/57217010?v=4)](https://github.com/h5520 "h5520 (10 commits)")

### Embed Badge

![Health badge](/badges/houzhonghua-map-range/health.svg)

```
[![Health](https://phpackages.com/badges/houzhonghua-map-range/health.svg)](https://phpackages.com/packages/houzhonghua-map-range)
```

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
