#10061 closed enhancement (fixed)
MapCSS: eval function length()
Reported by: | plepe | Owned by: | team |
---|---|---|---|
Priority: | normal | Milestone: | 14.05 |
Component: | Core mappaint | Version: | |
Keywords: | Cc: |
Description
The list of "built-in functions" in the MapCSS specification is VERY basic: wiki.openstreetmap.org/wiki/MapCSS/0.2/eval . Maybe it would be a good idea to create a list of common functions soon, maybe based on the JOSM function list (which seems rather well thought of).
Anyway, there's one function which bothers me: length().
According to the MapCSS eval() specification all data types are represented as strings. I followed this rule in pgmapcss, although I don't think this is really necessary for implementations and might be something that could change. pgmapcss follows this rule though and also implements most of JOSM's functions. In pgmapcss lists are represented as ";"-separated strings, e.g. "kebap;burger;pizza".
Now the real problem is, that in JOSM "length()" either returns the string's character length OR the length of a list. pgmapcss uses "count()" as length of the list instead.
Would it be possible to rename length() for lists to count()?
Attachments (0)
Change History (2)
comment:1 by , 11 years ago
Resolution: | → fixed |
---|---|
Status: | new → closed |
comment:2 by , 11 years ago
Milestone: | → 14.05 |
---|
In 7162/josm: