Skip to content
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

Navigating between sections doesn't remember map position #24

Open
mvl22 opened this issue Sep 7, 2011 · 9 comments
Open

Navigating between sections doesn't remember map position #24

mvl22 opened this issue Sep 7, 2011 · 9 comments

Comments

@mvl22
Copy link
Member

mvl22 commented Sep 7, 2011

  1. Go to home page
  2. Go to journey planner via map page. Move map to a known location.
  3. Click back to go back to home page.
  4. Go to journey planner page again. Map position will revert.
@annapowellsmith
Copy link
Member

It's a side-effect of the architecture - /journey is a separate page from / - so it's reloading the page from scratch.

Not sure how we can get round this. Ideas:

  1. Set a map listener for when tiles move and store the last known location. On page reload, check for last known location, and if it's recent, use that rather than geolocation for initial location.
  2. Move /journey into the main index page - previously it seemed like you had to load Google Maps JS on page load, which I didn't want to do on the home page, but it's possible that in beta you can now load it on journey pagecreate event.

@mvl22
Copy link
Member Author

mvl22 commented Sep 7, 2011

Are you sure this isn't just a cookie setting in Google Maps?

@annapowellsmith
Copy link
Member

Pretty sure, alas. We would implement it in cookies, but it would be by hand, with an event listener.

@mvl22
Copy link
Member Author

mvl22 commented Sep 10, 2011

Feedback:

"If I switch apps of safari windows, and then come back to cyclestreets mobile, it resets the map to the 'default' location each time, rather than leaving it as I had it. I was trying to use the map to copy some street names into another document, and finding it frustrating."

Is this any use: ?
http://www.daftlogic.com/sandbox-google-maps-remember-last-location.htm

@annapowellsmith
Copy link
Member

Yes, if users are giving you this feedback, it probably is worth improving.

Thanks for the link - yes, that is the method we'd use. As the 'advantages and disadvantages' list says, it needs cookies and extra javascript, but perhaps it is worth doing.

@annapowellsmith
Copy link
Member

Have checked a basic fix in, but it's not ideal, because when you return to the page you will get another 'looking for your location' message. Not easy to get round this without some tricky refactoring.

Will leave this open as a long-term enhancement, as it would be much better to move the /journey and /photomap pages into index, then the problem wouldn't arise in the first place (and the code would probably be neater). It's quite a big change though.

@mvl22
Copy link
Member Author

mvl22 commented Sep 14, 2011

It seems to be working fine.

By 'looking for your location' message, I don't get that. I only get 'Using your most recent location' which just feels unnecessary. Not a massive problem though.

@davidearl
Copy link

The feedback above was from me. Just to say your fix deals with this adequately, thanks very much.

@si-the-pie
Copy link
Member

Testing the site while developing some new feature I'm regularly getting the 'looking for your location' message. This is on a device that doesn't know it's location - and it slows down my testing and feels awkward.

Ideally I'd like the site to remember that it failed to get a location once and not try again until I prod it to do so, or if geolocation becomes available.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants