Modify

Opened 9 years ago

Last modified 8 years ago

#7887 new enhancement

unobtrusive node squares and black on white servers issue

Reported by: A_Pirard Owned by: team
Priority: normal Milestone:
Component: Core Version: latest
Keywords: Cc: A_Pirard

Description (last modified by A_Pirard)

When displaying at a low zoom level, all you see, especially of towns, is yellow swarms of what will be squares after substantial zooming in. Something could be done so that ways are shown instead, as a guide of where to zoom in, and even a tidier view when zoomed in.

Suggestions:

  • not display squares below a user configurable low zoom level (one you never edit with but use to find your way)
  • or/and not display a square at all when it's obvious there is one (at a sharp angle, esp. building corner)
  • - unless it's not standard (color), either node or path is selected, the mouse hovers over node or path, ...

Update: solved with CSS as described in comment 11.
But a new issue raised for displaying black on white servers, see same comment.

Attachments (0)

Change History (11)

comment:1 Changed 9 years ago by AlfonZ

It is possible to hide all node squares using custom MapCSS style, e.g.

canvas { default-points: false; }

I didn't manage to specify zoom levels for it though.

comment:2 Changed 8 years ago by A_Pirard

Description: modified (diff)
Type: defectenhancement
Version: latest

comment:3 Changed 8 years ago by A_Pirard

I have found our dream @ https://dl.dropbox.com/u/8010189/Forum%20attachments/Hide_nodes.mapcss
off Hide Nodes @ http://josm.openstreetmap.de/wiki/Styles
There remain two problems for comfortable, precise editing at high zoom

  • make the cross in the middle of a way more visible
  • prevent the cursor turning to a hand that's hiding the dot it's moving

(if we grab a node and start moving it, there's no need for a hand to show what we already know).

We'll make it :-)

comment:4 Changed 8 years ago by stoecker

make the cross in the middle of a way more visible

There should be a hidden setting to define its size. I suggest to search for "virtual" in expert settings.

comment:5 Changed 8 years ago by A_Pirard

There should be a hidden setting to define its size. I suggest to search
for "virtual" in expert settings.

Right, thanks Dirk, mappaint.node.virtual-size=8.
But in fact, I see that the problem is more the color than the size.
On black, the yellow cross is visible all-right.
But on a white background, it's almost invisible whatever its size.
As it's a general issue with that background, the best idea is to change it.
Getting it transparent is not a solution, its black lines wouldn't show on black.
Only thing to do is to invert all the background colors.
This would solve all the color problems sort of by definition.
I found this:

invert colors

*::* {

color: eval(rgb(1 - red(prop(color)), 1 - green(prop(color)), 1 - blue(prop(color))));
fill-color: eval(rgb(1 - red(prop(fill-color)), 1 - green(prop(fill-color)), 1 - blue(prop(fill-color))));

}
But it inverts the foreground OSM layer.
Anything similar for the background?

comment:6 Changed 8 years ago by stoecker

Color is also configurable. Go to color settings.

comment:7 Changed 8 years ago by bastiK

To change the background color in the style, write this:

canvas {
    background-color: #ffffea;
}

(see http://josm.openstreetmap.de/wiki/Help/Styles/MapCSSImplementation)

comment:8 Changed 8 years ago by A_Pirard

Thanks for your replies.
The problem is that that particular WMS server uses a white background. Its colors are chosen to contrast with white and JOSM colors to contrast with black. Hence, some of the JOSM objects, e.g. yellow cross-hair, display badly on the server's white background. Yes I know I can change JOSM's background color, but the JOSM's background does not display when the WMS server is displayed.
Changing OSM elements colors to display on white doesn't help either. They would display badly on the other backgrounds.
What is needed is inverting the colors of the server so that its background will be black and both its inverted colors and JOSM colors will display nicely.
The best I could do before writing here is getting the server background transparent and changing JOSM background to some shade of gray that does not clash with the many JOSM colors nor with one of the server.
That's a difficult choice compared with the guaranteed result when inverting the server colors.

comment:9 Changed 8 years ago by stoecker

There is a plugin which allows to have multiple color sets. Maybe that helps you.

comment:10 Changed 8 years ago by skyper

I also find wire frame mode very useful when drawing from imageries.

comment:11 Changed 8 years ago by A_Pirard

Description: modified (diff)
Summary: unobtrusive node squaresunobtrusive node squares and black on white servers issue

Wireframe view is nice, but in this particular case, the dotted lines of standard JOSM let me see in the gaps the line I have to map and attain an extraordinary precision (hoping that the trace itself is precise).

I have solved the square sizes this way (copied without tuning from wiki/Styles, thanks Felis) :
node|z1-16
{ symbol-shape: square; symbol-fill-opacity: 0; symbol-size: 1; z-index:-1}
node|z17-

{ symbol-shape: square; symbol-stroke-color: navy; symbol-fill-color: rosybrown; symbol-size:8; z-index:1}

The other problem that emerged is that the WMS server is designed for black (and colors) on white but that JOSM is designed for white (and colors) on black. Hence the black lines from the server are invisible on black and some colors are hardly visible. I have partially solved this problem as follows:

canvas { background-color: #404040; }
together with setting the server's background transparent.

My WMS colors are OK but one. Whichever shade of gray I choose, there will always be some standard JOSM colors that will display less than optimally. (And, BTW, I wonder how the lines JOSM chooses to be black are supposed to display).

The 'invert colors' CSS here above is in fact tweaking the JOSM color channels.
If a similar CSS could be applied to a particular server source, that would be the best way to improve the server display on black or gray while trying to keep its natural colors.
In fact, it's not a matter of color but of intensity: only the least intense tones must change.

Another possibly easy modification would be to extend the opacity slider to negative numbers, for which the server colors would be inverted. This would certainly solve the visibility issue amusingly, but would not keep the server's natural colors (yellow rivers and red forests). Unless the slider did not invert the colors but tweak the least intense tones again.

This might be brought to the attention of the CSS development.
Thanks for your attention.

Modify Ticket

Change Properties
Set your email in Preferences
Action
as new The owner will remain team.
as The resolution will be set.
to The owner will be changed from team to the specified user.
The owner will change to A_Pirard
as duplicate The resolution will be set to duplicate.The specified ticket will be cross-referenced with this ticket
The owner will be changed from team to anonymous.

Add Comment


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

 
Note: See TracTickets for help on using tickets.