# Map Match ## Match GPS coordinates to the road network `$client->mapMatch->match(list coordinates, ?list radiuses): MapMatchResult` **post** `/api/v1/map-match` Match GPS coordinates to the road network ### Parameters - `coordinates: list` GPS coordinates to match, in order of travel (max 50 points) - `radiuses?:optional list` Search radius per coordinate in meters. Must have the same length as `coordinates` or be omitted entirely. Default: 50m per point. ### Returns - `MapMatchResult` - `list features` Snapped tracepoint Features in input order - `list> matchings` Matched sub-routes. Each matching connects a contiguous sequence of tracepoints that could be matched to roads. - `Type type` ### Example ```php mapMatch->match( coordinates: [ ['lat' => 48.8566, 'lng' => 2.3522], ['lat' => 48.857, 'lng' => 2.353], ['lat' => 48.8575, 'lng' => 2.354], ], radiuses: [0], ); var_dump($mapMatchResult); ``` #### Response ```json { "features": [ { "geometry": { "coordinates": [ 2.3522, 48.8566 ], "type": "Point" }, "properties": { "distance_m": 0, "edge_id": 0, "matchings_index": 0, "name": "name", "original": [ 0, 0 ], "waypoint_index": 0 }, "type": "Feature" } ], "matchings": [ { "foo": "bar" } ], "type": "FeatureCollection" } ``` ## Domain Types ### Map Match Request - `MapMatchRequest` - `list coordinates` GPS coordinates to match, in order of travel (max 50 points) - `?list radiuses` Search radius per coordinate in meters. Must have the same length as `coordinates` or be omitted entirely. Default: 50m per point. ### Map Match Result - `MapMatchResult` - `list features` Snapped tracepoint Features in input order - `list> matchings` Matched sub-routes. Each matching connects a contiguous sequence of tracepoints that could be matched to roads. - `Type type`