I think we include the scale as an environment variable, so you could use
the "env" and "if_then_else" filter functions to compute a size based on
the effective scale.

Another alternative would be the CSS extension (disclaimer: I'm the author
of that extension) which would allow you to specify the size separately
from the colors:

* {
  mark: symbol(circle);
  mark-size: 8;
}

[@scale > 100000] {
  mark-size: 24;
}

:mark [category=1] {
    fill: red;
}

:mark [category=2] {
    fill: green;
}

:mark [category=3] {
    fill: blue;
}

--
David Winslow
OpenGeo - http://opengeo.org/


On Tue, Aug 27, 2013 at 6:12 AM, Paul Meems <[email protected]> wrote:

> I have created a SLD for a point layer with 3 rules, giving my points a
> circle with 3 different colors based on an attribute. I've set the size to
> 8.
> This works great.
>
> When I zoom in my points get smaller this is OK, but when I zoom beyond
> level 15 the points get too small. Especially on a mobile device iIt makes
> it very hard to select a point.
>
> I know I can create a rule in the SLD to change the size depending on the
> MinScaleDenominator and MaxScaleDenominator, but that would mean I need
> to create these rules 3 times; for every color category I created.
>
> Can't this be simpler?
> I'm using OpenLayers to show the layers, so I can use that lib. as well if
> needed.
>
> Thanks,
>
> Paul
>
>
> ------------------------------------------------------------------------------
> Introducing Performance Central, a new site from SourceForge and
> AppDynamics. Performance Central is your source for news, insights,
> analysis and resources for efficient Application Performance Management.
> Visit us today!
> http://pubads.g.doubleclick.net/gampad/clk?id=48897511&iu=/4140/ostg.clktrk
> _______________________________________________
> Geoserver-users mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/geoserver-users
>
>
------------------------------------------------------------------------------
Introducing Performance Central, a new site from SourceForge and 
AppDynamics. Performance Central is your source for news, insights, 
analysis and resources for efficient Application Performance Management. 
Visit us today!
http://pubads.g.doubleclick.net/gampad/clk?id=48897511&iu=/4140/ostg.clktrk
_______________________________________________
Geoserver-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geoserver-users

Reply via email to