evoluty / google-maps-client
A PHP Google Maps APIs client
0.2
2019-03-02 22:04 UTC
Requires
- php: >=7.2
- ext-json: *
- myclabs/php-enum: ^1.6
- php-http/discovery: ^1.6
- psr/http-client: ^1.0
- psr/http-factory: ^1.0
Requires (Dev)
Suggests
- guzzlehttp/guzzle: ^6.3
- php-http/guzzle6-adapter: ^2.0
- zendframework/zend-diactoros: ^2.1
This package is auto-updated.
Last update: 2024-11-15 03:24:54 UTC
README
A PHP client for Google Maps APIs
This library helps building query and call the Google Maps APIs
This will parse results and give usable and typed objects as a result
Installation
Run composer require evoluty/google-maps-client
or check directly on the packagist website
Usage
Use like the following (example with the TimeZone API)
$googleClient = new GoogleMapClient('<your_api_key>'); $request = GoogleMapRequest::newTimeZoneRequest( new TimeZoneLocation('39.6034810', '-119.6822510') )->withLanguage(Language::CZECH()); $timeZoneResponse = $googleClient->sendTimeZoneRequest($request);
The response type depends on the API that you are calling and will contain public typed getters that match the Google API response
APIs
At the moment the following API are implemented:
- TimeZone API
- Directions API