PHPackages                             namesfang/tencent-map - 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. namesfang/tencent-map

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

namesfang/tencent-map
=====================

腾讯位置服务

1.0.0(5y ago)116MITPHPPHP &gt;=7.2

Since Jan 28Pushed 5y ago1 watchersCompare

[ Source](https://github.com/namesfang/tencent-map)[ Packagist](https://packagist.org/packages/namesfang/tencent-map)[ Docs](https://github.com/namesfang/tencent-map)[ RSS](/packages/namesfang-tencent-map/feed)WikiDiscussions master Synced 5d ago

READMEChangelogDependenciesVersions (2)Used By (0)

### 腾讯位置服务

[](#腾讯位置服务)

##### 坐标转换 示例

[](#坐标转换-示例)

```
use Namesfang\Tencent\Map\Log\Logger;
use Namesfang\Tencent\Map\Bundle\CoordOption;
use Namesfang\Tencent\Map\Bundle\Coord;

// +-----------------------------------------------------------
// | 日志记录
// | 自行封装需要实现 LoggerInterface 接口类
// +-----------------------------------------------------------
 $logger = new Logger(LOG_PATH, true);

// 实例化传入参数
$option = new CoordOption();
$option->setKey('key');
$option->setSecret('secret');
$option->setLocation('39.12', '116.83');
$option->setLocation('30.21', '115.43');
// 或者使用
//$option->setLocations('39.12,116.83;30.21,115.43');
$option->setType($option::TYPE_BAIDU);

$location = new Coord($option, $logger);

$ret = $location->request(true);

//$logger->print($ret->original, true);

$logger->print($ret->result);

//$logger->print($ret->status);

```

##### （逆）地址解析 示例

[](#逆地址解析-示例)

```
use Namesfang\Tencent\Map\Bundle\GeocoderOption;
use Namesfang\Tencent\Map\Log\Logger;
use Namesfang\Tencent\Map\Bundle\Geocoder;
// +-----------------------------------------------------------
// | 日志记录
// | 自行封装需要实现 LoggerInterface 接口类
// +-----------------------------------------------------------
$logger = new Logger(LOG_PATH, true);

// 实例化传入参数
$option = new GeocoderOption();
$option->setKey('key');
$option->setSecret('secret');
$option->setAddress("安徽省合肥市瑶海区");

$geo = new Geocoder($option, $logger);

$ret = $geo->request(true);

//$logger->print($ret->original, true);

$logger->print($ret->result);

$logger->print($ret->status);

```

##### IP定位

[](#ip定位)

```
use Namesfang\Tencent\Map\Log\Logger;
use Namesfang\Tencent\Map\Bundle\LocationOption;
use Namesfang\Tencent\Map\Bundle\Location;
// +-----------------------------------------------------------
// | 日志记录
// | 自行封装需要实现 LoggerInterface 接口类
// +-----------------------------------------------------------
$logger = new Logger(LOG_PATH, true);

// 实例化传入参数
$option = new LocationOption();
$option->setKey('key');
$option->setSecret('secret');
// 如不传默认为当前请求地址
//$option->setIp('139.73.33.33');

$location = new Location($option, $logger);

$ret = $location->request(true);

//$logger->print($ret->original, true);

$logger->print($ret->result);

//$logger->print($ret->status);

```

###  Health Score

23

—

LowBetter than 27% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity7

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity48

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

1934d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/5258216?v=4)[堪笑](/maintainers/namesfang)[@namesfang](https://github.com/namesfang)

---

Top Contributors

[![namesfang](https://avatars.githubusercontent.com/u/5258216?v=4)](https://github.com/namesfang "namesfang (1 commits)")

---

Tags

LBS

### Embed Badge

![Health badge](/badges/namesfang-tencent-map/health.svg)

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

###  Alternatives

[shlinkio/shlink

A self-hosted and PHP-based URL shortener application with CLI and REST interfaces

4.8k4.3k](/packages/shlinkio-shlink)[illuminate/workbench

The Illuminate Workbench package.

3329.7k2](/packages/illuminate-workbench)[fibtegis/filament-infinite-scroll

Seamless infinite scrolling plugin that replaces pagination in Filament Tables.

203.3k](/packages/fibtegis-filament-infinite-scroll)

PHPackages © 2026

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