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 have wms layer and after i do cql filter on this. And now i want to see result. I want map zoomed to this result. My code.


But getExtent() returns wrong bounds. In Geoserver i have layer settings

Native SRS=70066
Declared SRS=900913
Reproject native to declared

In OL when create map i write projection: EPSG 900913;

What im doing wrong? I ll try do transformation

ex=layer.getExtent().transformation(map.projection, map.displayProjection);

projection=70066 displayProjection=900913

But it nothig to change.

Maybe im gonna do it whis Capabilities?

share|improve this question
possible duplicate of How to zoom map after CQL_Filter? – iant May 18 '12 at 9:16
yes, i was read this. But there another way to solve this problem. If this is possible i want use getExtent. – Kliver Max May 18 '12 at 9:19
see my answer to the linked question. – iant May 18 '12 at 9:20
My english is bad, but if im understad u its mean that im gonna do WFS layer and use getDataExtent()? – Kliver Max May 18 '12 at 9:25
that's right a WMS Layer is jsut a picture and it has the bounds that you have set in the request – iant May 18 '12 at 9:32

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.