#4413 closed enhancement (fixed)
[Patch] diversify zoom-level when zooming onto a small object
Reported by: | skyper | Owned by: | team |
---|---|---|---|
Priority: | major | Milestone: | 14.01 |
Component: | Core | Version: | latest |
Keywords: | zoom level | Cc: | skyper, dieterdreist |
Description (last modified by )
Hi again,
please, use a higher zoom-level when zooming to (zoom to selected) a single node. Right now, it is often hard to catch with your eyes the selected node if there are some nodes around it.
Thanks a lot
Attachments (2)
Change History (19)
comment:1 by , 15 years ago
Keywords: | level added; node removed |
---|---|
Priority: | normal → major |
Summary: | use higher zoom-level when zooming to a single node → zoom-level varies when zooming to a small element |
comment:2 by , 15 years ago
Priority: | major → minor |
---|---|
Type: | enhancement → defect |
comment:3 by , 15 years ago
Priority: | minor → major |
---|---|
Summary: | zoom-level varies when zooming to a small element → diversify zoom-level when zooming onto a small object |
Type: | defect → enhancement |
I rewrite this bug an turn it into an enhancement since JOSM works right but it is often hard to find small objects.
Write now it is often hard to find selected node(s) or short way(s) if there are many other objects around the selected ones.
A fast fix would be: set the min-zoom-level higher.
A real fix would be: investigate the area around the objects and adjust the zoom-level:
- for nodes: use a higher zoom-level if there are many other nodes around the selected one/ones.
- for way: the length is important (fixed through higher min-zoom-level) and also it is important if there are many other objects close to it.
Thanks a lot
comment:4 by , 13 years ago
Description: | modified (diff) |
---|
Please, use this file
attachment:true_overlapps.osm:ticket:4582
- select an object
- use "zoom to data" (1) and "zoom to selection" (3)
imagine an even bigger and more dense data layer !
comment:5 by , 12 years ago
This is still a pain.
Please guys. It is much easier to zoom out once the object is spotted than to zoom in and search.
comment:6 by , 11 years ago
The attached patch uses the 'fast fix' as described above: It enlarges the bounding box of the selected items by 100%, i.e. they will fit at least twice on the screen in each direction (it depends on the object and the available view space which direction allows less space). In other words, there’ll always be a "half object" space around the object. Special case for single nodes: they don’t have an extent, so enlarging them by 100% still yields 0. Instead, the bounding box will be made at least 0.0007 degrees wide. On reasonable sized monitors this is about the size of a larger intersection.
I made an attempt at the 'real fix', but ran into performance problems (essentially zooming in and enlarging/shrinking the bounding box until the "crowdedness" was too high or size constraints were met). From my limited testing I believe the fast fix is good enough, at least as an intermediate until someone comes up with a better idea.
Compared to the current method, this zooms in more for small objects and less for large objects. The current method simply added 0.002 degrees to the bounding box (the in-code comment suggested the original value was 0.001 degrees, but it appears the default was changed. The value can be configured by an advanced pref).
This patch affects zoom to selection and zoom to conflict.
Please apply and test this patch, I will continue using it to see if I missed an issue. The values can obviously be modified.
I am aware this patch removes the ability to control the min zoom in level. However, as far as I understand the author of the original ticket (#3527), the configurability is not required with this patch anymore.
comment:7 by , 11 years ago
Summary: | diversify zoom-level when zooming onto a small object → [Patch] diversify zoom-level when zooming onto a small object |
---|
This patch seems to be working nicely for small objects (such as houses or objects from attachment:true_overlapps.osm:ticket:4582). When zooming to a large landuse polygon (e.g. way 28617014) however, I find the old behaviour more adequate.
What about using your implementation for small bboxes and keeping the old one for larger ones. A suitable decision criterion would have to be found. In a small test, I found your implementation comfortable for objects smaller than 500m and the old one for larger ones.
comment:8 by , 11 years ago
Can you give me a concrete example where zoom to selection with large objects (like landuse) comes in handy? I couldn’t think of one, so it’s very hard for me to judge how well the patch performs. I tested with way 28617014 and I’m indifferent to either solution.
Another option would be to scale logarithmically, i.e. add less context as the selected objects become larger. Small objects, like houses would then have 100% context added and large objects in the order of 1-10%.
comment:9 by , 11 years ago
When zooming to a long rural road (like way 143476805 or 25706383), I find it more helpful to have it as large as possible. As you said, it's easier to zoom out than to zoom in. This may be dependant on the screen resolution and is only a personal feeling.
The logarithmic zooming sounds interesting!
by , 11 years ago
Attachment: | fix_zoom_level_v2.patch added |
---|
Updated patch with logarithmic scaling. This patch is not final, as I haven’t updated the description or integrated it nicely. Zooming for large objects should be about the same as the old method, while retaining the higer zoom ins for smaller objects. Can you please see how that works for you?
comment:12 by , 11 years ago
Milestone: | → 14.01 |
---|
comment:15 by , 11 years ago
Wow. More than 5 years to fix a workaround solution where I never found time to think about a proper way. :-) Logarithmic sounds really fine. Some solutions need their time...
comment:17 by , 11 years ago
Cc: | added |
---|
Zoom-level when zooming on small elemets should be adjusted.
Right now I think it depends on the elements around.
For example: I can find "nodes without a connection, nor a tag" easily in the outside area, but I can not find them in a heavily loaded area of a 4 way connection with lots of extra lanes and footways.
Zoom-level on nodes should be adjusted to the number of elements around it. more elements -> higher zoom-level.
For ways: I can have a way of 2 nodes of a lenght of 0.5 meters or less up to kilometers.
Right now zoom-level is only adjusted if the way is big but not for tiny ones.
Zoom-level should be adjusted to the length of way.
Thanks