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

Map Data overlay should not zoom by itself #3360

Open
hungerburg opened this issue Nov 10, 2021 · 3 comments
Open

Map Data overlay should not zoom by itself #3360

hungerburg opened this issue Nov 10, 2021 · 3 comments
Labels
enhancement Improvements and new feature requests mapview Related to the map view features

Comments

@hungerburg
Copy link

When map data overlay is on, clicking an item, that extends beyond the viewport, will make the map zoom out to show its full extent. If the item is big, this will make the browser window freeze and then report an error.

Please do not zoom - users can do that themselves, they may prefer to pan a bit, it should be their choice. There might be good intentions behind that auto-zoom, yet the result is often not wished for.

@tomhughes
Copy link
Member

Just panning could be very confusing though - if the object is larger than the current viewport then we might pan so that no part of it is actually visible because it surrounds the viewport without actually crossing it in any way.

The window shouldn't be freezing though because if the zoom gets too low then we disable to data layer to avoid trying to display huge amounts of data - it sounds like the threshold for that might need adjusting but as you haven't provided an example it's hard to evaluate the best solution.

@hungerburg
Copy link
Author

I'd say, the script should not mess with zoom, neither should it pan. In a densely mapped area, even changing from z19 to z18 will result in lots of stuff being downloaded, during the download, the page is frozen. Hitting by accident a 500m segment of a street will make it zoom to z17 with even longer stall, or even z16, where after several seconds the page shows the "slow down" warning. Not to mention, the overlay in these zoom levels covers parts of the map in a way to make it practically hidden, not much use of the feature then, in urban area, at least.

Not zooming/panning also will always result in the selected item being inside of the viewport :)

@mmd-osm
Copy link
Contributor

mmd-osm commented Nov 10, 2021

A side note regarding the freezing: we're still requesting XML version of the /map call, which adds quite some overhead due to DOM parsing and subsequent Garbage collection in the browser. Now that JSON format is also available, it might be an idea to switch to JSON format. Maybe a topic for another issue...

@lectrician1 lectrician1 added enhancement Improvements and new feature requests mapview Related to the map view features labels Nov 20, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Improvements and new feature requests mapview Related to the map view features
Projects
None yet
Development

No branches or pull requests

4 participants