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
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);
}
}