[Mapcss] Example for "set"
Aun Johnsen
lists at gimnechiske.org
Fri May 12 14:29:20 UTC 2017
Bjørn
I have used { set .minor_road } a lot in a paint style I use in JOSM, and I have plans for the same in Mapnik via pgmapcss, but until now have not have had opportunity to actually test it with pgmacss
Quick example:
way[highway=trunk] {
color: red;
set .trunk_road;
}
way.trunk_road {
width: 10;
}
I hope pgmapcss accepts { set tag=value; } as I can see its uses in a rendering, (setting default values where values are missing, etc), but this is for obvious reasons discouraged in an editor such as JOSM.
Aun Johnsen
> On May 11, 2017, at 21:05, Bjoern Hassler <bjohas+mw at gmail.com> wrote:
>
> Hello all,
>
> Would somebody be able to give an example, ideally in overpass-turbo, for the following:
>
> Declarations may also be used to set the value of certain tags on an object:
> { set tag=value; } /* set a tag */
> { set tag; } /* set a tag to 'yes' */
>
> and
>
> You can set tags beginning with a full-stop to simulate classes:
> { set .minor_road; }
> You can then use the .minor_road test (as above) in the selector:
> way.minor_road
>
> It's not really clear to me how these work. See also here
> https://wiki.openstreetmap.org/wiki/Talk:MapCSS/0.2#Example_for_.22set.22 <https://wiki.openstreetmap.org/wiki/Talk:MapCSS/0.2#Example_for_.22set.22>
> if you prefer to answer on the wiki!
>
> Many thanks!
> Bjoern
> _______________________________________________
> Mapcss mailing list
> Mapcss at openstreetmap.org
> https://lists.openstreetmap.org/listinfo/mapcss
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/mapcss/attachments/20170512/8680e7ea/attachment.html>
More information about the Mapcss
mailing list