Michael Bedward ha scritto:
> Hi Andrea,
> 
>> I imagined it almost the way you proposed it, the only twist would
>> be that the map would be stored in thread local to allow multiple
>> value and that the function would also allow a default value to
>> fall back to if the variable is not defined.
> 
> Thread-local values is a brilliant idea !
> 
> Would this do the trick ?  (untested)

Looks like it would. Can we name it "enviroment", "env" or
something like that? I would like to make the renderer aware
of the function and stick into the enviroment some well
known variables, such as the current scale denominator,
the paint area, the current layer name and whatnot.

The idea of using the fallback value as defined by SE 1.1
was also proposed by Jody.
I'm a little twisted about using that, since it's really
a SE 1.1 specific extension:

<xsd:complexType name="FunctionType" abstract="true">
     <xsd:complexContent>
         <xsd:extension base="ogc:FunctionType">
             <xsd:attribute name="fallbackValue" type="xsd:string" 
use="required"/>
         </xsd:extension>
     </xsd:complexContent>
</xsd:complexType>

on the other side is more compact than using a second
argument.

Shall we move this discussion to gt-devel?

Cheers
Andrea


-- 
Andrea Aime
OpenGeo - http://opengeo.org
Expert service straight from the developers.

------------------------------------------------------------------------------
Join us December 9, 2009 for the Red Hat Virtual Experience,
a free event focused on virtualization and cloud computing. 
Attend in-depth sessions from your desk. Your couch. Anywhere.
http://p.sf.net/sfu/redhat-sfdev2dev
_______________________________________________
Geotools-gt2-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users

Reply via email to