## Match GPS coordinates to the road network `map_match.match(**kwargs) -> MapMatchResult` **post** `/api/v1/map-match` Match GPS coordinates to the road network ### Parameters - `trace: GeoJsonGeometry` GPS trace (GeoJSON LineString geometry) - `coordinates: Array[Float] | Array[Array[Float]] | Array[Array[Array[Float]]] | Array[Array[Array[Array[Float]]]]` GeoJSON coordinates array (nesting depth varies by geometry type) - `Array[Float]` - `Array[Array[Float]]` - `Array[Array[Array[Float]]]` - `Array[Array[Array[Array[Float]]]]` - `type: :Point | :LineString | :Polygon | 3 more` - `:Point` - `:LineString` - `:Polygon` - `:MultiPoint` - `:MultiLineString` - `:MultiPolygon` - `radiuses: Array[Float]` Search radius per coordinate in meters (optional, default 50) ### Returns - `class MapMatchResult` Map matching result with snapped geometry - `geometry: GeoJsonGeometry` - `coordinates: Array[Float] | Array[Array[Float]] | Array[Array[Array[Float]]] | Array[Array[Array[Array[Float]]]]` GeoJSON coordinates array (nesting depth varies by geometry type) - `Array[Float]` - `Array[Array[Float]]` - `Array[Array[Array[Float]]]` - `Array[Array[Array[Array[Float]]]]` - `type: :Point | :LineString | :Polygon | 3 more` - `:Point` - `:LineString` - `:Polygon` - `:MultiPoint` - `:MultiLineString` - `:MultiPolygon` - `properties: { confidence, distance, duration}` - `confidence: Float` Match confidence score - `distance: Float` Total matched distance in meters - `duration: Float` Estimated duration in seconds - `type: :Feature` - `:Feature` - `legs: Array[Hash[Symbol, untyped]]` Matched route legs between consecutive trace points ### Example ```ruby require "plaza" plaza = Plaza::Client.new( api_key: "My API Key", environment: "local" # defaults to "production" ) map_match_result = plaza.map_match.match(trace: {coordinates: [0], type: :Point}) puts(map_match_result) ```