TransWikia.com

GeoServer 2.18. Setting Min & Max Scales

Geographic Information Systems Asked on December 29, 2021

I’m using CSS and wanted to know how to set the min and max scale for a given layer. I see many solutions referencing SLD, but want to do this in CSS. I really need help with the syntax.

One Answer

When in doubt check the CSS Styling Cookbook - simply you use the "magic" scale denominator variable (@sd) in a filter.

* {
   mark: symbol(circle);
 }

 :mark {
   fill: #CC3300;
 }

 [@sd < 16M] {
   mark-size: 12;
 }

 [@sd > 16M] [@sd < 32M] {
   mark-size: 8;
 }

 [@sd > 32M] {
   mark-size: 4;
 }

Answered by Ian Turton on December 29, 2021

Add your own answers!

Ask a Question

Get help from others!

© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP