Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm using openLayers and geoserver. I'm making a layer with openLayers.Layer.WMS to geoserver and am adding cql_filter to filter down id's. Here is my code:

        var kent = new OpenLayers.Layer.WMS(
            "Kent", "http://localhost:8080/geoserver/TK/wms",
                layers: 'TK:phoenix',
                transparent: true,
                format: 'image/png',
                queryVisible: true,
                cql_filter: ("id IN (85356,85357,85358,85359,85360,85361,85362,85363)") 

I need to be able to send a large list of id's to the request but it makes the url too long. Is there a way I can make this request with JSON?

share|improve this question
Is POST supported? – Jamie Jan 18 '13 at 16:49
It seems that POST isn't supported with OpenLayers – Bl8rchk Jan 18 '13 at 16:57
even if it were possible JSON will not make the request any shorter. As @Jamie noted POST is a good option. See here: I think there may be some cross-browser issues with POST but can't find anything right now – tomfumb Jan 18 '13 at 16:57
That did it! I set tileOptions: {maxGetUrlLength: 2048}}. Thank you! – Bl8rchk Jan 18 '13 at 20:00

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.