SAFESPACE22 / ParkingSWE

0 stars 0 forks source link

User location #17

Closed melissa-ng closed 3 months ago

melissa-ng commented 3 months ago

Description:

This feature will enable the application to track the user's location and provide an estimated travel time to a specific destination.

Requirements:

Geolocation:

Utilize the Geolocation API to retrieve the user's current location coordinates (latitude and longitude) with their consent. Update the user's location data every 3 seconds using the watchPosition method.

Travel Time Estimation:

Implement a function to calculate the estimated travel time to a designated location based on the user's current coordinates and the destination coordinates. This may involve integrating with a third-party mapping service API that offers travel time estimation functionality.

Success Criteria:

The application successfully retrieves the user's current location coordinates upon initial request and with subsequent updates every 3 seconds. The travel time calculation function accurately estimates the travel time to a specified destination based on the user's current location. User consent is obtained before accessing their location data.

Additional Considerations:

Address potential limitations of Geolocation API accuracy, especially on desktop devices. Provide clear error handling for cases where location data cannot be retrieved. Implement user interface elements to display the user's current location and estimated travel time (consider a map integration for visualization). Include options for users to disable location tracking if desired. Explore integrating with accessibility features for users with visual impairments.

Tasks