Snap a coordinate to the nearest road
NearestResult Routing.Nearest(RoutingNearestParamsparameters, CancellationTokencancellationToken = default)
GET/api/v1/nearest
Snap a coordinate to the nearest road
RoutingNearestParams parameters = new()
{
Lat = 0,
Lng = 0,
};
var nearestResult = await client.Routing.Nearest(parameters);
Console.WriteLine(nearestResult);{
"geometry": {
"coordinates": [
0
],
"type": "Point"
},
"properties": {
"distance_m": 0,
"edge_id": 0
},
"type": "Feature"
}Returns Examples
{
"geometry": {
"coordinates": [
0
],
"type": "Point"
},
"properties": {
"distance_m": 0,
"edge_id": 0
},
"type": "Feature"
}