Keep the polyline straight in navigation

Hello,

We have developed our application using Open Route Service APIs and implemented a navigation system using voice instructions.

We have any question :
How to keep the polyline always straight when the user starts navigation like Google Maps and Waze do… and keep it straight at each change of directions based on the polyline (when the user turns right or left) :

When i launch the itinerary the line is below, the line need to be only in top :arrow_up::arrow_up: not : :arrow_right::arrow_lower_right::arrow_down::arrow_lower_left::arrow_left:

Here’s an explanation with a drawing :
The blue line should always look like this when i launch the itinerary

And when we arrive and go to the second street, we need to turn the map to keep the line in top (we need to use the position from user to confirm when he go to the second street :

We try but don’t find the solution

Thank you a lot

Hi @Aymane,

it’s not really clear what you are trying to do, but form the sound of it it seems like an issue with your implementation, where the map doesn’t rotate properly?

Best regards

Hello @amandus

I can’t find the solution to make the line straight with the user’s position like on Google Maps and Waze, or Geovelo which uses Open Route Service :

When I generate on my mobile application, it looks like this:
1fbbff1a024e139ff6c23eb27b1b357314dd1a69_2_230x500

The line need to be only in top :arrow_up::arrow_up: not : :arrow_right::arrow_lower_right::arrow_down::arrow_lower_left::arrow_left:

Sorry for the double post.

Hello,

I think I understand your point. If you’re unable to find a suitable library or framework, I would recommend determining the user’s position and locating the nearest segment to align with. By using the phone’s compass, you could ascertain the angle between north and your segment, allowing you to adjust the camera view accordingly.

Hope this help, It’s a lead to explore, not sure it meets your needs.