MCPcopy Create free account
hub / github.com/Project-OSRM/osrm-backend / nearest

Method nearest

src/nodejs/node_osrm.cpp:356–363  ·  view source on GitHub ↗

clang-format off * Snaps a coordinate to the street network and returns the nearest n matches. * * Note: `coordinates` in the general options only supports a single `{longitude},{latitude}` entry. * * @name nearest * @memberof OSRM * @param {Object} options - Object literal containing parameters for the nearest query. * @param {Array} [options.coordinates] The coordinates this request will

Source from the content-addressed store, hash-verified

354 */
355// clang-format on
356Napi::Value Engine::nearest(const Napi::CallbackInfo &info)
357{
358 osrm::Status (osrm::OSRM::*nearest_fn)(const osrm::NearestParameters &params,
359 osrm::engine::api::ResultT &result) const =
360 &osrm::OSRM::Nearest;
361 async(info, &argumentsToNearestParameter, nearest_fn, false);
362 return info.Env().Undefined();
363}
364
365// clang-format off
366/**

Callers 1

nearest.jsFile · 0.80

Calls 1

asyncFunction · 0.85

Tested by

no test coverage detected