2017 © Pedro PelĆ”ez
 

library distmatrix

The package is intented to use google distance matrix api to find the time required to travel between destinations.

image

vivdub/distmatrix

The package is intented to use google distance matrix api to find the time required to travel between destinations.

  • Tuesday, August 8, 2017
  • by vivdub
  • Repository
  • 1 Watchers
  • 0 Stars
  • 15 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 1 Versions
  • 0 % Grown

The README.md

# DistMatrix This is a laravel package using Google Distance Matrix Api, to find the time required to travel between destinations.

Using the package, (*1)

  • UseĀ name space:Ā 
    use Vivdub\DistMatrix\GMap;

  • Create Object:
    $gmap = new GMap(env("DIST_MATRIX_API_KEY", ""));

  • Provide coordinates:
    $gmap->timeWithCoordinates(array($source_lat,$source_lon), array(array(dest_lat1, dest_lon1), array(dest_lat2, dest_lon2)));

  • Get the duration text.
    $gmap->getDurationText(0,0);
    //== First argument is source, since the method created is always using one source coordinate set, so this will always be 0 (for now), other parameter is destination index, in order you provided.

Installation, (*2)

  1. composer require vivdub/distmatrix:dev-master

  2. Once done add following to composer.json psr-4
    "Vivdub\\DistMatrix\\":"vendor/vivdub/distmatrix"

  3. Run composer update

Ā , (*3)

Ā , (*4)

The Versions

08/08 2017

dev-master

9999999-dev

The package is intented to use google distance matrix api to find the time required to travel between destinations.

  Sources   Download

by Avatar vivdub