-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
zoomToEntity fails when selecting a relation from the search results #4276
Comments
I couldn't reproduce with nodes, but this happens with ways that aren't part of relations. |
The sidebar also opens and is buggy if you go direct to a relation from a url, here's an example. You are left at zoom 2 at |
Heard a complaint about this from a fellow mapper. A test case: www.openstreetmap.org/edit?way=26233048 should zoom to way, but currently it shows the whole world. I understand this is not easy fixable and not of priority, but still it would be nice to have. Maybe you could query the Overpass API for a quick fix? Something like |
The same thing happens if you search for a way or node ID, like |
Looking at it more, the issue is probably this block of code. We can delay fetching and parsing the tiles, but we shouldn't delay Lines 114 to 144 in 9fa078b
|
It works! Thank you, Bryan! |
What is supposed to happen:
You click on Philadelphia in the geocoder search results and the map moves to someplace around Philadelphia.
What happens:
The map doesn't actually go anywhere.
Why:
We fetch the Philadelphia relation from the OSM API using this
zoomToEntity
function:iD/modules/core/context.js
Lines 118 to 126 in c0d224b
It fetches the relation, but not the members, and so when
map.zoomTo()
tries to calculate an extent, it can't actually do this, and just returns without moving the map anywhere:iD/modules/renderer/map.js
Lines 650 to 652 in c0d224b
Interestingly, if you try these steps a second time, iD will actually go to Philadelphia because somehow some of its relation members got loaded. I'm curious about how/where that happens, because it's not something I expected.
The text was updated successfully, but these errors were encountered: