CodeforNRV / NRV-Park-Finder

Find a public park and amenities in the New River Valley (VA)
1 stars 4 forks source link

Page refresh should update the user's location #17

Open nealf opened 7 years ago

nealf commented 7 years ago

A page refresh should update the user's current location and update the display of closest parks

nealf commented 7 years ago

This is on the results list page (parks.html). If you go all the way back to the start and search again, it does get the current location

jhawley commented 7 years ago

The latest pull request has this working on the parks.html and maps.html pages; however, I'm still considering a solution that doesn't involve a page reload. At the very least, I'd like to refactor those pages to use the deferred getLocation object. Therefore, I'm leaving open for now.

jhawley commented 6 years ago

The location updates should work okay without prompting the user, because I am passing a get parameter to indicate whether or not the user has opted into using the geolocation API. If they've opted in, I think it is a reasonable choice to go ahead and update their location. The most recent commit reflects this approach.

On the maps page, I would still like to have a clear indication when the current location marker has updated and when updates have failed.