Hi, I remember that some time ago there was this idea around of providing context/enviroment variables accessible in SLD sheets as special property values.
The natural candidates for these variables would be scale denominator, map width, height, but they can be really anything the user is interested in parametrizing within the SLD, such as colors, line widths and so on, in order to avoid creating a raft of very similar stylesheets. The current PropertyAccessor API provides a natural plugin point to give GeoTools renderer the ability to resolve these enviroment variables (whose values are probably to be stored in a thread local... suggestions on the mechanism welcomed). Generally speaking it would be interesting to have a syntax allowing the user to define a reference to a context variable, and also provide a default value for it for cases in which the variable is not available. Something like: <PropertyName>$(selectionColor,'#FF0000')</PropertyName> (suggestions welcomed). In the web mapping context this would allow one to make scale dependent formulas (that would mimic the lack of real world units in SLD 1.0, for example) or create stuff like a customizable highlight style that takes a color from a web request, something like: &request=GetMap&...&contextParams=selectionColor:#00FF00&... to get a green selection instead of a red one. Seems kind of a hanging fruit that can provide more flexibility to existing style sheets (in the spirit of dynamic symbolizers that seem to have been very well received by the few comments I've seen about them). Opinions? Cheers Andrea -- Andrea Aime OpenGeo - http://opengeo.org Expert service straight from the developers. ------------------------------------------------------------------------------ _______________________________________________ Geotools-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/geotools-devel
