Skip to content

Conversation

@Anurag-Bansode
Copy link
Contributor

Description

Fixes: #13

Changes Made

updated :The coordinates for SFO Airport in LocationSearch.tsx have 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.tsx
The component now automatically attempts a fallback using reverse geocoding if the initial routing request fails.
Refactored: LeafletMap.tsx,LocationSearch.tsx

Checklist

  • My code follows the project's coding standards.
  • I have performed a self-review of my own code.
  • I have commented my code, particularly in hard-to-understand areas.
  • I have made corresponding changes to the documentation.
  • My changes generate no new warnings.
  • I have added tests that prove my fix is effective or that my feature works.
  • I have verified that no API keys or other secrets are committed.
  • I have updated .env.example with any new environment variables.

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.
@netlify
Copy link

netlify bot commented Oct 17, 2025

Deploy Preview for gopredict ready!

Name Link
🔨 Latest commit 1023bb1
🔍 Latest deploy log https://app.netlify.com/projects/gopredict/deploys/68f27d7f0b6d030008f2e093
😎 Deploy Preview https://deploy-preview-48--gopredict.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@Anurag-Bansode Anurag-Bansode marked this pull request as draft October 17, 2025 13:36
@harshitaphadtare harshitaphadtare marked this pull request as ready for review October 17, 2025 16:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Bug: Route Not Displayed Correctly on Prediction

1 participant