PHPackages                             rtablada/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. [Utility &amp; Helpers](/categories/utility)
4. /
5. rtablada/geocoder

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

rtablada/geocoder
=================

A slim Google Geocoder for PHP and Laravel

41562[1 issues](https://github.com/rtablada/geocoder/issues)PHP

Since Jul 1Pushed 12y ago2 watchersCompare

[ Source](https://github.com/rtablada/geocoder)[ Packagist](https://packagist.org/packages/rtablada/geocoder)[ RSS](/packages/rtablada-geocoder/feed)WikiDiscussions master Synced 2mo ago

READMEChangelogDependenciesVersions (1)Used By (0)

[![Build Status](https://camo.githubusercontent.com/d863d003f43c78acc94ca95936cd802cfe1de488cd09a30d272ca9e21d52be29/68747470733a2f2f7472617669732d63692e6f72672f727461626c6164612f67656f636f6465722e706e673f6272616e63683d6d6173746572)](http://travis-ci.org/rtablada/geocoder)

Geocoder
========

[](#geocoder)

This is a simple geocode provider for PHP. By default, it uses google's geocode API but any compatible API will work.

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

[](#installation)

This package can be installed using composer using `composer require rtablada/geocoder`.

For Laravel 4, this package and its Service Provider can be installed using `php artisan package:install rtablada/geocoder`.

On both, specify `dev-master` as the version constraint.

Use
===

[](#use)

To use this package outside of Laravel you can use

```
require 'vendor/autoload.php';

$geocoder = new Rtablada\Geocoder\Geocoder;

var_dump($geocoder->getLocationFromQuery('Atlanta'));
```

The geocoder provides the following functions

  Function Arguments Description   getLocationFromQuery string Query Returns a Location Object from the google geocode API   getCoordinatesFromQuery string Query Returns a Coordinates Object from the google geocode API   getSearchSquare Coordinate center, number radius Returns an array with the corners of a sqare around the centerpoint with a radius in miles Other Provided Classes
======================

[](#other-provided-classes)

The Geocoder Package also provides two helper classes (Location and Coordinate).

The Coordinate is a simple object with `lat` and `lng` properties.

The Location object has `address` and `coordinates` properties. The `coordinates` is an instance of the Coordinate class.

The Location class also provides a `newInstanceFromObject` method to parse Google Geocode Result objects into Location objects.

###  Health Score

23

—

LowBetter than 27% of packages

Maintenance15

Infrequent updates — may be unmaintained

Popularity16

Limited adoption so far

Community11

Small or concentrated contributor base

Maturity41

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 90.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.

### Community

Maintainers

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

---

Top Contributors

[![rtablada](https://avatars.githubusercontent.com/u/2532004?v=4)](https://github.com/rtablada "rtablada (20 commits)")[![lchski](https://avatars.githubusercontent.com/u/343884?v=4)](https://github.com/lchski "lchski (2 commits)")

### Embed Badge

![Health badge](/badges/rtablada-geocoder/health.svg)

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

PHPackages © 2026

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