﻿id	summary	reporter	owner	description	type	status	priority	milestone	component	version	resolution	keywords	cc
7151	MapCSS: support multiple relations per child selector	ikonor	team	"Based on the [[http://josm.openstreetmap.de/wiki/Styles/Osmc|""Osmc hiking""]] style for SK/CZ I tried to build a more general hiking style for the osmc:symbol tag (hiking-current.mapcss). But currently child selectors are restricted to execute the rule declaration for the first matching relation only. This allows only limited and very verbose styles with lots of repetitions.

To demonstrate what I am trying to achieve, I attached a more generic MapCSS style (hiking-demo.mapcss) along with a patch (hiking-demo.patch) to specifically support that style by changing the current behaviour for relation child selectors and adding a few functions. The patch is just a throw-away hack and not intended to be commited. For sample map data you could use ![1].

Based on this demo I would like to request the following features:

1. allow declaration execution for all matching parents of a child selector
  For example by introducing a new selector type "">>"":
  {{{
  relation[route=foot] >  way { /* executes only once for first matching relation */ }
  relation[route=foot] >> way { /* executes for all matching relations */ }
  }}}
  (To avoid properties being overwritten on multiple executions, the demo creates ""dynamic"" layers by adding an execution index to the layer name. But this prevents access to common properties across those dynamic layers, the demo workaround is to set (set_prop function) and read properties of a different layer) 

2. setting cross-layer (global) properties/tags \\
  Allow properties/tags, e.g. a counter, to be set and shared from different layers (demo: set_prop function). Implementing MapCSS/0.2 ""set"" instruction would solve this by setting a temporary/transient tag on the object that could then be used in all declarations and selectors.

3. shield (MapCSS/0.2) \\
  Shields for ways, e.g. for hiking symbols, road or public transport refs. Ideally with automatic placement for multiple shields per way, or simply with an offset property (demo uses icon and symbol on the middle node of a way, but only one due to missing offset property).

4. regex function \\
  Regular expressions in declarations with capturing group(s).

5. color text function or auto-conversion \\
  to set a color text (e.g. ""blue"") as a result of an eval.

\\
![1] [http://open.mapquestapi.com/xapi/api/0.6/map?bbox=9.397414,47.722764,9.442046,47.74649]"	enhancement	new	normal		Core mappaint				imagic plepe
