Modify

Opened 16 years ago

Closed 15 years ago

Last modified 15 years ago

#1461 closed enhancement (fixed)

[PATCH] Initial zoom to bounding box instead of downloaded data borders

Reported by: ed@… Owned by: framm
Priority: minor Milestone:
Component: Core Version: latest
Keywords: Cc:

Description

If I get the data for the area around here (51.76 1.0 -> 51.95 1.3) then there is a trace for the ferry route across to Holland. Ideally I'd like the initial view to default to the "yellow box" area, rather than whole data area/layer area, which represents the bounds I specified. At present I have to zoom into it. It's just a bit of an annoyance.

Attachments (3)

ZoomToBoundingBoxInsteadOfData_patch.txt (27.4 KB ) - added by jpstotz 16 years ago.
Changes: Zoom to bounding box, applied JOSM source code style and additional minor manual style changes.
ZoomToBoundingBoxInsteadOfData_patch.2.txt (3.4 KB ) - added by jpstotz 16 years ago.
Rewritten patch without foratting changes
ZoomToBoundingBoxInsteadOfData_patch.3.txt (2.5 KB ) - added by Andre68 15 years ago.
This modified patch works with rev. 1013 and has correct indentation

Download all attachments as: .zip

Change History (13)

comment:1 by anonymous, 16 years ago

Summary: Annoying tracksInitial zoom to bounding box instead of downloaded data borders

comment:2 by Andre68, 16 years ago

I also would like to have this option.
Question is: What to do, if there is more than one bounding box?
Possible solution: Zoom to a "virtual" bounding box which enfolds all bounding boxes

comment:3 by jpstotz, 16 years ago

Personally I think we don't have to worry about multiple bounding boxes at the moment as the "initial zoom" is only applied on the first download (no OSM layer exists). Subsequent load operation do not affect map center or zoom.
I already tried to figure out where the logic of this initial zoom is located in the JOSM source but until now I wasn't successful.

comment:4 by jpstotz, 16 years ago

Heureka, I finnally found the place where it zooms to the data - and wrote a workaround (see attached patch).

by jpstotz, 16 years ago

Changes: Zoom to bounding box, applied JOSM source code style and additional minor manual style changes.

comment:5 by jpstotz, 16 years ago

Summary: Initial zoom to bounding box instead of downloaded data borders[PATCH] Initial zoom to bounding box instead of downloaded data borders

comment:6 by stoecker, 16 years ago

Please don't make patches which contain formating changes. At least not if you want them to be applied. I cannot check what this patch really does without a lot of work, so I myself will not apply it.

by jpstotz, 16 years ago

Rewritten patch without foratting changes

in reply to:  6 comment:7 by jpstotz, 16 years ago

Please don't make patches which contain formating changes.

Ok, please see my rewritten patch - it is now clearly readable in a text editor.

by Andre68, 15 years ago

This modified patch works with rev. 1013 and has correct indentation

comment:8 by anonymous, 15 years ago

I just tested the patch and as far as I can see, it works fine.
Also tried with files without bounding box. It zooms to data then, which is fine.

What I'd like to see now is a possibility to zoom to the bounding box via the menu. Question is: what to do, if there is more than one layer. Best would be to have two choices:

1.) Zoom to overall bounding box(es)
2.) Zoom to layer bounding box(es)

in reply to:  8 comment:9 by Henry Loenwind, 15 years ago

Replying to anonymous:

Question is: what to do, if there is more than one layer.

Or one layer with multiple bounding boxes...

comment:10 by anonymous, 15 years ago

Resolution: fixed
Status: newclosed

Fixed in r1022.

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain framm.
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.