Modify

Opened 4 years ago

Closed 4 years ago

Last modified 4 years ago

#19510 closed enhancement (fixed)

Add "Zoom to layer" in context menu of layers in the Layers panel

Reported by: matthijs Owned by: team
Priority: normal Milestone: 20.08
Component: Core Version:
Keywords: template_report zoom layer Cc:

Description (last modified by Klumbumbus)

I often work on a few different things at the same time, sometimes far apart geographically. If so, I often download different parts of the map in different layers. Switching between layers is now not as easy as it could be. I have to activate a different layer, but then manually find it in the map (i.e. zoom out, see what bit of data is the right one, zoom back in). Alternatively, doing a select-all after activating a layer allows doing right-click and "zoom to selection" in the "Selection window", but that's still a bit cumbersome (and it took me a while to find this possibility).

What would help if I could right-click a layer in the "Layers" window, and select a (to be added) "Zoom to" option (similar like the "Zoom to selection" option in the "Selection" window, or the "zoom to" option for members when editing a relation).

Screenshot of popup menu where a new option is suggested

Relative:URL: ^/trunk
Repository:UUID: 0c6e7542-c601-0410-84e7-c038aed88b3b
Last:Changed Date: 2020-06-30 19:13:42 +0200 (Tue, 30 Jun 2020)
Revision:16731
Build-Date:2020-07-01 01:30:51
URL:https://josm.openstreetmap.de/svn/trunk

Identification: JOSM/1.5 (16731 en) Linux Ubuntu 19.10
Memory Usage: 406 MB / 2048 MB (146 MB allocated, but free)
Java version: 11.0.7+10-post-Ubuntu-2ubuntu219.10, Ubuntu, OpenJDK 64-Bit Server VM
Look and Feel: javax.swing.plaf.metal.MetalLookAndFeel
Screen: :0.0 1280x800 (scaling 1.0x1.0)
Maximum Screen Size: 1280x800
Best cursor sizes: 16x16 -> 16x16, 32x32 -> 32x32
Java package: openjdk-11-jre:amd64-11.0.7+10-2ubuntu2~19.10
WebStart package: icedtea-netx:amd64-1.8-0ubuntu8
Java ATK Wrapper package: libatk-wrapper-java:all-0.35.0-3
libcommons-logging-java: libcommons-logging-java:all-1.2-2
fonts-noto: fonts-noto:-
VM arguments: [--add-reads=java.base=ALL-UNNAMED,java.desktop, --add-reads=java.desktop=ALL-UNNAMED,java.naming, --add-reads=java.naming=ALL-UNNAMED,java.desktop, --add-exports=java.desktop/sun.awt=ALL-UNNAMED,java.desktop, --add-exports=java.desktop/javax.jnlp=ALL-UNNAMED,java.desktop, --add-exports=java.base/com.sun.net.ssl.internal.ssl=ALL-UNNAMED,java.desktop, --add-exports=java.base/sun.net.www.protocol.jar=ALL-UNNAMED,java.desktop, --add-exports=java.base/sun.security.action=ALL-UNNAMED,java.desktop, --add-exports=java.base/sun.security.provider=ALL-UNNAMED,java.desktop, --add-exports=java.base/sun.security.util=ALL-UNNAMED,java.desktop, --add-exports=java.base/sun.security.validator=ALL-UNNAMED,java.desktop, --add-exports=java.base/sun.security.x509=ALL-UNNAMED,java.desktop, --add-exports=java.base/jdk.internal.util.jar=ALL-UNNAMED,java.desktop, --add-exports=java.base/sun.net.www.protocol.http=ALL-UNNAMED,java.desktop, --add-exports=java.desktop/sun.awt.X11=ALL-UNNAMED,java.desktop, --add-exports=java.desktop/sun.applet=ALL-UNNAMED,java.desktop, --add-exports=java.desktop/sun.applet=ALL-UNNAMED,jdk.jsobject, --add-exports=java.naming/com.sun.jndi.toolkit.url=ALL-UNNAMED,java.desktop, -Dicedtea-web.bin.name=javaws, -Dicedtea-web.bin.location=/usr/lib/icedtea-web/bin/javaws]
Dataset consistency test: No problems found

Plugins:
+ measurement (35405)
+ utilsplugin2 (35487)

