Modify

Opened 7 years ago

Closed 7 years ago

Last modified 7 years ago

#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 Don-vip)

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)

maxspeed offset y wrong.PNG (104.2 KB ) - added by Allroads 7 years ago.
maxspeed short section.PNG (767.9 KB ) - added by Allroads 7 years ago.
maxspeed short section2 z19.PNG (559.8 KB ) - added by Allroads 7 years ago.
maxspeed short section3 unchecked.PNG (485.1 KB ) - added by Allroads 7 years ago.
maxspeed short section3 uncheckedz19.PNG (677.2 KB ) - added by Allroads 7 years ago.

Change History (20)

by Allroads, 7 years ago

Attachment: maxspeed offset y wrong.PNG added

comment:1 by Klumbumbus, 7 years ago

Keywords: regression added
Milestone: 17.07

regression, this was working once (see Styles/Surface)

Last edited 7 years ago by Klumbumbus (previous) (diff)

comment:2 by bastiK, 7 years ago

In 12465/josm:

see #15006 - new MapCSSRendererTest test case for text along way

comment:3 by bastiK, 7 years ago

Cc: michael2402 added

Regression of [11748].

comment:4 by Don-vip, 7 years ago

Description: modified (diff)

comment:5 by michael2402, 7 years ago

Resolution: fixed
Status: newclosed

In 12476/josm:

Fix #15006: Separate offset handling for ways, areas and node. Handle offset for all three of them.

comment:6 by michael2402, 7 years ago

In 12477/josm:

See #15006: Fix sign issue (wrong direction) for text-offset-y on ways/areas

comment:7 by Don-vip, 7 years ago

In 12481/josm:

see #15006 - fix javadoc warnings

comment:8 by Allroads, 7 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 Klumbumbus, 7 years ago

Resolution: fixed
Status: closedreopened

comment:10 by Allroads, 7 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;
}


Last edited 7 years ago by Allroads (previous) (diff)

by Allroads, 7 years ago

Attachment: maxspeed short section.PNG added

by Allroads, 7 years ago

comment:11 by michael2402, 7 years ago

Owner: changed from team to michael2402
Status: reopenednew

Thanks, I'll have a look at it.

comment:12 by Allroads, 7 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

Last edited 7 years ago by Allroads (previous) (diff)

by Allroads, 7 years ago

comment:13 by michael2402, 7 years ago

Resolution: fixed
Status: newclosed

In 12506/josm:

Fix #15006: Make text-offset-y work on long line segments.

comment:14 by Allroads, 7 years ago

Thanks working !!

Also nothing to do with my style.

comment:15 by michael2402, 7 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 ;-)

Modify Ticket

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