5. Compositing

TODO: extend OSM default style with a big single red dot marker, similar to CartoCSS example page

All examples below basically use the same XML stylesheet, with just the comp-op attribute for the red dots layer changed.

Example 67. comp-op-example
<?xml version="1.0" encoding="utf-8"?>
<Map background-color='blue'>
  <FileSource name="symbols">./symbols</FileSource>

  <Style name="countries">
    <Rule>
      <PolygonSymbolizer fill="green"/>
    </Rule>
  </Style>
  
  <Layer name="countries">
    <StyleName>countries</StyleName>
    <Datasource>
      <Parameter name="type">shape</Parameter>
      <Parameter name="file">data/ne_110m_admin_0_countries.shp</Parameter>
    </Datasource>
  </Layer>
  
  <Style name="style" comp-op="difference">
    <Rule>
      <PointSymbolizer allow-overlap="true" base="symbols" file="red/dot.svg"/>
    </Rule>
  </Style>  
  
  <Layer name="layer">
    <StyleName>style</StyleName>
    <Datasource>
      <Parameter name="type">csv</Parameter>
      <Parameter name="inline">
wkt
"POINT(1 1)"
      </Parameter>
    </Datasource>
  </Layer>
</Map>