PHPackages                             jyun/mapsapi - 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. jyun/mapsapi

ActiveLibrary[API Development](/categories/api)

jyun/mapsapi
============

This is geographically related third-party api integration

1.0.18(2y ago)15191MITPHP

Since May 10Pushed 2y ago1 watchersCompare

[ Source](https://github.com/jyun790430/mapsapi)[ Packagist](https://packagist.org/packages/jyun/mapsapi)[ RSS](/packages/jyun-mapsapi/feed)WikiDiscussions master Synced today

READMEChangelogDependencies (2)Versions (20)Used By (1)

安裝套包
----

[](#安裝套包)

在專案中執行下方指令:

```
composer require jyun/mapsapi

```

安裝好後即可在專案內使用 :

```
use Jyun\Mapsapi\TwddMap\Geocoding;
```

---

設定檔案
----

[](#設定檔案)

在專案中有使遇到 Mysql, Mongo, Map8, GoogleMap, 都須個別配置 .env 請參照:

`目前 Mongo 因為資料太多錯誤決定停止使用`

```
Mysql, Mongo        # 自行配置
MAP8_API_KEY=""     # 圖霸 KEY
GOOGLE_API_KEY=""   # Google API KEY
```

### Directions API

[](#directions-api)

```
use Jyun\Mapsapi\TwddMap\Directions;

/**
 * Directions
 *
 * @param $origin
 * @param $destination
 * @param $mode ['driving', 'walking', 'bicycling'], default='driving'
 * @return array|mixed
*/
$directions = Directions::directions('25.0097038,121.4401783', '25.0108898,121.4346963');
```

### Geocoding API

[](#geocoding-api)

Source 順序:

- geocode: Map8 -&gt; GoogleMap (timeout = 2s)
- reverseGeocode: Mongo -&gt; Map8 -&gt; GoogleMap (timeout = 2s)

注意事項:

- Map8 超過台灣地區會回傳空值, 但設計上會繼續往 GoogleMap 查詢
- Source 查詢時可能回傳空值, 所以 zip, city\_id, district\_id 有可能為 null

```
use Jyun\Mapsapi\TwddMap\Geocoding;

$geocode = Geocoding::geocode('台北市內湖區瑞光路335號');

$reverseGeocode = Geocoding::reverseGeocode('25.0396476673,121.505226616');
```

### API 統一回傳格式:

[](#api-統一回傳格式)

參數型別說明sourcestring來源: Mongo, Map8, GoogleMapcodeint按照 Http status: 200 為正常msgstring回傳說明dataarray若無資料則不回傳 Datatracearray若無追中錯誤則不回傳 trace

###  Health Score

29

—

LowBetter than 57% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity14

Limited adoption so far

Community11

Small or concentrated contributor base

Maturity61

Established project with proven stability

 Bus Factor1

Top contributor holds 84.2% 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 ~61 days

Recently: every ~225 days

Total

19

Last Release

774d ago

### Community

Maintainers

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

---

Top Contributors

[![jyun790430](https://avatars.githubusercontent.com/u/12692000?v=4)](https://github.com/jyun790430 "jyun790430 (16 commits)")[![tedyan1928](https://avatars.githubusercontent.com/u/52906724?v=4)](https://github.com/tedyan1928 "tedyan1928 (3 commits)")

### Embed Badge

![Health badge](/badges/jyun-mapsapi/health.svg)

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

###  Alternatives

[statamic/cms

The Statamic CMS Core Package

4.8k3.6M982](/packages/statamic-cms)[tencentcloud/tencentcloud-sdk-php

TencentCloudApi php sdk

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

The PHP Agentic Framework.

2.0k656.1k38](/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.5M7](/packages/avalara-avataxclient)[files.com/files-php-sdk

Files.com PHP SDK

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

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

1943.1k5](/packages/aimeos-prisma)

PHPackages © 2026

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