Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Routing #1312

Open
jcardus opened this issue Dec 14, 2024 · 7 comments
Open

Routing #1312

jcardus opened this issue Dec 14, 2024 · 7 comments

Comments

@jcardus
Copy link
Contributor

jcardus commented Dec 14, 2024

Is your feature request related to a problem? Please describe.
Converting #1293 to a feature request

Would be nice to have routing. I see two use cases:

  • Estimate the distance / time taken from any vehicle to a specific point. This could help the user check, for example, in real time, which is the nearest vehicle (in distance or time) to a specific job / service.
  • Compare the actual trip / route of the vehicle with an estimated one. It would help customers check delays, device kms problems, wrong route decisions, etc. We could draw both lines on the map, actual vs estimated.

Describe the solution you'd like
As stated by @jinzo, maplibre-gl-directions would be a good starting point.

@tananaev
Copy link
Member

I don't think maplibre-gl-directions is a good starting point. I think we should just call an API on backend and support different providers.

@jcardus
Copy link
Contributor Author

jcardus commented Dec 14, 2024

Yes, the api url in the configuration could be the traccar backend.

Right now it supports https://project-osrm.org/ and https://docs.mapbox.com/api/navigation/directions formats. Apparently doesn't support valhalla which I use and it's very good, but I'm sure it will in the future.

@tananaev
Copy link
Member

The problem is also that it connects directly to the provider. Ideally it connects to Traccar backend.

@jcardus
Copy link
Contributor Author

jcardus commented Dec 14, 2024

What do you mean? It connects to whatever url you put in the configuration, which like I said, could be the traccar backend.

@tananaev
Copy link
Member

Then we would have to implement a very specific API format compatible with the library.

@jcardus
Copy link
Contributor Author

jcardus commented Dec 14, 2024

Two popular open source routing engines are osrm and valhalla. And valhalla has an option to use osrm format, so it looks like a good choice.

@jinzo
Copy link
Contributor

jinzo commented Dec 16, 2024

I second this, if it has to be proxied thorough traccar backend, OSRM API is probably the way to go.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants