1

I am doing categorized marks with GeoServer. The color is fine. I use same template of this question: geoserver css categorized marks but I can't figure out how to change the size of my points.

This is what I've tried but my points displaying with the same size

* {
  mark: symbol(circle);  
}

:mark [total < 500000]{
  mark-size: 2px;
  fill: yellow;
  stroke: yellow;

}
:mark [total >= 500000] [total < 1000000]{
  mark-size: 5px;
  fill: blue;
  stroke: blue;
}
2

You are mixing styles that apply to the mark automatically (mark-size) and style items that must be applied to the mark (fill, stroke). The second type must be inside a :mark block but the first don't. So your style should look something like:

* {
  mark: symbol(circle);  

}

[PERSONS < 5e6]{
  mark-size: 20px;
  :mark{
    fill: yellow;
    stroke: yellow;
  }
}
[PERSONS >= 5e6] {
  mark-size: 10px;
  :mark{
    fill: blue;
    stroke: blue;
  }
}

giving this map of US States:

enter image description here

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.