[OpenLayers-Users] Re: URL Too Long for GetLegendGraphics WMS Get Request

jdgodchaux jd at nijel.org
Mon Feb 20 13:52:01 EST 2012


Hi Andreas,

Thanks very much for your response! I'm new at using GeoExt, so I'm not
quite following your response. I've added preferredTypes:
["gx_vectorlegend"] to my LegendPanel, but the SLD I'm using to style my
filtered layers is called from the  Geoserver data directory. I'm not
dynamically rewriting my SLD rules each time I'm applying new filter to the
layer. I'm creating (much longer) filters like the following:

                filter_program_1 = new OpenLayers.Filter.Logical({
                    type: OpenLayers.Filter.Logical.OR,
                    filters: [
                
                                        new OpenLayers.Filter.Comparison({
                                            type:
OpenLayers.Filter.Comparison.EQUAL_TO,
                                            property: "programnumber",
                                            value: "2311"
                                        }),
                                        new OpenLayers.Filter.Comparison({
                                            type:
OpenLayers.Filter.Comparison.EQUAL_TO,
                                            property: "programnumber",
                                            value: "2451"
                                        })
                            ]
                        });

And then creating a variable for each WMS layer like the following:

                var program_1 = new OpenLayers.Layer.WMS("First Layer of
Programs",
                        "geoserverwmsurl", 
                                {'layers': 'programworkspace:programs', 
                                transparent: true, tiled: true, 
                                format: 'image/png', 
                                filter:
xml.write(filter_1_1.write(filter_program_1)),
                                styles: 'program_type'
                                },
                        {isBaseLayer: false, visibility: true, tileOptions:
{maxGetUrlLength: 2048}}
                );


GeoExt pushes the same URL to geoserver for GetMap and GetLegendType, but
I'm wondering if there's a way to force GeoExt to request a VectorLegend
when the URL is longer than the GET request can handle. Does anyone know if
that's possible? has anyone done something like this before?

Thanks again!
JD


 

--
View this message in context: http://osgeo-org.1560.n6.nabble.com/URL-Too-Long-for-GetLegendGraphics-WMS-Get-Request-tp4481884p4488506.html
Sent from the OpenLayers Users mailing list archive at Nabble.com.


More information about the Users mailing list