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

How to show alternatives more then 4 waypoints #678

Open
Dostonhack opened this issue Oct 28, 2022 · 6 comments
Open

How to show alternatives more then 4 waypoints #678

Dostonhack opened this issue Oct 28, 2022 · 6 comments
Labels

Comments

@Dostonhack
Copy link

Dostonhack commented Oct 28, 2022

Hi there,
I have 4 waypoints, I don't show alternatives and edit alteratives waypoints, pls help me
image
I have 4 markers that I need to make an alternative to line, similar to yandex
this is code
image
image

@curtisy1
Copy link
Collaborator

By default LRM displays everything that's returned by the routing provider (OSM, Mapbox, etc.), so if only four waypoints are returned, then LRM can't do much about it.

If that's not what you mean, can you share some code so I could try to understand the question a bit better?

@Dostonhack
Copy link
Author

Dostonhack commented Oct 31, 2022

thank you for for the answer I have 4 markers that I need to make an alternative to line, similar to yandex

image
image

@curtisy1
Copy link
Collaborator

curtisy1 commented Nov 6, 2022

Hey, just wanted to let you know that I'm on vacation so replies might be a bit slower. I'll get back to this as soon as I can, though!

I believe you'll want a custom router or 4 instances of LRM though, from having a quick look. That is, every marker gets its own instance, essentially giving it alternatives as well

@curtisy1
Copy link
Collaborator

Okay, so just to confirm your situation looks like this:

  • You have 4 markers and a single route
  • You want four alternatives, where each alternative has one point matching the marker

@Dostonhack
Copy link
Author

Hi, Sorry, I see now your message, yes it is rigth

@curtisy1
Copy link
Collaborator

That is not currently something that lrm supports. You would have to set up 4 different routing machines with your start, end and marker coordinates as waypoints.

That said, I am happy to accept a pull request that adds an option to make alternatives depend on the closest intermediate waypoint

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

No branches or pull requests

2 participants