TransWikia.com

GeoServer 2.18. Setting Min & Max Scales

Geographic Information Systems Asked by zakariah1 on July 29, 2020

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 July 29, 2020

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