openstreetmap / openstreetmap-website

The Rails application that powers OpenStreetMap
https://www.openstreetmap.org/
GNU General Public License v2.0
2.15k stars 908 forks source link

Object id in URL (after search) confuses edit location #620

Open systemed opened 10 years ago

systemed commented 10 years ago
  1. Search for somewhere on osm.org (e.g. Charlbury)
  2. Pan away
  3. Click 'Edit'
  4. Editor opens in search result location, not pan location

I guess this is because the node ID is retained in the URL even after panning (e.g. http://www.openstreetmap.org/edit?node=11658442#map=19/51.87269/-1.48239 ).

Tested with iD and P2.

ghost commented 10 years ago

Yeah, I was about to report this myself. It happens even after you've deselected the object you search for (by closing the search pane).

tomhughes commented 10 years ago

Seems the persistence of objects in the secondary URLs is causing quite a few problems (see also #616 and #624) so maybe we need to rethink that @jfire?

jfirebaugh commented 10 years ago

I think #616 and #624 are a separate issue from this one.

The behavior @Evropi mentioned is a straight-up bug that's fixed by #627.

I see several possibilities for the behavior @systemed is talking about:

(The latter two are equivalent for P2, since it doesn't support auto-selecting a feature.)

@systemed, was one of those what you were expecting?

systemed commented 10 years ago

Thinking from a user's point of view - generally a placename search is a map navigation activity, i.e. pan and zoom me to the place identified by this name. So either #2 or #3 is correct behaviour. #2 is probably marginally more useful (and puts me to shame in that in n years I never implemented select-object-on-load in P2).

jfirebaugh commented 10 years ago

630 implements the second option for iD. I didn't see where object parameters are handled for P1/P2 -- is that in Potlatch itself somewhere?

tomhughes commented 10 years ago

@jfire in site_controller the object parameters are used to setup @lat, @lon and @zoom for use in the view

mmd-osm commented 2 months ago

I cannot reproduce the issue anymore with the URL provided above: https://www.openstreetmap.org/edit?node=11658442#map=19/51.87269/-1.48239 (http changed to https, since http is gone). Can we close this one?

AntonKhorev commented 2 months ago

iD opens in pan location for me.

But then pressing Z should pan to that node and it doesn't work, probably an iD issue.

https://www.openstreetmap.org/edit?node=11658442#map=19/51.86924/-1.47270