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

Prezoom properly trace edits #4796

Open
jidanni opened this issue Feb 14, 2018 · 4 comments
Open

Prezoom properly trace edits #4796

jidanni opened this issue Feb 14, 2018 · 4 comments
Labels
bug A bug - let's fix this!

Comments

@jidanni
Copy link
Contributor

jidanni commented Feb 14, 2018

  1. Visit e.g., https://www.openstreetmap.org/user/jidanni/traces/2547559
  2. Click edit

Observe that we need to now at least click two more "+" zooms to really
get to comfortable editing range.

A simple rule would be have the page prezoomed so that the entire track
just fits the page.

You might say of "(map/edit)" the two could be different zooms. Map would be a zoomed out overview, but edit would be zoomed in, ready to edit.

@jidanni jidanni changed the title Prezoom properly when coming from 'edit a trace' Prezoom properly trace edits Feb 14, 2018
@bhousel bhousel added the bug A bug - let's fix this! label Feb 14, 2018
@bhousel
Copy link
Member

bhousel commented Feb 14, 2018

Thanks for reporting, I will look into why iD doesn't zoom into this trace.

@bhousel
Copy link
Member

bhousel commented Mar 11, 2018

Ok I figured out why the trace is zoomed out.. It's because code on openstreetmap-website is telling iD to open the view at z16.. I'll open an issue on openstreetmap-website to change this:

https://github.com/openstreetmap/openstreetmap-website/blob/0f5ad1f3cc5d82efef93d2d17809145c5f68f233/app/assets/javascripts/edit/id.js.erb#L15-L19

@bhousel
Copy link
Member

bhousel commented Mar 11, 2018

I'll need to think more about the best way to fix this.
iD actually will try to centerzoom on the gpx trace, as long as the gpx trace does not fit in the given viewport.

This is weird. It means that:

  • If you specify a zoomed out zoom/lat/lng (like openstreetmap-website does), iD will not zoom to the trace - try it
  • If you specify a garbage zoom/lat/lng in a different part of the world, iD will go there first and then will rezoom to show the trace - try it
  • If you specify no zoom/lat/lng, iD will default to 2/0/0 (the whole world centered on null island). The trace will fit in there and iD will not zoom to it - try it

I'm thinking more that I should just change iD's behavior. If we're passed a data file, we should probably always zoom to it.

I'm not sure whether this would break any other sites. For example, the HOT Task Manager passes us a bounding task square, but it would probably be ok to just center the user's view on that task square (maybe preferred) .

@jidanni
Copy link
Contributor Author

jidanni commented Apr 15, 2021

2021 problem description:

  1. Visit https://www.openstreetmap.org/traces
  2. Click any Edit Map link.

These all lead to Zoom Level 16 views.

But that "one size fits all" is bad when the user has been hiking around for half an hour (not far).
Or driving around all day (not near.)

E.g., in the first case, the user will notice some red stuff in the middle of the screen...
20210416T044656
"Oh, that's my trace." (Needs to zoom in manually.)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug A bug - let's fix this!
Projects
None yet
Development

No branches or pull requests

2 participants