Modify

Opened 9 years ago

Last modified 9 years ago

#11796 new defect

MapCSS text-offset implementation not compatible to MapCSS specification

Reported by: rurseekatze Owned by: team
Priority: normal Milestone:
Component: Core mappaint Version:
Keywords: MapCSS Cc: Klumbumbus, bastiK, plepe

Description

The description of the JOSM MapCSS implementation (https://josm.openstreetmap.de/wiki/Help/Styles/MapCSSImplementation) says that positive values for "text-offset" shift the text in upwards direction. But the MapCSS specification (http://wiki.openstreetmap.org/wiki/MapCSS/0.2) defines that positive values shift the text in downwards direction.

That means that the JOSM implementation is not compatible to the specification. So it is very difficult to use MapCSS stylesheets with different applications. Other tools like KothicJS or pgmapcss are compatible to the specification.

Attachments (0)

Change History (5)

comment:1 by Klumbumbus, 9 years ago

Cc: Klumbumbus added

comment:2 by Don-vip, 9 years ago

Component: CoreCore mappaint

comment:3 by simon04, 9 years ago

Cc: bastiK plepe added

text-offset/text-offset-y is only used:

So in my opinion it's not too late for a harmonization.

in reply to:  3 comment:4 by Klumbumbus, 9 years ago

Replying to simon04:

So in my opinion it's not too late for a harmonization.

Yes, however there are some more styles, see https://josm.openstreetmap.de/search?wiki=on&q=text-offset&page=1&noquickjump=1

in reply to:  3 comment:5 by bastiK, 9 years ago

Replying to simon04:

how does Potlatch interpret the sign?)

Like in the specification.

Note that text-offset is also used for text along line. There it moves the text in an upwards direction, which is the same in the specification, PL2 and JOSM implementation.

To change text-offset for nodes, we can finally make use of @supports. :)

node[amenity=library] {
    text-offset:10;
}

@supports (max-josm-version: 9999) {
    node[amenity=library] {
        text-offset:-10;
    }
}

Modify Ticket

Change Properties
Set your email in Preferences
Action
as new The owner will remain team.
as The resolution will be set. Next status will be 'closed'.
to The owner will be changed from team to the specified user.
Next status will be 'needinfo'. The owner will be changed from team to rurseekatze.
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'.

Add Comment


E-mail address and name can be saved in the Preferences .
 
Note: See TracTickets for help on using tickets.