Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. Join them; it only takes a minute:

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've tried a lot of times to use the OpenLayers CQL example but nothing changes. Is there any way to use CQL or filter.

share|improve this question
which example are you trying to use? what goes wrong? – iant Jan 8 '13 at 10:06
Are you using Geoserver? CQL filters don't work with any other WMS service. – user1702401 Jan 8 '13 at 10:07
Yes i m using geoserver and link Also i ve tried to many times . – Rusty Jan 8 '13 at 10:55
works for me - what is your actual problem – iant Jan 9 '13 at 15:44
share your code for people to look at where you might be wrong. – Aragon Jan 9 '13 at 17:05

You have CQL in example:


Try to change B to A and you will see change


BTW OpenLayers supports less function then GeoServer but you can read

share|improve this answer

try to use this code:

lyr = new OpenLayers.Layer.WMS(yourLayerName, yourLayerService,{
      'VERSION' : '1.1.0',
      'layers' : yourLayerNum,
      format: 'image/png',
      transparent: true,

      isBaseLayer: false


dont forget VERSION is important for getting true result.

i hope it helps you...

share|improve this answer

Your Answer


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

Not the answer you're looking for? Browse other questions tagged or ask your own question.