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.
The text was updated successfully, but these errors were encountered:
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.
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 :)
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...
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.
The text was updated successfully, but these errors were encountered: