2017 © Pedro Peláez
 

library google-maps-geocoder

A PHP wrapper for the Google Maps Geocoding API v3.

image

jstayton/google-maps-geocoder

A PHP wrapper for the Google Maps Geocoding API v3.

  • Tuesday, November 10, 2015
  • by jstayton
  • Repository
  • 5 Watchers
  • 108 Stars
  • 212,331 Installations
  • PHP
  • 5 Dependents
  • 0 Suggesters
  • 54 Forks
  • 7 Open issues
  • 9 Versions
  • 9 % Grown

The README.md

NOTICE: This project is deprecated and no longer maintained. If you'd like to continue supporting a forked version, please reach out on Twitter (@kidjustino) to have it listed here., (*1)

GoogleMapsGeocoder

Latest Stable Version Total Downloads, (*2)

A PHP wrapper for the Google Maps Geocoding API v3., (*3)

Developed by Justin Stayton while at Monk Development., (*4)

Requirements

  • PHP >= 5.2.0

Installation

Composer

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

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

More details can be found over at Packagist., (*6)

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

We'll use the address of Monk Development for this example:, (*7)

$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:, (*8)

$Geocoder = new GoogleMapsGeocoder($address);

Or the address can be set after the object is created:, (*9)

$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 for the complete list of API parameters that can be changed., (*10)

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

$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 for making the request over HTTPS or preventing conversion (instead returning the raw plain text response)., (*12)

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 @kidjustino., (*13)

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.

The Versions

10/11 2015

dev-master

9999999-dev https://github.com/jstayton/GoogleMapsGeocoder

A PHP wrapper for the Google Maps Geocoding API v3.

  Sources   Download

MIT

The Requires

  • php >=5.2.0

 

The Development Requires

geocoding google maps geocoder map geocode gmaps gmap

10/11 2015

v2.4.0

2.4.0.0 https://github.com/jstayton/GoogleMapsGeocoder

A PHP wrapper for the Google Maps Geocoding API v3.

  Sources   Download

MIT

The Requires

  • php >=5.2.0

 

The Development Requires

geocoding google maps geocoder map geocode gmaps gmap

04/09 2015

v2.3.0

2.3.0.0 https://github.com/jstayton/GoogleMapsGeocoder

A PHP wrapper for the Google Maps Geocoding API v3.

  Sources   Download

MIT

The Requires

  • php >=5.2.0

 

The Development Requires

geocoding google maps geocoder map geocode gmaps gmap

25/06 2015

v2.2.1

2.2.1.0 https://github.com/jstayton/GoogleMapsGeocoder

A PHP wrapper for the Google Maps Geocoding API v3.

  Sources   Download

MIT

The Requires

  • php >=5.2.0

 

The Development Requires

geocoding google maps geocoder map geocode gmaps gmap

25/06 2015

v2.2.0

2.2.0.0 https://github.com/jstayton/GoogleMapsGeocoder

A PHP wrapper for the Google Maps Geocoding API v3.

  Sources   Download

MIT

The Requires

  • php >=5.2.0

 

The Development Requires

geocoding google maps geocoder map geocode gmaps gmap

29/12 2013

v2.1.0

2.1.0.0 https://github.com/jstayton/GoogleMapsGeocoder

A PHP wrapper for the Google Maps Geocoding API v3.

  Sources   Download

MIT

The Requires

  • php >=5.2.0

 

The Development Requires

geocoding google maps geocoder map geocode gmaps gmap

18/11 2013

v2.0.3

2.0.3.0 https://github.com/jstayton/GoogleMapsGeocoder

A PHP wrapper for the Google Maps Geocoding API v3.

  Sources   Download

MIT

The Requires

  • php >=5.2.0

 

geocoding google maps geocoder map geocode gmaps gmap

03/05 2013

v2.0.2

2.0.2.0 https://github.com/jstayton/GoogleMapsGeocoder

A PHP wrapper for the Google Maps Geocoding API v3.

  Sources   Download

MIT

The Requires

  • php >=5.2.0

 

geocoding google maps geocoder map geocode gmaps gmap

18/09 2012

v2.0.1

2.0.1.0 https://github.com/jstayton/GoogleMapsGeocoder

A PHP wrapper for the Google Maps Geocoding API v3.

  Sources   Download

MIT

The Requires

  • php >=5.2.0

 

geocoding google maps geocoder map geocode gmaps gmap