Hi Rohan,
In short no it is not possible to access the request object or request
parameters from a template. Although it would be possible to hook them up it
take a bit of coding.
About your issue. How exactly are you doing the filtering? Are you using a
filter on the wms request?
-Justin
On Tue, Sep 21, 2010 at 9:51 PM, Rohan Parkes <[email protected]>wrote:
> I have an OpenLayers application that uses style rules to only show WMS
> data in a layer that matches certain criteria.
>
> However, it has an info tool that uses the OpenLayers WMSGetFeatureInfo
> control to get popup information about the layer. This uses the WMS
> GetFeatureInfo mode, and the popups are rendered using Freemarker templates.
>
> The problem is that the info tool returns data for objects that are not
> visible. I'd like to be able to only output the template if the data matches
> the criteria that were used to filter the layer, whcih I was ging to pass
> via the GetFeatureInfo request.
>
> It should technically be possible to read Request parameters in Freemarker
> templates, but in Geoserver**** (2.0.1) it doesn't seem to be enabled.
>
> I noticed a post about enabling Request parameters
> here<http://stackoverflow.com/questions/2267554/request-parameters-in-freemarker-on-spring-2-5>,
> but I'm not sure if it's possible to apply these settings in Geoserver.
>
> (I noticed a file dispatcher-servlet.xml under Tomcat webapps, but
> attempting to add settings to it was unsuccessful.)
>
> Can anyone tell me if it is possible to read request parameters in
> templates under Geoserver?
>
> Rohan Parkes
>
>
> ------------------------------------------------------------------------------
> Start uncovering the many advantages of virtual appliances
> and start using them to simplify application deployment and
> accelerate your shift to cloud computing.
> http://p.sf.net/sfu/novell-sfdev2dev
> _______________________________________________
> Geoserver-users mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/geoserver-users
>
>
--
Justin Deoliveira
OpenGeo - http://opengeo.org
Enterprise support for open source geospatial.
------------------------------------------------------------------------------
Start uncovering the many advantages of virtual appliances
and start using them to simplify application deployment and
accelerate your shift to cloud computing.
http://p.sf.net/sfu/novell-sfdev2dev
_______________________________________________
Geoserver-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geoserver-users