PHPackages                             chris48s/cakephp-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. chris48s/cakephp-geocoder

ActiveCakephp-plugin

chris48s/cakephp-geocoder
=========================

Geocoder controller component and model behavior

1.0.1(8y ago)15142MITPHPPHP &gt;=5.4

Since Jan 9Pushed 2y ago2 watchersCompare

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

READMEChangelogDependencies (2)Versions (3)Used By (0)

CakePHP Geocoder Plugin
=======================

[](#cakephp-geocoder-plugin)

A thin wrapper around the Google Maps Geocoding API.
----------------------------------------------------

[](#a-thin-wrapper-around-the-google-maps-geocoding-api)

This plugin adds a geocoder controller component and model behavior to your CakePHP 3 application. It is based on Martin Bean's [CakePHP 2 Geocoder Plugin](https://github.com/martinbean/cakephp-geocoding-plugin), updated for compatibility with CakePHP 3. Thanks to Martin for making his code available under a MIT licence.

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

[](#installation)

Install from [packagist](https://packagist.org/packages/chris48s/cakephp-geocoder) using [composer](https://getcomposer.org/). Add the following to your `composer.json`:

```
"require": {
    "chris48s/cakephp-geocoder": "^1.0.0"
}

```

and run `composer install` or `composer update`, as applicable.

Loading the plugin
------------------

[](#loading-the-plugin)

Add the code `Plugin::load('Chris48s/Geocoder');` to your `bootstrap.php`.

Using the Component
-------------------

[](#using-the-component)

You can use the component to geocode addresses within your controllers. A good example is if you need to take a user-submitted value and convert it to a latitude/longitude pair to pass to a model to search it.

To geocode an address in your controllers, do something similar to the following:

```
