On Wed, Apr 20, 2011 at 10:27 AM, Shapiro Mark
<[email protected]> wrote:
> Hello
>
> I'm trying to pass different parameters to different layers when
> requesting several Geoserver layers in one WMS request. For example, I
> would like to use two different layers with the same layer name and
> different style names.
>
> ...LAYERS=generic_point,generic_point&STYLES=yellow_circle,green_square.
> ..&viewparams=generic_pont_data_filter:cat=1;sim...
>
> To separate the parameters between layers in the viewparams collection,
> I have some kind of naming convention: layer_name_parameter_name. But of
> course, that does not work when I want to use more than one layer of the
> same name with different parameter sets.
>
> Is there any way to provide different viewparams for individual layers
> in the layer collection? The same question apply for the env variable
> for styles.

Not possible at the moment, please use different param names in the
various SLDs and views.

To have different param values in different views there is actually a patch
in jira:
http://jira.codehaus.org/browse/GEOS-4184
But so far no one had the time to look into it, review and apply.

For the env param... not triivial to do either, would be in fact quite a mess
to setup because we'd have to change the env map between the rendering
of one layer and the next (the renderer does not emit events of that happening,
so we don't have a good hook to change the environment variable during
rendering).
Still, doable but not trivial, would require some api change in geotools as well
or some other kind of hack.

Cheers
Andrea


-- 
-------------------------------------------------------
Ing. Andrea Aime
GeoSolutions S.A.S.
Tech lead

Via Poggio alle Viti 1187
55054  Massarosa (LU)
Italy

phone: +39 0584 962313
fax:      +39 0584 962313
mob:    +39 333 8128928

http://www.geo-solutions.it
http://geo-solutions.blogspot.com/
http://www.youtube.com/user/GeoSolutionsIT
http://www.linkedin.com/in/andreaaime
http://twitter.com/geowolf

-------------------------------------------------------

------------------------------------------------------------------------------
Benefiting from Server Virtualization: Beyond Initial Workload 
Consolidation -- Increasing the use of server virtualization is a top
priority.Virtualization can reduce costs, simplify management, and improve 
application availability and disaster protection. Learn more about boosting 
the value of server virtualization. http://p.sf.net/sfu/vmware-sfdev2dev
_______________________________________________
Geoserver-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geoserver-users

Reply via email to