Download the PHP package yidas/google-maps-services without Composer
On this page you can find all versions of the php package yidas/google-maps-services. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download yidas/google-maps-services
More information about yidas/google-maps-services
Files in yidas/google-maps-services
Package google-maps-services
Short Description PHP client library(SDK) for Google Maps API Web Services
License MIT
Homepage https://github.com/yidas/google-maps-services-php
Informations about the package google-maps-services
Google Maps Services for PHP
PHP client library(SDK) for Google Maps API Web Services
OUTLINE
- Demonstration
- Description
- Requirements
- API keys
- Installation
- Usage
- Client
- Google Maps APIs Premium Plan license
- Language
- APIs
- Client
DEMONSTRATION
DESCRIPTION
The PHP Client for Google Maps Services is a PHP Client library for the following Google Maps APIs:
- Maps
- Google Doc)
- Routes
- Google Doc)
- Google Doc)
- Google Doc)
- Google Doc)
- Places
- [Places API] (TBD)
- Google Doc)
- Google Doc)
- Google Doc)
REQUIREMENTS
- PHP 7.0+ or higher
API keys
Each Google Maps Web Service request requires an API key or client ID. API keys are freely available with a Google Account at https://developers.google.com/console. The type of API key you need is a Server key.
To get an API key:
- Visit https://developers.google.com/console and log in with a Google Account.
- Select one of your existing projects, or create a new project.
- Enable the Google Maps Services API(s) you plan to use, such as:
- Directions API
- Distance Matrix API
- Geocoding API
- ...
- Create a new Server key.
- If you'd like to restrict requests to a specific IP address, do so now.
For guided help, follow the instructions for the [Directions API][directions-key]. You only need one API key, but remember to enable all the APIs you need. For even more information, see the guide to [API keys][apikey].
Important: This key should be kept secret on your server.
INSTALLATION
Run Composer in your project:
composer require yidas/google-maps-services
Then you could call it after Composer is loaded depended on your PHP framework:
USAGE
Before using any Google Maps Services, first you need to create a Client with configuration, then use the client to access Google Maps Services.
Client
Create a Client using API key:
Google Maps APIs Premium Plan license
If you use Google Maps APIs Premium Plan license instead of an API key, you could create Client using client ID and client secret (digital signature) for authentication.
Language
You could set language for Client for all services:
Changing language during execution:
APIs
Elevation API
Elevation API overview | Google for Developers
Routes API
Get a route | Google for Developers
Roads API
Snap to Roads | Google for Developers
Directions API
Getting directions | Google for Developers
Distance Matrix API
Get started with the Distance Matrix API | Google for Developers
Geocoding API
Geocoding API overview | Google for Developers
Geolocation API
Geolocation API overview | Google for Developers