[Mapcss] Rule for a identifying road who is member of more than one route=road relation

Paul Hartmann phaaurlt at gmail.com
Thu Jul 17 05:56:40 UTC 2014


On 16.07.2014 23:29, Lists wrote:
> Hi
>
> I am looking for a rule for roads who are member of more than one route=road relation.

It is not explicitly stated in the specification, but it should be 
possible to specify more than one class like so:

relation[route=road][network=BR] > way {
     set federal_highway;
}
relation[route=road][network="BR:ES"] > way {
     set state_highway;
}
way.federal_highway.state_highway {
	color: red;
	casing-color: green;
}

This depends of course on the renderer you are using and if it supports 
multiple classes. Alternatively you could try the following:

relation[route=road][network=BR] > way {
     set federal_highway;
}
relation[route=road][network="BR:ES"] > way.federal_highway {
	color: red;
	casing-color: green;
}

Best, Paul




More information about the Mapcss mailing list