minube/mapzen-php

Mapzen SDK for PHP - 在您的PHP项目中使用Mapzen

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

This package is not auto-updated.

Last update: 2024-09-26 01:10:13 UTC


README

如何使用

提取不同位置之间的所有点

$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();