Skip to content

Instantly share code, notes, and snippets.

@malcolmrh
Created April 2, 2015 18:15
Show Gist options
  • Save malcolmrh/c8aaf822e8c933449ad6 to your computer and use it in GitHub Desktop.
Save malcolmrh/c8aaf822e8c933449ad6 to your computer and use it in GitHub Desktop.
If geoserver polygons are small it's nice to have a centroid point that is really big when zoomed out. Remember painter's rendering order.
<Rule>
<MinScaleDenominator>1500000</MinScaleDenominator>
<PointSymbolizer>
<Geometry>
<ogc:Function name="centroid">
<ogc:PropertyName>geom</ogc:PropertyName>
</ogc:Function>
</Geometry>
<Graphic>
<Mark>
<WellKnownName>circle</WellKnownName>
<Fill>
<CssParameter name="fill">#F5FF3B</CssParameter>
</Fill>
</Mark>
<Size>18</Size>
</Graphic>
</PointSymbolizer>
</Rule>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment