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

ActiveLibrary

faitabdeslam/google-maps-geocoder
=================================

A PHP wrapper for the Google Maps Geocoding API v3.

v3.0.0(10y ago)118MITPHPPHP &gt;=5.2.0

Since Sep 17Pushed 10y ago1 watchersCompare

[ Source](https://github.com/faitabdeslam/GoogleMapsGeocoder)[ Packagist](https://packagist.org/packages/faitabdeslam/google-maps-geocoder)[ Docs](https://github.com/jstayton/GoogleMapsGeocoder)[ RSS](/packages/faitabdeslam-google-maps-geocoder/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (1)Dependencies (1)Versions (10)Used By (0)

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

[](#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.2.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).

### Manually

[](#manually)

1. Copy `src/GoogleMapsGeocoder.php` to your codebase, perhaps to the `vendor`directory.
2. Add the `GoogleMapsGeocoder` class to your autoloader or `require` the file directly.

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 `GoogleMapsGeocoder` object. Either the address can be passed to the constructor:

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

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

```
$Geocoder = new GoogleMapsGeocoder();
$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

28

—

LowBetter than 54% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity8

Limited adoption so far

Community12

Small or concentrated contributor base

Maturity64

Established project with proven stability

 Bus Factor1

Top contributor holds 88.9% 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 ~145 days

Recently: every ~37 days

Total

9

Last Release

3822d ago

Major Versions

v2.4.0 → v3.0.02015-11-21

### Community

Maintainers

![](https://www.gravatar.com/avatar/4b2f343badff65570ff013ca5e5f29eafc613005e40a68a0132da065b59811ca?d=identicon)[faitabdeslam](/maintainers/faitabdeslam)

---

Top Contributors

[![jstayton](https://avatars.githubusercontent.com/u/98357?v=4)](https://github.com/jstayton "jstayton (40 commits)")[![faitabdeslam](https://avatars.githubusercontent.com/u/1420309?v=4)](https://github.com/faitabdeslam "faitabdeslam (2 commits)")[![cbschuld](https://avatars.githubusercontent.com/u/231867?v=4)](https://github.com/cbschuld "cbschuld (1 commits)")[![mikejoseph](https://avatars.githubusercontent.com/u/227534?v=4)](https://github.com/mikejoseph "mikejoseph (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/faitabdeslam-google-maps-geocoder/health.svg)

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

###  Alternatives

[cornford/googlmapper

An easy way to integrate Google Maps with Laravel.

457447.9k4](/packages/cornford-googlmapper)[yandex/geo

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

117309.0k3](/packages/yandex-geo)[mediawiki/maps

Adds various mapping features to MediaWiki

84145.0k3](/packages/mediawiki-maps)[farhanwazir/laravelgooglemaps

Laravel Google Map package for 5.x. You can use all google map features in laravel.

15542.0k2](/packages/farhanwazir-laravelgooglemaps)[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)
