Skip to content
GuidesPlaygroundDashboard

Match GPS coordinates to the road network

$client->mapMatch->match(GeoJsonGeometry trace, ?list<float> radiuses): MapMatchResult
POST/api/v1/map-match

Match GPS coordinates to the road network

ParametersExpand Collapse

GPS trace (GeoJSON LineString geometry)

radiuses?:optional list<float>

Search radius per coordinate in meters (optional, default 50)

ReturnsExpand Collapse
Properties properties
Type type
?list<array<string,mixed>> legs

Matched route legs between consecutive trace points

Match GPS coordinates to the road network

<?php

require_once dirname(__DIR__) . '/vendor/autoload.php';

$client = new Client(apiKey: 'My API Key', environment: 'local');

$mapMatchResult = $client->mapMatch->match(
  trace: ['coordinates' => [0], 'type' => 'Point'], radiuses: [0]
);

var_dump($mapMatchResult);
Returns Examples