## Match GPS coordinates to the road network `MapMatchResult mapMatch().match(MapMatchMatchParamsparams, RequestOptionsrequestOptions = RequestOptions.none())` **post** `/api/v1/map-match` Match GPS coordinates to the road network ### Parameters - `MapMatchMatchParams params` - `MapMatchRequest mapMatchRequest` GPS trace to match against the road network ### Returns - `class MapMatchResult:` Map matching result with snapped geometry - `GeoJsonGeometry geometry` - `Coordinates coordinates` GeoJSON coordinates array (nesting depth varies by geometry type) - `List` - `List>` - `List>>` - `List>>>` - `Type type` - `POINT("Point")` - `LINE_STRING("LineString")` - `POLYGON("Polygon")` - `MULTI_POINT("MultiPoint")` - `MULTI_LINE_STRING("MultiLineString")` - `MULTI_POLYGON("MultiPolygon")` - `Properties properties` - `Optional confidence` Match confidence score - `Optional distance` Total matched distance in meters - `Optional duration` Estimated duration in seconds - `Type type` - `FEATURE("Feature")` - `Optional> legs` Matched route legs between consecutive trace points ### Example ```java package com.plazafyi.example; import com.plazafyi.client.PlazaClient; import com.plazafyi.client.okhttp.PlazaOkHttpClient; import com.plazafyi.models.GeoJsonGeometry; import com.plazafyi.models.mapmatch.MapMatchMatchParams; import com.plazafyi.models.mapmatch.MapMatchRequest; import com.plazafyi.models.mapmatch.MapMatchResult; import java.util.List; public final class Main { private Main() {} public static void main(String[] args) { PlazaClient client = PlazaOkHttpClient.fromEnv(); MapMatchRequest params = MapMatchRequest.builder() .trace(GeoJsonGeometry.builder() .coordinatesOfNumber(List.of(0.0)) .type(GeoJsonGeometry.Type.POINT) .build()) .build(); MapMatchResult mapMatchResult = client.mapMatch().match(params); } } ```