PHPackages                             ialex97/google-distance-matrix - 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. ialex97/google-distance-matrix

ActiveLibrary[API Development](/categories/api)

ialex97/google-distance-matrix
==============================

Google distance matrix API - Estimate travel time and distance for multiple origins and destinations.

v0.0.10(8y ago)01.5k↑133.3%3[1 PRs](https://github.com/iAlex97/google-distance-matrix/pulls)BSD-3-ClausePHPPHP &gt;=7.0

Since Dec 2Pushed 6y ago1 watchersCompare

[ Source](https://github.com/iAlex97/google-distance-matrix)[ Packagist](https://packagist.org/packages/ialex97/google-distance-matrix)[ RSS](/packages/ialex97-google-distance-matrix/feed)WikiDiscussions master Synced 1mo ago

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

Google Distance Matrix API
==========================

[](#google-distance-matrix-api)

Estimate travel time and distance for multiple destinations.

Requirements
============

[](#requirements)

Requires PHP 7.0 or higher.

Installation
============

[](#installation)

The best way to install ialex97/google-distance-matrix is using [Composer](http://getcomposer.org/):

```
$ composer require ialex97/google-distance-matrix
```

Getting Started
===============

[](#getting-started)

First of all autoload and then include its namespace:

```
require __DIR__ . '/vendor/autoload.php';
use IonescuAlex\GoogleDistanceMatrix\GoogleDistanceMatrix;
```

```
$distanceMatrix = new GoogleDistanceMatrix('YOUR API KEY');
$distance = $distanceMatrix->setLanguage('en-US')
    ->addOrigin('49.950096, 14.668544')
    ->addOrigin('49.950096, 15.668544')
    ->addDestination('50.031817, 14.490880')
    ->addDestination('51.031817, 14.490880')
    ->sendRequest();
```

```
$distanceMatrix = new GoogleDistanceMatrix('YOUR API KEY');
$distance = $distanceMatrix
    ->setOrigin('K Habrovci 447, 251 63 Strančice, Česká republika')
    ->setDestination('Roztylská 2321/19, Chodov, 148 00 Praha-Praha 11, Česká republika')
    ->setMode(GoogleDistanceMatrix::MODE_WALKING)
    ->setLanguage('en-US')
    ->setUnits(GoogleDistanceMatrix::UNITS_IMPERIAL)
    ->setAvoid(GoogleDistanceMatrix::AVOID_HIGHWAYS)
    ->sendRequest();
```

For more info, please visit

###  Health Score

29

—

LowBetter than 60% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity21

Limited adoption so far

Community12

Small or concentrated contributor base

Maturity54

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 58.8% 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 ~39 days

Recently: every ~32 days

Total

10

Last Release

3095d ago

PHP version history (2 changes)v0.0.1PHP &gt;=5.5.0

v0.0.6PHP &gt;=7.0

### Community

Maintainers

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

---

Top Contributors

[![cirovargas](https://avatars.githubusercontent.com/u/1972562?v=4)](https://github.com/cirovargas "cirovargas (10 commits)")[![iAlex97](https://avatars.githubusercontent.com/u/12383594?v=4)](https://github.com/iAlex97 "iAlex97 (5 commits)")[![miroslav-valerian](https://avatars.githubusercontent.com/u/10794336?v=4)](https://github.com/miroslav-valerian "miroslav-valerian (2 commits)")

---

Tags

google apigoogle mapsgoogle distance matrixdistance matrix

### Embed Badge

![Health badge](/badges/ialex97-google-distance-matrix/health.svg)

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

###  Alternatives

[skagarwal/google-places-api

Google Places Api

1913.0M8](/packages/skagarwal-google-places-api)[tencentcloud/tencentcloud-sdk-php

TencentCloudApi php sdk

3731.2M42](/packages/tencentcloud-tencentcloud-sdk-php)[yidas/google-maps-services

PHP client library(SDK) for Google Maps API Web Services

721.3M](/packages/yidas-google-maps-services)[x-fran/g-trends

Google Trends API for PHP

11955.6k](/packages/x-fran-g-trends)[happyr/google-api-bundle

A Symfony2 Wrapper for the Google APIs Client Library for PHP

48196.1k](/packages/happyr-google-api-bundle)[outscraper/outscraper

PHP bindings for the Outscraper API

1822.2k](/packages/outscraper-outscraper)

PHPackages © 2026

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