PHPackages                             gabrielbull/google-maps-geocoder - 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. gabrielbull/google-maps-geocoder

ActiveLibrary[API Development](/categories/api)

gabrielbull/google-maps-geocoder
================================

A PHP wrapper for the Google Maps Geocoding API v3.

v2.1.0(12y ago)1601MITPHPPHP &gt;=5.2.0

Since Sep 17Pushed 12y ago1 watchersCompare

[ Source](https://github.com/gabrielbull/GoogleMapsGeocoder)[ Packagist](https://packagist.org/packages/gabrielbull/google-maps-geocoder)[ Docs](https://github.com/jstayton/GoogleMapsGeocoder)[ RSS](/packages/gabrielbull-google-maps-geocoder/feed)WikiDiscussions tmp Synced 6d ago

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

GoogleMapsGeocoder
==================

[](#googlemapsgeocoder)

[![Build Status](https://camo.githubusercontent.com/44ff282d30701238fcce0a1d9289a5ffb8b9fe8a6db977d98b00e2bc88244ad2/68747470733a2f2f7472617669732d63692e6f72672f6a73746179746f6e2f476f6f676c654d61707347656f636f6465722e737667)](https://travis-ci.org/jstayton/GoogleMapsGeocoder)[![Latest Stable Version](https://camo.githubusercontent.com/c3e9ff89a5b587360f73cde6ab338d584075db7e74a0e68b173daf151ace5340/68747470733a2f2f706f7365722e707567782e6f72672f6a73746179746f6e2f676f6f676c652d6d6170732d67656f636f6465722f762f737461626c652e706e67)](https://packagist.org/packages/jstayton/google-maps-geocoder)[![Total Downloads](https://camo.githubusercontent.com/4f2d6118c9e91107e6526aac7c2b1a54a2fb5cc2200a51bbe15a72535682d607/68747470733a2f2f706f7365722e707567782e6f72672f6a73746179746f6e2f676f6f676c652d6d6170732d67656f636f6465722f646f776e6c6f6164732e706e67)](https://packagist.org/packages/jstayton/google-maps-geocoder)

A PHP wrapper for the Google Maps Geocoding API v3.

Developed by [Justin Stayton](http://twitter.com/jstayton) while at [Monk Development](http://monkdev.com).

- [Documentation](http://jstayton.github.io/GoogleMapsGeocoder/classes/GoogleMapsGeocoder.html)
- [Release Notes](https://github.com/jstayton/GoogleMapsGeocoder/wiki/Release-Notes)

Requirements
------------

[](#requirements)

- PHP &gt;= 5.3.0

Installation
------------

[](#installation)

### Composer

[](#composer)

The recommended installation method is through [Composer](http://getcomposer.org/), a dependency manager for PHP. Just add `jstayton/google-maps-geocoder` to your project's `composer.json` file:

```
{
    "require": {
        "jstayton/google-maps-geocoder": "*"
    }
}
```

[More details](http://packagist.org/packages/jstayton/google-maps-geocoder) can be found over at [Packagist](http://packagist.org).

Getting Started
---------------

[](#getting-started)

We'll use the address of [Monk Development](http://monkdev.com) for this example:

```
$address = "2707 Congress St., San Diego, CA 92110";
```

There are two ways to set the address of a `Geocoder` object. Either the address can be passed to the constructor:

```
use GoogleMaps\Geocoder\Geocoder;

$Geocoder = new Geocoder($address);
```

Or the address can be set after the object is created:

```
use GoogleMaps\Geocoder\Geocoder;

$Geocoder = new Geocoder();
$Geocoder->setAddress($address);
```

By default, the `format` is set to `json` and the `sensor` is set to `false`. These values can be changed either through the constructor or after the object is created. See the [documentation](http://jstayton.github.io/GoogleMapsGeocoder/classes/GoogleMapsGeocoder.html)for the complete list of API parameters that can be changed.

Once all parameters are set, the final step is to send the request to the Google Maps Geocoding API:

```
$response = $Geocoder->geocode();
```

The `geocode` method converts the response into a JSON associative array (default) or `SimpleXMLElement` object depending on the specified `format`. See the `geocode`[documentation](http://jstayton.github.io/GoogleMapsGeocoder/classes/GoogleMapsGeocoder.html#method_geocode)for making the request over HTTPS or preventing conversion (instead returning the raw plain text response).

Feedback
--------

[](#feedback)

Please open an issue to request a feature or submit a bug report. Or even if you just want to provide some feedback, I'd love to hear. I'm also available on Twitter as [@jstayton](http://twitter.com/jstayton).

Contributing
------------

[](#contributing)

1. Fork it.
2. Create your feature branch (`git checkout -b my-new-feature`).
3. Commit your changes (`git commit -am 'Added some feature'`).
4. Push to the branch (`git push origin my-new-feature`).
5. Create a new Pull Request.

###  Health Score

29

—

LowBetter than 59% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity11

Limited adoption so far

Community13

Small or concentrated contributor base

Maturity62

Established project with proven stability

 Bus Factor1

Top contributor holds 77.1% 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 ~156 days

Total

4

Last Release

4522d ago

### Community

Maintainers

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

---

Top Contributors

[![jstayton](https://avatars.githubusercontent.com/u/98357?v=4)](https://github.com/jstayton "jstayton (27 commits)")[![gabrielbull](https://avatars.githubusercontent.com/u/671923?v=4)](https://github.com/gabrielbull "gabrielbull (6 commits)")[![cbschuld](https://avatars.githubusercontent.com/u/231867?v=4)](https://github.com/cbschuld "cbschuld (1 commits)")[![Wolg](https://avatars.githubusercontent.com/u/538630?v=4)](https://github.com/Wolg "Wolg (1 commits)")

---

Tags

geocodinggeocodergooglemapmapsgeocodegmapgmaps

### Embed Badge

![Health badge](/badges/gabrielbull-google-maps-geocoder/health.svg)

```
[![Health](https://phpackages.com/badges/gabrielbull-google-maps-geocoder/health.svg)](https://phpackages.com/packages/gabrielbull-google-maps-geocoder)
```

###  Alternatives

[yandex/geo

PHP-library for interactions with geo-coding Yandex.Maps

117309.0k3](/packages/yandex-geo)[jcf/geocode

Google Geocoding API for Laravel

48160.5k](/packages/jcf-geocode)[biscolab/google-maps-php-sdk

Google Maps PHP SDK.

14215.1k](/packages/biscolab-google-maps-php-sdk)

PHPackages © 2026

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