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

Overwrite rerouting logic #16

Merged
merged 4 commits into from
Jan 7, 2024

Conversation

boldtrn
Copy link
Collaborator

@boldtrn boldtrn commented Dec 31, 2023

This changes makes it possible to write custom rerouting logic in your app without requiring to use Mapbox directions.

@boldtrn boldtrn added the enhancement New feature or request label Dec 31, 2023
Copy link
Contributor

@mindthefish mindthefish left a comment

Choose a reason for hiding this comment

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

Just some typos

/**
Allows to customise the calculation of a route.

If you want to overwrite the defult rerouting loigc, return true.
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
If you want to overwrite the defult rerouting loigc, return true.
If you want to overwrite the default rerouting logic, return true.


If you want to overwrite the defult rerouting loigc, return true.

- parameter from: The current olocation of the user
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
- parameter from: The current olocation of the user
- parameter from: The current location of the user


- parameter from: The current olocation of the user
- parameter along: The route progress
- parameter completion: Callbackc function when either the route was sucessfully caluclated or if there was an error
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
- parameter completion: Callbackc function when either the route was sucessfully caluclated or if there was an error
- parameter completion: Callback function when either the route was successfully calculated or if there was an error

- parameter from: The current olocation of the user
- parameter along: The route progress
- parameter completion: Callbackc function when either the route was sucessfully caluclated or if there was an error
- return: True to preferent the route controller from running its own rerouting logic
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
- return: True to preferent the route controller from running its own rerouting logic
- return: True to prevent the route controller from running its own rerouting logic

@boldtrn
Copy link
Collaborator Author

boldtrn commented Jan 3, 2024

Thanks, I just found the spellchecker in XCode, I will try my best to improve the spelling :)

Copy link
Contributor

@ianthetechie ianthetechie left a comment

Choose a reason for hiding this comment

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

Sorry for the delay in reviewing this, but this looks good! Can't wait to try it out! Thanks @boldtrn!

@boldtrn
Copy link
Collaborator Author

boldtrn commented Jan 7, 2024

Thanks for the review @ianthetechie, I will go ahead and merge this PR.

@boldtrn boldtrn merged commit 29d290b into maplibre:main Jan 7, 2024
1 check passed
@boldtrn boldtrn deleted the overwrite_rerouting_logic branch January 7, 2024 16:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants