Project-OSRM / osrm-backend

Open Source Routing Machine - C++ backend
http://map.project-osrm.org
BSD 2-Clause "Simplified" License
6.18k stars 3.28k forks source link

[ERROR: NO SEGMENT] In OSRM Node Binding #6687

Open erwinschrodinger1 opened 10 months ago

erwinschrodinger1 commented 10 months ago

I was using osrm-backend with node binding. But, no binding is found while using node.

app.get("/testOSRM", async (req, res) => {
  const busStopCoordinate = [
    [85.337767, 27.68748],
    [85.3020047, 27.7575493],
  ];
  return await osrmClient.route(
    {
      coordinates: busStopCoordinate,
      overview: "full",
      geometries: "geojson",
      continue_straight: true,
    },
    (err, result) => {
      if (err) {
        console.log(err);

        return res.status(400).json({
          success: false,
          error: [err],
          message: "Error",
        });
      }
      console.log(res);

      return res.status(200).json({
        success: true,
        date: result.routes[0].geometry,
        message: "Success",
      });
    }
  );
});

Output in terminal

image

There is path in example website of osrm https://map.project-osrm.org/?z=15&center=27.692818%2C85.326047&loc=27.687465%2C85.337803&loc=27.697626%2C85.302958&hl=en&alt=0&srv=1

image

I downloaded data from geo fabric. https://download.geofabrik.de/asia/nepal.html.

And used car.lua.

github-actions[bot] commented 2 weeks ago

This issue seems to be stale. It will be closed in 7 days if no further activity occurs.