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

[ALS-1839] Route avoidance options #308

Merged
merged 57 commits into from
Feb 4, 2025
Merged

Conversation

wadhawh
Copy link
Collaborator

@wadhawh wadhawh commented Jan 29, 2025

This PR adds routes avoidance options for all the travel modes; including Tolls, Farries, Dirtroad, UTurns and Tunnels. uTurn avoidance is not supported for Pedestrian and Scooter travel modes. Also adds new avoidance options in default settings.

Screenshot 2025-01-29 at 5 46 58 PM Screenshot 2025-01-29 at 6 16 22 PM

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

"text": "Avoid dirt roads"
},
"avoid_uturns": {
"text": "Avoid uTurns"
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should probably display it as "U-turns" instead of "uTurns" since "uTurn" is the value for it for HERE's API, but it is referred to as a "U-turn" in real life

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I agree with this suggestion. Can we get a follow up PR to update the strings for all languages to be in the U-Turn format?

https://en.wikipedia.org/wiki/U-turn

Ferries: routeOptions.avoidFerries,
DirtRoads: routeOptions.avoidDirtRoads,
Tunnels: routeOptions.avoidTunnels,
...uturnAvoidanceOption

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Any reason why we aren't supporting other avoidance options?

      "CarShuttleTrains": boolean,       
      "ControlledAccessHighways": boolean,       
      "DirtRoads": boolean,       
      "Ferries": boolean,       
      "SeasonalClosure": boolean,      
      "TollRoads": boolean,       
      "TollTransponders": boolean,       
      "TruckRoadTypes": [ "string" ],       
      "Tunnels": boolean,       
      "UTurns": boolean, 

https://docs.aws.amazon.com/location/latest/APIReference/API_CalculateRoutes.html

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Discussed offline that this is the set of avoidance options we want to go with as a starting point.

cypress/support/routeSupport.js Outdated Show resolved Hide resolved
cypress/support/routeSupport.js Outdated Show resolved Hide resolved
src/types/RouteOptionsType.ts Outdated Show resolved Hide resolved
@wadhawh wadhawh merged commit db8b876 into main Feb 4, 2025
3 checks passed
@wadhawh wadhawh deleted the ALS-1839_more-route-options branch February 4, 2025 17:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants