-
Notifications
You must be signed in to change notification settings - Fork 20
fix(LeafletMaps): Displays animated Route and waypoints/turnpoints #48
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
Open
Anurag-Bansode
wants to merge
13
commits into
harshitaphadtare:main
Choose a base branch
from
Anurag-Bansode:main
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
UI/UX improvements - **Button Loading State**: The "Predict Travel Time" button now displays a loading spinner and "Predicting..." text - **Map Loading State**: A loading overlay with a spinner is now shown on the map while the route is being fetched - **Animated Route Drawing**: The route path is now drawn with a "snaking" animation from the start to the end point, offering a more dynamic and engaging visual. - **Turn-by-Turn Directions**: After a route is calculated, a scrollable list of turn-by-turn directions is displayed below the map, providing valuable trip details. - **Custom Map Markers**: Replaced default Leaflet markers with custom, visually appealing SVG pins for start (blue) and end (red) locations. - **Default Date/Time**: The date and time input now defaults to the user's current local time, streamlining the form-filling process.
Improves the user experience of the route preview by introducing a smoother, time-based animation and adding visual cues for turns. - Adds more fluid and consistent drawing effect. - Adds an `isPredicting` state to display a "Calculating route..." message, providing better feedback during API calls. - Introduces small, white circular markers on the map to visually indicate each turn along the calculated route.
Creates a more dynamic and intuitive visual experience for the user. - The `animateRoute` function now tracks the animation progress and adds turn markers to the map in real-time as the corresponding route segment is displayed.
refactoring of the mapping and location logic to improve maintainability, scalability, and user experience. - Implements a robust two-step routing strategy. If the primary routing request fails, the component now uses a reverse geocoding fallback to find the nearest accessible roads and automatically retries the request.
✅ Deploy Preview for gopredict ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
Fixes: #13
Changes Made
updated :The coordinates for SFO Airport in
LocationSearch.tsxhave been corrected.The previous coordinates pointed to a runway, which is not accessible by public roads and caused routing failures.
Added: A robust two-step routing strategy in
LeafletMap.tsxThe component now automatically attempts a fallback using reverse geocoding if the initial routing request fails.
Refactored:
LeafletMap.tsx,LocationSearch.tsxChecklist
.env.examplewith any new environment variables.