Fix polyline decoding
This commit is contained in:
parent
c55d572ec4
commit
97b85e1380
2 changed files with 5 additions and 5 deletions
|
@ -149,6 +149,8 @@ class TrackerController extends Controller
|
|||
case 200:
|
||||
$data = json_decode($response->getBody());
|
||||
|
||||
$data->trip->locations = $this->decode_polyline($data->trip->route);
|
||||
|
||||
// Cache the downloaded file if it does not exist locally.
|
||||
if (Storage::disk('local')->missing($tripFileName)) {
|
||||
Log::debug("Caching new trip file '{$tripFileName}'.");
|
||||
|
@ -173,8 +175,6 @@ class TrackerController extends Controller
|
|||
}
|
||||
}
|
||||
|
||||
$data->trip->locations = $this->decode_polyline($data->trip->route);
|
||||
|
||||
return $data->trip;
|
||||
default:
|
||||
// TODO: Add proper error handling.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue