## Snap a coordinate to the nearest road `$client->routing->nearest(float lat, float lng, ?int radius): NearestResult` **get** `/api/v1/nearest` Snap a coordinate to the nearest road ### Parameters - `lat: float` Latitude - `lng: float` Longitude - `radius?:optional int` Search radius in meters (default 500, max 5000) ### Returns - `NearestResult` - `GeoJsonGeometry geometry` - `Properties properties` - `Type type` ### Example ```php routing->nearest(lat: 0, lng: 0, radius: 0); var_dump($nearestResult); ``` #### Response ```json { "geometry": { "coordinates": [ 0 ], "type": "Point" }, "properties": { "distance_m": 0, "edge_id": 0 }, "type": "Feature" } ```