• Stars
    star
    154
  • Rank 242,095 (Top 5 %)
  • Language
    PHP
  • License
    MIT License
  • Created over 7 years ago
  • Updated 6 months ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

[READ ONLY] Provider for Google maps

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 \GuzzleHttp\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 \GuzzleHttp\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.

More Repositories

1

Geocoder

The most featured Geocoder library written in PHP.
PHP
3,948
star
2

GeocoderLaravel

Geocoder service provider for Laravel
PHP
701
star
3

BazingaGeocoderBundle

Integration of the Geocoder library into Symfony.
PHP
308
star
4

php-common

[READ ONLY] Common classes and interfaces for PHP-Geocoder
PHP
159
star
5

php-common-http

[READ ONLY] Common classes and interfaces for HTTP based PHP-Geocoder
PHP
157
star
6

chain-provider

[READ ONLY] Chain provider
PHP
88
star
7

geo-plugin-provider

[READ ONLY] Provider for GeoPlugin
PHP
83
star
8

geocoder-js

GeocoderJS is the JavaScript equivalent of Geocoder PHP.
JavaScript
75
star
9

plugin

[READ ONLY] Plugin support for providers
PHP
57
star
10

geocoder-extra

Geocoder extra features.
PHP
53
star
11

ipstack-provider

[READ ONLY] Provider for Ipstack
PHP
45
star
12

StackGeoIp

Stack middleware for adding geolocation results as a HTTP header to the request.
PHP
40
star
13

nominatim-provider

[READ ONLY] Provider for Nominatim
PHP
34
star
14

GeocodableBehavior

Propel behavior that helps you build geo-aware applications.
PHP
26
star
15

free-geoip-provider

[READ ONLY] Provider for Free Geoip
PHP
14
star
16

here-provider

[READ ONLY] Provider for Here
PHP
11
star
17

mapbox-provider

[READ ONLY] Provider for Mapbox
PHP
10
star
18

ip-info-provider

[READ ONLY] Provider for IpInfo
PHP
10
star
19

yandex-provider

[READ ONLY] Provider for Yandex
PHP
7
star
20

cache-provider

[READ ONLY] Cache provider
PHP
6
star
21

algolia-places-provider

[READ ONLY] Provider for AlgoliaPlaces
PHP
6
star
22

GeocoderModule

Zend module for the Geocoder
PHP
6
star
23

bing-maps-provider

[READ ONLY] Provider for Bing maps
PHP
5
star
24

host-ip-provider

[READ ONLY] Provider for HostIp
PHP
5
star
25

geoip2-provider

[READ ONLY] Provider for GeoIP2
PHP
5
star
26

open-cage-provider

[READ ONLY] Provider for OpenCage
PHP
4
star
27

GeocoderServiceProvider

Integration of the Geocoder library into Silex.
PHP
4
star
28

locationiq-provider

[READ ONLY] Provider for LocationIQ
PHP
4
star
29

arcgis-online-provider

[READ ONLY] Provider for ArcGIS
PHP
4
star
30

photon-provider

[READ ONLY] Provider for Photon
PHP
3
star
31

maxmind-binary-provider

[READ ONLY] Provider for MaxMind Binary
PHP
3
star
32

tomtom-provider

[READ ONLY] Provider for TomTom
PHP
3
star
33

openrouteservice-provider

[READ ONLY] Provider for Openrouteservice
PHP
3
star
34

ip-info-db-provider

[READ ONLY] Provider for IpInfoDb
PHP
2
star
35

graphhopper-provider

[READ ONLY] Provider for GraphHopper
PHP
2
star
36

google-maps-places-provider

[READ ONLY] Provider for GoogleMapsPlaces
PHP
2
star
37

mapquest-provider

[READ ONLY] Provider for MapQuest
PHP
2
star
38

geocoder-php.github.io

The Geocoder Website.
JavaScript
2
star
39

geonames-provider

[READ ONLY] Provider for Geonames
PHP
2
star
40

geocode-earth-provider

[READ ONLY] Provider for GeocodeEarth
PHP
1
star
41

maxmind-provider

[READ ONLY] Provider for MaxMind
PHP
1
star
42

pelias-provider

[READ ONLY] Provider for Pelias
PHP
1
star
43

ip2location-provider

[READ ONLY] Provider for IP2Location
PHP
1
star