Match GPS coordinates to the road network
mapMatch().match(MapMatchMatchParamsparams, RequestOptionsrequestOptions = RequestOptions.none()) : MapMatchResult
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
fun main() {
val client: PlazaClient = PlazaOkHttpClient.fromEnv()
val params: MapMatchRequest = MapMatchRequest.builder()
.trace(GeoJsonGeometry.builder()
.coordinatesOfDoubles(listOf(0.0))
.type(GeoJsonGeometry.Type.POINT)
.build())
.build()
val mapMatchResult: MapMatchResult = client.mapMatch().match(params)
}