⚫ Filters/selectors (what should be painted) ⚫ Scale dependencies (zoomed in, zoomed out?) ⚫ Symbolizers (how should it be painted) ⚫ Point ⚫ Line ⚫ Polygon ⚫ Text 5 FOSS4G 2019, August 26th/30th, Bucharest
styling standard ⚫ XML based, verbose, hard to hand edit ⚫ Was meant for machine export but ended up being edited a lot by hand ⚫ Autocomplete in the style editor ⚫ Can be generated by external tools and imported ⚫ However interoperability is limited ⚫ Often needs to be hand tweaked 6 FOSS4G 2019, August 26th/30th, Bucharest
⚫ Can define reusable variables and blocks ⚫ Verbosity it’s between SLD and CSS ⚫ Has a notion of zoom levels, if needed feature-styles: - rules: - filter: type = 'alpine_hut' scale: (,100000.0) symbolizers: - point: symbols: - external: url: symbols/alpinehut.p.16.png format: image/png 8 FOSS4G 2019, August 26th/30th, Bucharest
based filtering, rule nesting and cascading keeps complex styling compact (you just express the overrides to the base) ⚫ Autocomplete in the style editor ⚫ Does not get any more compact than this: ⚫ Cons: some are confused by “rule cascading” → can now be turned off [type = 'alpine_hut'][@sd < 100k] { mark: url('symbols/alpinehut.p.16.png'); } 9 FOSS4G 2019, August 26th/30th, Bucharest
editing (like SLD) instead of hand editing ⚫ Only Web Mercator zoom level based scale control ⚫ Symbols coming from “sprites” (symbol collections) ⚫ Unlike others, no styling extensions ⚫ No rendering transformations ⚫ Limited expressions usage ⚫ Pro: can be applied both on the client side and the server side 10 FOSS4G 2019, August 26th/30th, Bucharest
on the scale or not ⚫ E.g., at lower scales/lower zoom levels do not show buildings ⚫ Symbolize in a different way depending on the scale ⚫ E.g., different thickness based on the current zoom 14 FOSS4G 2019, August 26th/30th, Bucharest
type IN ('cemetery','grave_yard') scale: (,800000.0) symbolizers: - polygon: fill-color: ! '#aacbaf' - filter: (type IN ('cemetery','grave_yard')) AND religion = 'jewish' scale: (,50000.0) symbolizers: - polygon: fill-graphic: symbols: - external: url: symbols/grave_yard_jewish.png format: image/png # continues in the next slide First uniform background fill Then foreground symbols for various religions YSLD 27 FOSS4G 2019, August 26th/30th, Bucharest
10 14, 6 18; stroke-dashoffset: 14, 0; :stroke { fill: darkRed; size: 6; } } ⚫ Two coordinated dashed lines ⚫ One made with lines ⚫ One made with circles ⚫ The offset shifts them to have one appear in the empty spaces of the other CSS 32 FOSS4G 2019, August 26th/30th, Bucharest