#15006 closed defect (fixed)
Way, text-offset-y is not working
Reported by: | Allroads | Owned by: | michael2402 |
---|---|---|---|
Priority: | normal | Milestone: | 17.07 |
Component: | Core mappaint | Version: | latest |
Keywords: | text offset regression | Cc: | michael2402 |
Description (last modified by )
I want the maxspeed number just above the way name.
Is not working.
way|z18-[highway][maxspeed]::access_maxspeed_waylayer { font-family: "DejaVu Sans Book"; font-size: 12; text: "maxspeed"; text-color: #ffff00; text-offset-y: 100; text-halo-color: #262626; text-halo-opacity: 0.8 ; text-halo-radius: 1.5; }
But also with text offset it is not working.
way|z18-[highway][maxspeed]::access_maxspeed_waylayer { font-family: "DejaVu Sans Book"; font-size: 12; text: "maxspeed"; text-color: #ffff00; text-offset: 30; text-halo-color: #262626; text-halo-opacity: 0.8 ; text-halo-radius: 1.5; }
Attachments (5)
Change History (20)
by , 8 years ago
Attachment: | maxspeed offset y wrong.PNG added |
---|
comment:1 by , 8 years ago
Keywords: | regression added |
---|---|
Milestone: | → 17.07 |
comment:4 by , 8 years ago
Description: | modified (diff) |
---|
comment:8 by , 8 years ago
In 12482/josm:
The maxspeed still looks the same as topicimage
30 did not change position.
used:
text-offset-y: 30;
and
text-offset: 30;
comment:9 by , 8 years ago
Resolution: | fixed |
---|---|
Status: | closed → reopened |
comment:10 by , 8 years ago
In 12504/josm:
The maxspeed number is not visible at all.
Correct myself, on some zoomlevel it is.
On z17 and z18 it is only visible on short sections.
At z19 it is not visible.
The short section is a traffic_calming=table
way|z17-[highway][maxspeed]::access_maxspeed_waylayer { font-family: "DejaVu Sans Book"; font-size: 12; text: "maxspeed"; text-color: #ffff00; text-offset: -30; text-halo-color: #262626; text-halo-opacity: 0.8 ; text-halo-radius: 1.5; }
by , 8 years ago
Attachment: | maxspeed short section.PNG added |
---|
by , 8 years ago
Attachment: | maxspeed short section2 z19.PNG added |
---|
comment:11 by , 8 years ago
Owner: | changed from | to
---|---|
Status: | reopened → new |
Thanks, I'll have a look at it.
comment:12 by , 8 years ago
I just have found that a other mapcss, this gives this odd behaviour not showing on big section.
Which is placed behind the mapstyle table in JOSM.
When I uncheck it, I get the maxspeed number on the line, but no offset.
But on the short section z19 it is now on the line
z17 and 18 it is -30 offset
Strange.
Not getting the finger behind the problem, what caused it.
{{{ /* ************************************* BICYCLE ONEWAY ************************************* */ /* ..WAY.. */ /* ..WAY SET REPEAT-IMAGE-PHASE.. */ /* The starting point of the repeat-image-phase is set in the access_waylayer */ /* ..WAY.. HIGHWAY..BOTH..DIRECTIONS.. */ way|z17-[highway]::bicycle_oneway_waylayer { repeat-image-phase: prop("repeat-image-phase", "access_waylayer"); } way|z17-[highway]::bicycle_oneway_fb-sign_waylayer { repeat-image-phase: prop("repeat-image-phase", "access_waylayer"); } way|z17-[highway]::bicycle_oneway_o-sign_waylayer { repeat-image-phase: prop("repeat-image-phase", "access_waylayer"); } way|z17-[highway]["oneway:bicycle"="yes"]::bicycle_oneway_waylayer { repeat-image: bicycle-white.svg; repeat-image-align: bottom; repeat-image-height: 15; repeat-image-offset: 12; repeat-image-phase: prop("repeat-image-phase") -75; repeat-image-spacing: 400; z-index: 98; } way|z17-[highway]["oneway:bicycle"="yes"]::bicycle_oneway_fb-sign_waylayer { repeat-image: fbsign-red.svg; repeat-image-align: bottom; repeat-image-height: 15; repeat-image-offset: 12; repeat-image-phase: prop("repeat-image-phase") -75; repeat-image-spacing: 400; z-index: 99; } way|z17-[highway]["oneway:bicycle"="yes"]::bicycle_oneway_o-sign_waylayer { repeat-image: oneway-lime.svg; repeat-image-align: bottom; repeat-image-height: 15; repeat-image-offset: 12; repeat-image-phase: prop("repeat-image-phase") -75; repeat-image-spacing: 400; z-index: 199; } }}}
Unchecked this mapcss
z18 and -30 offset on short section, big section maxspeed on line.
z19 both maxspeed on line
by , 8 years ago
Attachment: | maxspeed short section3 unchecked.PNG added |
---|
by , 8 years ago
Attachment: | maxspeed short section3 uncheckedz19.PNG added |
---|
comment:15 by , 8 years ago
Yes, your style was fine.
Our MapCSS-definition is not so good. Currently, we apply text-offset-y in the direction the text is written (facing up). The offset of the icons is applied relative to the way direction. And the two texts are not always written on top of each other, since the label position is computed for each of them independently. This is a problem that cannot easily be solved using MapCSS. But for basic cases, it should be usable ;-)
regression, this was working once (see Styles/Surface)