PHPackages                             yrizos/distance - 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. yrizos/distance

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

yrizos/distance
===============

0.2.0(11y ago)1436MITPHPPHP &gt;=5.4.0

Since Jul 4Pushed 11y ago2 watchersCompare

[ Source](https://github.com/yrizos/distance)[ Packagist](https://packagist.org/packages/yrizos/distance)[ RSS](/packages/yrizos-distance/feed)WikiDiscussions master Synced 3w ago

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

distance
========

[](#distance)

PHP Wrapper around [Google's DistanceMatrix](https://developers.google.com/maps/documentation/distancematrix/).

instalation
-----------

[](#instalation)

Through composer

```
"require": {
    "yrizos/distance": "*"
}
```

usage
-----

[](#usage)

Instantiate Api Class with your [API Key](https://console.developers.google.com/project):

```
$api = new \DistanceMatrix\Api('apikey');
```

---

Add a destination (Required) :

```
$api->addDestination('Αγιου Γεωργίου 5, Θέρμη, Θεσσαλονίκη');
```

---

Add an origin (Required):

```
$api->addOrigin('Αριστοτέλους 35, Εύοσμος, Θεσσαλονίκη');
```

---

Set the Units :

- metric (default)
- imperial

```
$api->setUnits('imperial');
```

---

Set the Output :

- json (default)
- xml

```
$api->setOutput('xml');
```

---

Set the Mode :

- bicycling
- walking
- driving (default)

```
$api->setMode('walking');
```

---

Set the Language :

- en (default)

```
$api->setLanguage('el');
```

---

Finally, run this thing :

```
$results = $api->run();
```

license
-------

[](#license)

[MIT](LICENSE)

###  Health Score

25

—

LowBetter than 35% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity14

Limited adoption so far

Community10

Small or concentrated contributor base

Maturity49

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 83.3% 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 ~87 days

Total

2

Last Release

4296d ago

### Community

Maintainers

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

---

Top Contributors

[![kbariotis](https://avatars.githubusercontent.com/u/605742?v=4)](https://github.com/kbariotis "kbariotis (5 commits)")[![yrizos](https://avatars.githubusercontent.com/u/282929?v=4)](https://github.com/yrizos "yrizos (1 commits)")

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/yrizos-distance/health.svg)

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

PHPackages © 2026

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