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

Display navigation directions from MapBox #1293

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

RafailStratiotis
Copy link

Display navigation directions from MapBox

But the route/navigation line doesn't work..
Can some one help for this?

Display navigation directions from MapBox

But the route/navigation line doesn't work
@jinzo
Copy link
Contributor

jinzo commented Nov 3, 2024

I'm not sure, but I would say that Mapbox probably does not like Maplibre GL JS fork of Mapbox GL JS that is used in Traccar. I would try with this: https://github.com/maplibre/maplibre-gl-directions As it supports "Mapbox Directions API" and OSRM - so I think it would be a good fit.

Not sure what @tananaev thinks about this feature, but I would be interested in it - if it would be based on maplibre-gl-directions, so I can use OSRM for it (or something else that is open or has configurable backends).

@tananaev
Copy link
Member

tananaev commented Nov 3, 2024

Definitely want to see a flexible solution. Ideally we support a large number of providers.

@RafailStratiotis
Copy link
Author

@jinzo I noticed the solution you thought of but it doesn't cover me, basically I want to see how long time it will take the vehicle to arrive at a specific destination but in the code i tried to generate it doesn't show the route/navigation line like in mapbox demo https://docs.mapbox.com/mapbox-gl-js/example/mapbox-gl-directions/

@tananaev can you help in some way?

@tananaev
Copy link
Member

tananaev commented Nov 3, 2024

What's the goal here? If you just want a custom implementation just for yourself, this is not the right place. If you want to contribute something, we have discuss it first and it has to be flexible enough.

@RafailStratiotis
Copy link
Author

@tananaev I'm here to contribute.. the solution proposed by @jinzo I think it does not help and does not cover my reasoning.
my rationale is : with left click a select some vehicle and right click on map select the destination it will end the car and see how many hours it takes for it to reach the destination.

I am offering an unfinished code that can be used by many maps besides mapbox, if you have something better to recommend it would be appreciated

@jinzo
Copy link
Contributor

jinzo commented Nov 3, 2024

@RafailStratiotis maplibre-gl-directions is probably an old(er) fork of mapbox-gl-directions (that also offers some nice controls), but I would say that there are high chance that the low level controls/code is there.
Points where I would start:

My point being, that it's probably a lot more feasible to make this work with maplibre-gl-directions than to get mapbox-gl-directions working with Traccar (without substantial fork).

@jcardus jcardus mentioned this pull request Dec 14, 2024
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

Successfully merging this pull request may close these issues.

3 participants