Modify

Opened 4 years ago

Last modified 3 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 Changed 4 years ago by Klumbumbus

Cc: Klumbumbus added

comment:2 Changed 4 years ago by Don-vip

Component: CoreCore mappaint

comment:3 Changed 3 years ago by simon04

Cc: bastiK plepe added

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

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

comment:4 in reply to:  3 Changed 3 years ago by Klumbumbus

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

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

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.
to The owner will be changed from team to the specified user.
The owner will change to rurseekatze
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.