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

jdgodchaux jd at nijel.org
Fri Feb 17 18:46:48 EST 2012


Hello,

I'm using OpenLayers, GeoExt and Geoserver to create a simple map with a
MapPanel, LegendPanel, and LayerTree. I'm using a standard
OpenLayers.Layer.WMS instance to add a new layer to this map and I'm
applying several filters to this layer to only display a small number
features. With a large number of filters applied, the GetMap request URL is
too long for a GET request, so I've applied tileOptions: {maxGetUrlLength:
2048} in the OpenLayers.Layer.WMS instance and the system is now using POST
with no problems. My data appear on the map pane filtered and styled as I've
requested (I've set the style through Geoserver; sld in the Geoserver data
directory).

The problem I'm running into now is that while the GetMap request is using
POST, the GetLegendGraphics request to populate the legend is still using
GET and the URL is way to long for a GET request. Does anyone know of a way
in OpenLayers/GeoExt to shorten GetLegendGraphics request URL? Is there some
way to remove the filters from the GetLegendGraphics request and still keep
them in the GetMap request? 

I did see a somewhat related post here
(http://osgeo-org.1560.n6.nabble.com/mergeNewParams-Legend-td3926069.html).
Here Andreas suggested to "reconfigure the legend type selection sequence,
so a VectorLegend rather than a WMSLegend is created," but I couldn't really
translate how to implement the solution Andreas provided. 

Many thanks in advance!!
JD



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


More information about the Users mailing list