PHPackages                             reprover/amap - 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. [API Development](/categories/api)
4. /
5. reprover/amap

ActiveLibrary[API Development](/categories/api)

reprover/amap
=============

高德开放平台API封装SDK

1.2.9(4y ago)231.2k↓85.7%4MITPHPPHP &gt;=7.0.0

Since Dec 11Pushed 3y ago1 watchersCompare

[ Source](https://github.com/rxrw/amap)[ Packagist](https://packagist.org/packages/reprover/amap)[ RSS](/packages/reprover-amap/feed)WikiDiscussions master Synced today

READMEChangelogDependencies (1)Versions (18)Used By (0)

高德开放平台API封装SDK
==============

[](#高德开放平台api封装sdk)

> 小版本更新了psr规范
>
> 之前对这方面了解不多，因此写的可能有点问题。
>
> 但是欢迎指出错误而不是带着一股子嘲讽过来喷人好吗。
>
> 用处不多维护精力比较少
>
> 但基本够用
>
> 注：可能有不兼容改动，一些类名大小写可能有问题 请注意

需求
--

[](#需求)

```
php >=7.0.0
guzzlehttp/guzzlehttp:^6.3

```

没有安装guzzlehttp也不要紧，在require的时候回自动安装

安装
--

[](#安装)

```
composer require reprover/amap

```

用法
--

[](#用法)

```
use Reprover\Amap\Amap;

```

(1)

```
$amap = new Amap();
$gateway = $amap->uses("Georegeo")->gateway("geo")->build(["key"=>"你的api key",...其他选项]);
//这里支持setKey("key值");
//这里支持useHttps(true);
$result = $gateway->ask();

```

如果不需要额外的配置，可以用以下方法：

(2)

```
$gateway = Amap::use("georegeo")->gateway("regeo")->build(...);
$result = $gateway->ask();

```

(3) 如果请求的接口大类只有一个子方法（例如坐标转换），则可以省略gateway()方法

```
$gateway = Amap::use("convert")->build(...);
$result = $gateway->ask();

```

### 额外方法

[](#额外方法)

> build方法传什么？

传 `$config` 参数，参数列表为一数组，具体实现为一 `Reprover/Support/Config` 对象，

返回结果为一个 `Reprover\AMap\Support\Result` 对象，类似于 `Laravel` 的 `Collection` ，不过没那么全面。可用的方法：

```
count() :int
```

所得数据结果数量，如果有多种类型结果则只返回主要数据（如天气只返回实时天气数量，天气预报也可以用 `$result->forecast` ）获取。

```
foreach($result as $k=>$v){...}
```

可以用 `foreach` 进行结果的循环

```
isValid() :boolean
```

判断结果是否正确，即根据高德返回数据 `status(errcode)` 是否为 1(0)

部分特殊接口有一些特殊用法，开发ing

说明：
---

[](#说明)

这个sdk是第一版（目前看起来好像不会更新了的样子），还存在很多不足的地方，欢迎大家指正。

接下来的任务：
-------

[](#接下来的任务)

- √ 优化类名和驼峰法命名
- √ 修改验证类规则（现在是一个方法，需要写一个类）
- √ 优化使用方法，注入配置项等
- 数字签名自动完成
- √ http与https的切换

###  Health Score

35

—

LowBetter than 77% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity27

Limited adoption so far

Community13

Small or concentrated contributor base

Maturity67

Established project with proven stability

 Bus Factor1

Top contributor holds 91.7% 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

Every ~82 days

Recently: every ~101 days

Total

17

Last Release

1804d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/416c606be81286c41ecfb36214e9d5fe0cab5bd4bf08ee6873e3a558b73088e6?d=identicon)[sky](/maintainers/sky)

---

Top Contributors

[![rxrw](https://avatars.githubusercontent.com/u/9566402?v=4)](https://github.com/rxrw "rxrw (22 commits)")[![depfu[bot]](https://avatars.githubusercontent.com/in/715?v=4)](https://github.com/depfu[bot] "depfu[bot] (1 commits)")[![SeverusWell](https://avatars.githubusercontent.com/u/13058323?v=4)](https://github.com/SeverusWell "SeverusWell (1 commits)")

---

Tags

amapamapsdkcomposerlaravelphp

### Embed Badge

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

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

###  Alternatives

[tencentcloud/tencentcloud-sdk-php

TencentCloudApi php sdk

3661.2M46](/packages/tencentcloud-tencentcloud-sdk-php)[neuron-core/neuron-ai

The PHP Agentic Framework.

2.0k496.1k33](/packages/neuron-core-neuron-ai)[avalara/avataxclient

Client library for Avalara's AvaTax suite of business tax calculation and processing services. Uses the REST v2 API.

528.3M7](/packages/avalara-avataxclient)[eslazarev/wildberries-sdk

Wildberries OpenAPI clients (generated).

252.5k](/packages/eslazarev-wildberries-sdk)[files.com/files-php-sdk

Files.com PHP SDK

2478.1k](/packages/filescom-files-php-sdk)[aimeos/prisma

A powerful PHP package for integrating media related Large Language Models (LLMs) into your applications

1942.4k4](/packages/aimeos-prisma)

PHPackages © 2026

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