2017 © Pedro Peláez
 

library google-distance-matrix

Google distance matrix API - Estimate travel time and distance for multiple destinations.

image

valerian/google-distance-matrix

Google distance matrix API - Estimate travel time and distance for multiple destinations.

  • Friday, December 2, 2016
  • by miroslav-valerian
  • Repository
  • 2 Watchers
  • 4 Stars
  • 5,160 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 4 Forks
  • 0 Open issues
  • 2 Versions
  • 14 % Grown

The README.md

Google Distance Matrix API

Estimate travel time and distance for multiple destinations., (*1)

Requirements

Requires PHP 5.5.0 or higher., (*2)

Installation

The best way to install valerian/google-distance-matrix is using Composer:, (*3)

$ composer require valerian/google-distance-matrix

Getting Started


$distanceMatrix = new GoogleDistanceMatrix('YOUR API KEY'); $distance = $distanceMatrix->setLanguage('cs') ->setOrigin('49.950096, 14.668544') ->setDestination('50.031817, 14.490880') ->sendRequest();
$distanceMatrix = new GoogleDistanceMatrix('YOUR API KEY');
$distance = $distanceMatrix->setLanguage('cs')
    ->setOrigin('K Habrovci 447, 251 63 Strančice, Česká republika')
    ->setDestination('Roztylská 2321/19, Chodov, 148 00 Praha-Praha 11, Česká republika')
    ->setMode(GoogleDistanceMatrix::MODE_WALKING)
    ->setLanguage('en-GB')
    ->setUnits(GoogleDistanceMatrix::UNITS_IMPERIAL)
    ->setAvoid(GoogleDistanceMatrix::AVOID_HIGHWAYS)
    ->sendRequest();

For more info, please visit https://developers.google.com/maps/documentation/distance-matrix/, (*4)

The Versions

02/12 2016

dev-master

9999999-dev

Google distance matrix API - Estimate travel time and distance for multiple destinations.

  Sources   Download

GPL-3.0 BSD-3-Clause GPL-2.0

The Requires

 

google api google distance matrix distance matrix

02/12 2016

v0.0.1

0.0.1.0

Google distance matrix API - Estimate travel time and distance for multiple destinations.

  Sources   Download

GPL-3.0 BSD-3-Clause GPL-2.0

The Requires

 

google api google distance matrix distance matrix