Skip to content
GuidesPlaygroundDashboard

Map Match

Match GPS coordinates to the road network
client.mapMatch.match(MapMatchMatchParams { trace, radiuses } body, RequestOptionsoptions?): MapMatchResult { geometry, properties, type, legs }
POST/api/v1/map-match
ModelsExpand Collapse
MapMatchRequest { trace, radiuses }

GPS trace to match against the road network

trace: GeoJsonGeometry { coordinates, type }

GPS trace (GeoJSON LineString geometry)

coordinates: Array<number> | Array<Array<number>> | Array<Array<Array<number>>> | Array<Array<Array<Array<number>>>>

GeoJSON coordinates array (nesting depth varies by geometry type)

One of the following:
Array<number>
Array<Array<number>>
Array<Array<Array<number>>>
Array<Array<Array<Array<number>>>>
type: "Point" | "LineString" | "Polygon" | 3 more
One of the following:
"Point"
"LineString"
"Polygon"
"MultiPoint"
"MultiLineString"
"MultiPolygon"
radiuses?: Array<number> | null

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

MapMatchResult { geometry, properties, type, legs }

Map matching result with snapped geometry

geometry: GeoJsonGeometry { coordinates, type }
coordinates: Array<number> | Array<Array<number>> | Array<Array<Array<number>>> | Array<Array<Array<Array<number>>>>

GeoJSON coordinates array (nesting depth varies by geometry type)

One of the following:
Array<number>
Array<Array<number>>
Array<Array<Array<number>>>
Array<Array<Array<Array<number>>>>
type: "Point" | "LineString" | "Polygon" | 3 more
One of the following:
"Point"
"LineString"
"Polygon"
"MultiPoint"
"MultiLineString"
"MultiPolygon"
properties: Properties { confidence, distance, duration }
confidence?: number

Match confidence score

distance?: number

Total matched distance in meters

duration?: number

Estimated duration in seconds

type: "Feature"
legs?: Array<Record<string, unknown>>

Matched route legs between consecutive trace points