armansansd 8bb1064a3b default services conflit ? пре 2 година
..
Model 8bb1064a3b default services conflit ? пре 2 година
.gitignore 8bb1064a3b default services conflit ? пре 2 година
CHANGELOG.md 8bb1064a3b default services conflit ? пре 2 година
GoogleMaps.php 8bb1064a3b default services conflit ? пре 2 година
LICENSE 8bb1064a3b default services conflit ? пре 2 година
Readme.md 8bb1064a3b default services conflit ? пре 2 година
composer.json 8bb1064a3b default services conflit ? пре 2 година

Readme.md

Google Maps Geocoder provider

Build Status Latest Stable Version Total Downloads Monthly Downloads Code Coverage Quality Score Software License

This is the Google Maps provider from the PHP Geocoder. This is a READ ONLY repository. See the main repo for information and documentation.

Usage

$httpClient = new \Http\Adapter\Guzzle6\Client();

// You must provide an API key
$provider = new \Geocoder\Provider\GoogleMaps\GoogleMaps($httpClient, null, 'your-api-key');

$result = $geocoder->geocodeQuery(GeocodeQuery::create('Buckingham Palace, London'));

All requests require a valid API key, however google does have a free tier available. Please see this page for information on getting an API key.

Google Maps for Business

Previously, google offered a "Business" version of their APIs. The service has been deprecated, however existing clients can use the static business method on the provider to create a client:


$httpClient = new \Http\Adapter\Guzzle6\Client();

// Client ID is required. Private key is optional.
$provider = \Geocoder\Provider\GoogleMaps\GoogleMaps::business($httpClient, 'your-client-id', 'your-private-key');

$result = $geocoder->geocodeQuery(GeocodeQuery::create('Buckingham Palace, London'));

Install

composer require geocoder-php/google-maps-provider

Contribute

Contributions are very welcome! Send a pull request to the main repository or report any issues you find on the issue tracker.