Modify

Opened 3 years ago

Closed 3 years ago

#12919 closed enhancement (fixed)

[PATCH] scale indicator regression

Reported by: dieterdreist Owned by: team
Priority: minor Milestone: 16.06
Component: Core Version: latest
Keywords: template_report, scale indicator, scale, digits Cc: michael2402, wiktorn

Description

Strictly, it is not an actual bug, but the readability of the scale indicator has become worse recently (I think). Please see the attached screenshots.

Generally I think this could be improved with very small effort, these are my suggestions:

  1. there should be no digits below 1 for scales above 1 m (e.g. "1 m" rather than "1.00 m").
  1. the alignment of the number to the "tick" should be centered on the number without the unit
  1. consider to have the unit only on the most rightern digit and not on the intermediate ones (presuming that all units are the same on the same scale)
  1. consider using less intermediate ticks in certain cases

Please provide any additional information below. Attach a screenshot if possible.

URL:http://josm.openstreetmap.de/svn/trunk
Repository:UUID: 0c6e7542-c601-0410-84e7-c038aed88b3b
Last:Changed Date: 2016-06-04 17:28:58 +0200 (Sat, 04 Jun 2016)
Build-Date:2016-06-04 15:31:27
Revision:10327
Relative:URL: ^/trunk

Identification: JOSM/1.5 (10327 en) Mac OS X 10.11.5
Memory Usage: 847 MB / 1820 MB (386 MB allocated, but free)
Java version: 1.8.0_66-b17, Oracle Corporation, Java HotSpot(TM) 64-Bit Server VM
VM arguments: [-Dsun.java2d.opengl=true]
Dataset consistency test: No problems found

Plugins:
- TombPlugin (46)
- alignways (32161)
- apache-commons (32158)
- apache-http (32158)
- buildings_tools (32158)
- ejml (32158)
- geochat (32158)
- geotools (31895)
- imagery_offset_db (32158)
- josm-geojson (31245)
- jts (31906)
- opendata (32158)
- print (32191)
- proj4j (32158)
- reltoolbox (32158)
- reverter (32158)
- undelete (32158)
- utilsplugin2 (32158)

Map paint styles:
- https://josm.openstreetmap.de/josmfile?page=Styles/Lane_and_Road_Attributes&zip=1
- https://josm.openstreetmap.de/josmfile?page=Styles/MaxspeedIcons&zip=1

Attachments (6)

Screen Shot 2016-06-06 at 10.07.16.png (5.4 KB) - added by dieterdreist 3 years ago.
scale1
Screen Shot 2016-06-06 at 10.07.28.png (5.3 KB) - added by dieterdreist 3 years ago.
scale2
Screen Shot 2016-06-06 at 10.07.39.png (4.9 KB) - added by dieterdreist 3 years ago.
scale3
patch-fix-12919.patch (3.8 KB) - added by michael2402 3 years ago.
12919-1.png (662 bytes) - added by michael2402 3 years ago.
12919-2.png (726 bytes) - added by michael2402 3 years ago.

Download all attachments as: .zip

Change History (17)

Changed 3 years ago by dieterdreist

scale1

Changed 3 years ago by dieterdreist

scale2

Changed 3 years ago by dieterdreist

scale3

comment:1 Changed 3 years ago by dieterdreist

sorry, am not logged in so I have to make additional explications here.
This is how the example pictures correlate with the comments/suggestions:

scale1+2: 1+2+3+4 (in particular: don't add long ticks when there is no text for them)
scale3: 1+2+3

comment:2 Changed 3 years ago by michael2402

Cc: michael2402 added
Milestone: 16.06

comment:3 Changed 3 years ago by michael2402

Currently, the long ticks are added at every full unit.

We can change the text to only be displayed on the last full tick, would this be fine?

Changed 3 years ago by michael2402

Attachment: patch-fix-12919.patch added

Changed 3 years ago by michael2402

Attachment: 12919-1.png added

Changed 3 years ago by michael2402

Attachment: 12919-2.png added

comment:4 Changed 3 years ago by michael2402

I changed it that way:



Is it better now?

Centering and text formatting is a bit more difficult. When doing this we should also introduce localization for the numbers - they are using US format at the moment.

comment:5 in reply to:  3 Changed 3 years ago by anonymous

Replying to michael2402:

Currently, the long ticks are added at every full unit.

We can change the text to only be displayed on the last full tick, would this be fine?

I think in case of more than 3 total long ticks there shouldn't be any short ticks, because it becomes too noisy.

comment:6 in reply to:  4 Changed 3 years ago by dieterdreist

Replying to michael2402:

I changed it that way:



Is it better now?

Centering and text formatting is a bit more difficult. When doing this we should also introduce localization for the numbers - they are using US format at the moment.

yes, this looks better now, I would also get rid of decimal fractions (ie. "400 m" rather than "400.0 m".

Maybe the centering problem can be solved by putting the unit only on the first number ("0 m"), position this zero "manually", and it will work automatically for the other number labels (as those won't have any units attached any more).

comment:7 Changed 3 years ago by michael2402

I'd like to keep the unit on the second number.

We would have to rework the SOM methods that convert numbers to strings to do this in a nice way - and to solve the problem with the trailing .0.

comment:8 Changed 3 years ago by dieterdreist

yes, unit on the second (/last) number seems better.

comment:9 Changed 3 years ago by Don-vip

Cc: wiktorn added
Summary: scale indicator regression[PATCH] scale indicator regression

@witkorn: what do you think, should we include the patch in the new release?

comment:10 in reply to:  9 Changed 3 years ago by anonymous

Replying to Don-vip:

@wiktorn: what do you think, should we include the patch in the new release?

I guess we can go with it.

comment:11 Changed 3 years ago by Don-vip

Resolution: fixed
Status: newclosed

In 10504/josm:

fix #12919 - scale indicator regression (patch by michael2402)

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.

Add Comment


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

 
Note: See TracTickets for help on using tickets.