Opened 10 years ago

Closed 10 years ago

Last modified 10 years ago

#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:


The list of "built-in functions" in the MapCSS specification is VERY basic: . 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 bastiK, 10 years ago

Resolution: fixed
Status: newclosed

In 7162/josm:

fixes #10061 - mapcss eval: deprecate use of length() for lists, use new function count() instead

comment:2 by Don-vip, 10 years ago

Milestone: 14.05

Modify Ticket

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