minube/mapzen-php

Mapzen SDK for PHP - Use Mapzen in your PHP project

dev-master 2016-03-10 15:15 UTC

This package is not auto-updated.

Last update: 2024-04-24 23:13:17 UTC


README

How to use it

To extract all the points between different locations

$client = new \Mapzen\MapzenClient($apiKey);

$turnByTurn = new \Mapzen\Request\TurnByTurn();
foreach ($points as $point) {
        $turnByTurn->addLocation($point['latitude'], $point['longitude']);
}
$result = $client->turnByTurn($turnByTurn);
$points = $result->getDecodedRoutePoints();