Talk:MapCSS/0.2/eval

From OpenStreetMap Wiki
Jump to navigation Jump to search

I'm still struggling on deadline but on balance I like the idea that the user shouldn't have to worry about types - i.e. the type is inferred from the value, so "6"+2=8 or "8". Because OSM tags aren't typed (and therefore everything is a string) this makes life much easier for the user.

That pretty much means that we have to use . rather than + to concatenate strings, so yes, I'm good with that.

Will look in closer detail later. --Richard 09:41, 25 June 2010 (UTC)

dealing with list

Is it possible to deal with list of values? For example extract values from a ";" delimited list, create a string of values from a list with custom delimiter, choose certain element in a list, check if value "x" is in a list, etc. For example I would like to make a human readable text in a pop-up, based on the values in cuisine on restaurant nodes, or render restaurant with a different symbol if cuisine contains "japonese". --Skippern (talk) 01:53, 30 June 2014 (UTC)

Currently the MapCSS standard does not define lists. JOSM and pgmapcss do define lists, although there are some incompatibilities. I just created a proposal to extend the MapCSS standard by a list selector and a couple of eval functions. Maybe you can have a look and see what you think of this extension. -- Skunk (talk) 19:52, 30 June 2014 (UTC)