2017 © Pedro Peláez
 

library google-directions

PHP Wrapper for Google directions API. Replaces and adds more features to the unmaintained package from Palmabit-IT

image

preee/google-directions

PHP Wrapper for Google directions API. Replaces and adds more features to the unmaintained package from Palmabit-IT

  • Sunday, February 4, 2018
  • by preee
  • Repository
  • 1 Watchers
  • 0 Stars
  • 20 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 2 Forks
  • 0 Open issues
  • 7 Versions
  • 25 % Grown

The README.md

Google Directions

Build Status, (*1)

PHP Wrapper for Google directions API., (*2)

NOTE: still considered under development, which means that things might change a lot. If you want to use it anyway, just remember that future releases might contain breaking changes., (*3)

Install

Via Composer, (*4)

``` bash $ composer require preee/google-directions, (*5)


## Usage ``` php $apikey = 'my-google-apikey'; $gd = new Palmabit\GoogleDirections\GoogleDirections($apikey);

or, (*6)

``` php GoogleDirections::setApikey($apikey); $gd = new GoogleDirections();, (*7)

then

``` php

/*
 * Example of API call:
 * https://maps.googleapis.com/maps/api/directions/json?origin=Milano&destination=Venezia&key=my-google-apikey
 *
 * with a timeout of 40s, defaults to 30s if empty
 */

$direction = $gd
    ->createDirectionAPI()
    ->setTimeout(4000)
    ->setOrigin('Milano')
    ->setDestination('Verona')
    ->call();

/*
 * now you can use all $direction methods
 * see above for detailed lists
 */

//get the status
$status = $direction->getStatus();

//get the distance between Milan and Venice
$distance = $direction->getDistance();

//get summary
$summary = $direction->getSummary();

//get steps
$steps = $direction->getSteps();

//get duration
$duration = $direction->getDuration();


Change log

Please see CHANGELOG for more information what has changed recently., (*8)

Testing

bash $ composer test, (*9)

Contributing

Please see CONTRIBUTING for details., (*10)

License

The MIT License (MIT). Please see License File for more information., (*11)

The Versions

04/02 2018

dev-master

9999999-dev https://github.com/preee/google-directions

PHP Wrapper for Google directions API. Replaces and adds more features to the unmaintained package from Palmabit-IT

  Sources   Download

MIT

The Requires

 

The Development Requires

distance google-directions

03/02 2018

v0.0.5

0.0.5.0 https://github.com/preee/google-directions

PHP Wrapper for Google directions API. Replaces and adds more features to the unmaintained package from Palmabit-IT

  Sources   Download

MIT

The Requires

 

The Development Requires

distance google-directions

16/11 2015

0.0.4

0.0.4.0 https://github.com/Palmabit-IT/google-directions

PHP Wrapper for Google directions API.

  Sources   Download

MIT

The Requires

 

The Development Requires

distance google-directions

16/11 2015

0.0.2

0.0.2.0 https://github.com/Palmabit-IT/google-directions

Calculates distance between two given plases using Google directions API

  Sources   Download

MIT

The Requires

 

The Development Requires

distance google-directions

16/11 2015

0.0.3

0.0.3.0 https://github.com/Palmabit-IT/google-directions

Calculates distance between two given plases using Google directions API

  Sources   Download

MIT

The Requires

 

The Development Requires

distance google-directions

16/11 2015

0.0.1

0.0.1.0 https://github.com/Palmabit-IT/google-directions

Calculates distance between two given plases using Google directions API

  Sources   Download

MIT

The Requires

 

The Development Requires

distance google-directions

15/11 2015

dev-develop

dev-develop https://github.com/Palmabit-IT/google-directions

Calculates distance between two given plases using Google directions API

  Sources   Download

MIT

The Requires

 

The Development Requires

distance google-directions