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 set limit find route only in one country? #677

Open
Heaty566 opened this issue Oct 12, 2022 · 1 comment
Open

How to set limit find route only in one country? #677

Heaty566 opened this issue Oct 12, 2022 · 1 comment
Labels

Comments

@Heaty566
Copy link

Hi there,

Is there any feature that I use to limit the find route function to search the route only in my country? For example, I search the route from Ha Noi, Viet Nam to Ho Chi Minh, Viet Nam, but the function returns the shortest route that I have to go to Lao and Cambodia.

Thank you so much

@curtisy1
Copy link
Collaborator

That's a tricky question. The answer I can give you is, I'm not sure. It probably depends on the routing provider you use whether this is possible or not. Mapbox offers exclusions by coordinates in their API, which you could use for certain roads that lead outside the country.

OSRM might need a custom profile or some other hacks

HERE offers this as far as I remember, but since it's a paid service, it probably won't be of much use.

In any of those cases, you probably need to adjust the router to provide the parameter to the api

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