Last errors/warnings:
- E: Region [TMS_BLOCK_v2] : Failure getting from disk, key = Esri World Imagery (Clarity) Beta:https://clarity.maptiles.arcgis.com/arcgis/rest/services/World_Imagery/MapServer/tile/{zoom}/{y}/{x}/15/17179/11555
- E: Region [TMS_BLOCK_v2] : Failure getting from disk, key = Esri World Imagery (Clarity) Beta:https://clarity.maptiles.arcgis.com/arcgis/rest/services/World_Imagery/MapServer/tile/{zoom}/{y}/{x}/14/8589/5777
- W: java.net.UnknownHostException: clarity.maptiles.arcgis.com
- W: Already here java.net.UnknownHostException: clarity.maptiles.arcgis.com
- W: java.net.UnknownHostException: clarity.maptiles.arcgis.com
- E: Region [TMS_BLOCK_v2] : Failure getting from disk, key = Esri World Imagery (Clarity) Beta:https://clarity.maptiles.arcgis.com/arcgis/rest/services/World_Imagery/MapServer/tile/{zoom}/{y}/{x}/15/17178/11555
- W: Already here java.net.UnknownHostException: clarity.maptiles.arcgis.com
- W: java.net.UnknownHostException: clarity.maptiles.arcgis.com
- W: Already here java.net.UnknownHostException: clarity.maptiles.arcgis.com
- W: Already here java.net.UnknownHostException: clarity.maptiles.arcgis.com

Attachments (1)

Screenshot from 2020-07-10 17-15-06.png (109.9 KB ) - added by matthijs 4 years ago.
Screenshot of popup menu where a new option is suggested

Download all attachments as: .zip

Change History (11)

comment:1 by skyper, 4 years ago

Keywords: zoom layer added
Owner: changed from team to matthijs
Status: newneedinfo

You are talking about the relation editor, right?

Please, describe in more details your problem. A screenshot could help, too. Thanks

Note Zoom to layer for mapview and additional actions Zoom to previous, Zoom to next and Zoom to download with their cycles.

by matthijs, 4 years ago

Screenshot of popup menu where a new option is suggested

comment:2 by matthijs, 4 years ago

You are talking about the relation editor, right?

No, the layers dialog in the main window.

Note Zoom to layer for mapview and additional actions Zoom to previous, Zoom to next and Zoom to download with their cycles.

Aha, "View > Zoom to layer" is pretty much exactly what I needed. It's also in a fairly logical place, not sure why I missed that.

Still, it might be worth to consider adding a "Zoom to layer" option to the data layer popup menu, e.g. in this menu: https://josm.openstreetmap.de/attachment/ticket/19510/Screenshot%20from%202020-07-10%2017-15-06.png

comment:3 by Klumbumbus, 4 years ago

Description: modified (diff)
Owner: changed from matthijs to team
Status: needinfonew
Summary: Add "Zoom to layer" optionAdd "Zoom to layer" in context menu of layers in the Layers panel

in reply to:  2 comment:4 by skyper, 4 years ago

Replying to Matthijs Kooijman <matthijs@…>:


Still, it might be worth to consider adding a "Zoom to layer" option to the data layer popup menu, e.g. in this menu: https://josm.openstreetmap.de/attachment/ticket/19510/Screenshot%20from%202020-07-10%2017-15-06.png

Ok but note again, that you can change active layers by left click in the front of the Layer List panel and shortcuts Shift+S followed by [1–0A-Z] exist, too. Simply try Shift+S and wait a few seconds.

comment:5 by Klumbumbus, 4 years ago

You don't even need to make the layer active. Just select it in the list (left click) and hit shortcut "2".

comment:6 by matthijs, 4 years ago

Ok but note again, that you can change active layers by left click in the front of the Layer List panel and shortcuts Shift+S followed by [1–0A-Z] exist, too. Simply try Shift+S and wait a few seconds.

Thanks, those are indeed useful (but I myself have enough ways to handle this now).

However, I'm suggesting adding an option in a place where it will be easily found by new users (IOW, in the place where I had expected it, others might look for it in the same place), which could make things easier for other users.

OTOH, it's just a suggestion and if you want to close this as wontfix, that's also fine (which would make sense, since the feature is actually present and also documented, looking back it I think if I would just have googled "JOSM zoom to layer", I would have found the right UI and could have avoided creating this ticket in the first place, so maybe I've been a bit to eager to suggest a new feature...).

comment:7 by simon04, 4 years ago

Resolution: fixed
Status: newclosed

In 16967/josm:

fix #19510 - Add "Zoom to layer" in context menu of layers in the Layers panel

comment:8 by simon04, 4 years ago

Milestone: 20.08

comment:9 by simon04, 4 years ago

In 16969/josm:

see #19510 - Fix unit tests

comment:10 by matthijs, 4 years ago

With #19735 fixed, I finally managed to test this. Looks good, works great, thanks for picking this up!

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain team.
as The resolution will be set.
The resolution will be deleted. Next status will be 'reopened'.

Add Comment


E-mail address and name can be saved in the Preferences .
 
Note: See TracTickets for help on using tickets.