Opened 10 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 , 10 years ago
Cc: | added |
---|
comment:2 by , 10 years ago
Component: | Core → Core mappaint |
---|
follow-ups: 4 5 comment:3 by , 9 years ago
Cc: | added |
---|
comment:4 by , 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
comment:5 by , 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; } }
text-offset
/text-offset-y
is only used:So in my opinion it's not too late for a harmonization.