PHPackages                             chujc/amap-district - 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. chujc/amap-district

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

chujc/amap-district
===================

高德地图 中国行政区 导入工具与SDK

1.0(7y ago)1321MITPLpgSQL

Since May 4Pushed 7y agoCompare

[ Source](https://github.com/chujc/amap-district)[ Packagist](https://packagist.org/packages/chujc/amap-district)[ RSS](/packages/chujc-amap-district/feed)WikiDiscussions master Synced 4d ago

READMEChangelogDependenciesVersions (2)Used By (0)

 amap-district
===============

[](#-amap-district-)

 高德地区中国标准行政区划数据导入数据库工具 与 行政地区SDK

安装
--

[](#安装)

```
composer require chujc/amap-district
```

- 创建迁移文件

```
php artisan district:table
```

- 创建数据表 > 注意已有数据表

```
php artisan migrate
```

- 创建配置文件

```
php artisan vendor:publish --provider="ChuJC\AMapDistrict\DistrictServiceProvider" --tag="config"
```

- 配置高德web接口key > config 文件夹下面的 district.php 中的 **key**

导入数据进数据库
--------

[](#导入数据进数据库)

```
php artisan district
```

用法
--

[](#用法)

```
use ChuJC\AMapDistrict\District;

$disrtict = new District();
//参数与返回接口 参考高德地图行政区域接口
$response = $disrtict->getDistrict(['keywords' => '重庆']);
```

配置
--

[](#配置)

- 默认开始缓存了
- 模型可以替换

高德接口
----

[](#高德接口)

- [高德地图行政区域接口查询](https://lbs.amap.com/api/webservice/guide/api/district)

SQL
---

[](#sql)

也可以直接使用**district.sql** 文件导入

License
-------

[](#license)

MIT

###  Health Score

27

—

LowBetter than 49% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity10

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity59

Maturing project, gaining track record

 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.

###  Release Activity

Cadence

Unknown

Total

1

Last Release

2569d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/dae4d7628f1356aebad9a5e51f15c4d7f21378ce05af00117ea8c56c1c896fea?d=identicon)[chujc](/maintainers/chujc)

---

Top Contributors

[![chujc](https://avatars.githubusercontent.com/u/22972932?v=4)](https://github.com/chujc "chujc (2 commits)")

---

Tags

amapchinesecomposerdistrictlaravellaravelChinadistrictamap

### Embed Badge

![Health badge](/badges/chujc-amap-district/health.svg)

```
[![Health](https://phpackages.com/badges/chujc-amap-district/health.svg)](https://phpackages.com/packages/chujc-amap-district)
```

###  Alternatives

[stephenjude/filament-blog

Filament Blog Builder

20317.8k](/packages/stephenjude-filament-blog)[datomatic/nova-detached-actions

A Laravel Nova tool to allow for placing actions in the Nova toolbar detached from the checkbox selection mechanism.

11229.2k](/packages/datomatic-nova-detached-actions)

PHPackages © 2026

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