addejans / ev-routing

2 stars 0 forks source link

Add Interactive Map to Home Page with Start and End Point Markers #8

Open addejans opened 2 months ago

addejans commented 2 months ago

As a user,
I want to input start and end locations on the home page and see the map update in real-time with markers indicating these points,
so that I can visually verify the start and end locations for my journey instantly.


Acceptance Criteria:

  1. Map Integration:

    • A map should be displayed on the home page (e.g., using Google Maps, Mapbox, or any other mapping library).
    • The map should be interactive, allowing the user to zoom and pan.
  2. Input Fields for Start and End Points:

    • There should be input fields for the user to provide start and end coordinates (latitude, longitude) or search locations using an address.
    • The coordinates or addresses will trigger the marker update when entered or changed.
  3. Real-Time Marker Update:

    • Upon user input for start and end locations, markers should appear on the map indicating the respective points.
    • The map should update instantly without requiring a page refresh.
    • Markers should be visually distinct for start and end points (e.g., different colors or icons).
  4. Map Centering and Zoom:

    • Once both the start and end points are provided, the map should automatically adjust the zoom level and center itself to fit both markers in the view.
    • The map should dynamically adjust as the user updates the start or end location.
  5. No Backend Involvement:

    • The marker updates should happen purely on the front-end in real-time, with no need to wait for backend responses.

Additional Considerations:

Technical Notes:


Tasks:

addejans commented 2 months ago

Instead of entering coordinates, maybe we want to have the user select the start and end point on the map and retrieve the coordinates that way.

Perhaps offer both options?

To be discussed - @bsibu