Modify

Opened 4 years ago

Last modified 14 months ago

#3016 new defect

Zoom limitations

Reported by: avar Owned by: team
Priority: minor Component: Core
Version: tested Keywords: zoom
Cc: karl.guggisberg@…

Description (last modified by xeen)

Under r1816 I can:

  1. Open JoSM
  2. Create a new document with C-n
  3. Click around with the drawing tool to create new nodes

All of the nodes I'm creating will be added at lat/lon 0.0, furthermore I can't see them as I'm drawing them nor the lines between them (the only hint is the updated selection dialog).

I also can't scroll the mouse wheel to zoom in/out. Nor does the lat/lon display at the bottom of the screen update from 0.0/0.0. But I can grab the zoom adjuster and zoom out that way.

This also has nothing to do with my preferences since JOSM does the same thing once I move my preferences file elsewhere.

<?xml version='1.0' encoding='UTF-8'?>
<osm version='0.6' generator='JOSM'>
  <node id='-1' visible='true' lat='0.0' lon='0.0' />
  <node id='-2' visible='true' lat='0.0' lon='0.0' />
  <node id='-3' visible='true' lat='0.0' lon='0.0' />
  <node id='-4' visible='true' lat='0.0' lon='0.0' />
  <node id='-5' visible='true' lat='0.0' lon='0.0' />
  <way id='-6' action='modify' visible='true'>
    <nd ref='-1' />
    <nd ref='-2' />
    <nd ref='-3' />
    <nd ref='-4' />
    <nd ref='-5' />
  </way>
</osm>

Attachments (2)

scale.patch (580 bytes) - added by landwirt@… 4 years ago.
set initial scale
wrong_deefault_zoom.patch (13.1 KB) - added by xeen 4 years ago.
Adds a default zoom level method for each projection. The center is derived from the world bounds, this is why it doesn't (yet) work with Lambert projections. The comment says we do not handle handle coordinates outside the boundaries correctly, but doesn't go into further detail.

Download all attachments as: .zip

Change History (18)

comment:1 Changed 4 years ago by avar

  • Priority changed from critical to blocker

I tested this with josm-tested.jar (r1788) where the bug didn't occur but it does happen in HEAD.

Marking this as a release blocker. JOSM versions with this bug are likely to upload corrupt data do the server.

comment:2 Changed 4 years ago by Gubaer

  • Cc karl.guggisberg@… added
  • Owner changed from team to stoeckr

Hmm, can't find it. Dirk? Any hint?

comment:3 follow-up: Changed 4 years ago by stoecker

  • Priority changed from blocker to major
  • Summary changed from JOSM produces nodes with lat/lon 0.0 when I create a new OSM document to Zoom limitations

Press <STRG>-<N> after josm Start.

The reason is that such a new datalayer is deep-zoomed and scroll-wheel zooming does help to get out. The accuracy of variables is not high enought to have any effect.

Fix: Prevent to deep zoom as well as zooming out of the world in NavigatableComponent.

  • Deepzoom: Maxzoomdepth = 0.1m
  • Maxzoom: Whole world could be visible
  • Zooming should not allow to zoom to positions outside of world

Remove the blocker as this affects only new layers which anyway should not be used for uploading anything.

comment:4 in reply to: ↑ 3 Changed 4 years ago by anonymous

Replying to stoecker:

Press <STRG>-<N> after josm Start.

The reason is that such a new datalayer is deep-zoomed and scroll-wheel zooming does help to get out. The accuracy of variables is not high enought to have any effect.

Fix: Prevent to deep zoom as well as zooming out of the world in NavigatableComponent.

  • Deepzoom: Maxzoomdepth = 0.1m
  • Maxzoom: Whole world could be visible
  • Zooming should not allow to zoom to positions outside of world

Remove the blocker as this affects only new layers which anyway should not be used for uploading anything.

They should not, but I had in mind the inexperienced user who might create a new layer, try to edit something, not notice any changes and then discovering the download button and not choosing "Download in a new layer". That would result 0.0/0.0 nodes uploaded to the server.

comment:5 follow-ups: Changed 4 years ago by stoecker

  • Resolution set to fixed
  • Status changed from new to closed

Fixed in r1815 (I believe). Anyway is fixed now. No more deep zoom possible.

comment:6 in reply to: ↑ 5 Changed 4 years ago by anonymous

  • Resolution fixed deleted
  • Status changed from closed to reopened

Replying to stoecker:

Fixed in r1815 (I believe). Anyway is fixed now. No more deep zoom possible.

When I open a new document in r1859 I get the exact same behavior described when I originally opened this bug report.

comment:7 Changed 4 years ago by plaicy

see also #3204

comment:8 in reply to: ↑ 5 Changed 4 years ago by vsandre

  • Version changed from latest to tested

Replying to stoecker:

Fixed in r1815 (I believe). Anyway is fixed now. No more deep zoom possible.

You are right, you could not do a deep zoom yourself. But when starting josm it seems that the bbox is not set and so you starts in the deep zoom. The next Problem is that the zoom slider is in the middle position instead of being in the right. Zooming out once and you never get in the deep zoom back.

Changed 4 years ago by landwirt@…

set initial scale

comment:9 Changed 4 years ago by anonymous

  • Summary changed from Zoom limitations to [patch] Zoom limitations

Till a proper fix arrives, just set an initial value for new layers, as mentioned in #3204.

comment:10 Changed 4 years ago by xeen

  • Owner changed from stoeckr to xeen
  • Status changed from reopened to new

Setting an initial scale only works for some projections. I'm still investigating a proper way to let each projection specify their own default center and zoom level, but I ran into NPEs that I suspect arise from some code parts being static (haven't found exact issue yet).

Also, fixing this is merely a minor issue, I only ever used new layers for testing. It's certainly not something the non-developer mapper will run into.

comment:11 Changed 4 years ago by anonymous

  • Priority changed from major to minor
  • Summary changed from [patch] Zoom limitations to Zoom limitations

comment:12 Changed 4 years ago by vsandre

  • Keywords zoom added

See also #3326

Changed 4 years ago by xeen

Adds a default zoom level method for each projection. The center is derived from the world bounds, this is why it doesn't (yet) work with Lambert projections. The comment says we do not handle handle coordinates outside the boundaries correctly, but doesn't go into further detail.

comment:13 Changed 4 years ago by xeen

  • Summary changed from Zoom limitations to [patch?] Zoom limitations

comment:14 Changed 4 years ago by stoecker

(In [2114]) see #3016 - patch by xeen - fixes some zooming issues

comment:15 Changed 4 years ago by stoecker

  • Summary changed from [patch?] Zoom limitations to Zoom limitations

Well, probably not the best solution, but applied anyway. But I don't think the bug is closed yet. There are still other issues regarding e.g. switching projections when the switching moves center out of world.

Regarding coordinates outside the world: Nobody knows what these will be handled like. The projection code may work or it may produce invalid results. Currently JOSM ignores these problems totally. I have a method in mind to fix this - Move the outlying nodes near the next border and draw them there. Each projection should have a method to "FIX" outlying coordinates in some way for proper display.

comment:16 Changed 14 months ago by xeen

  • Description modified (diff)
  • Owner changed from xeen to team

Add Comment

Modify Ticket

Change Properties
<Author field>
Action
as new .
as The resolution will be set. Next status will be 'closed'.
to The owner will be changed from team. Next status will be 'new'.
Next status will be 'needinfo'.The owner will change to avar
as duplicate The resolution will be set to duplicate. Next status will be 'closed'.The specified ticket will be cross-referenced with this ticket
The owner will be changed from team to anonymous. Next status will be 'assigned'.
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.