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 need to add an overlay layer that uses EPSG:4326 to a map with a base layer that uses EPSG:32628.

Every time I add the overlay OpenLayers automatically switches the SRS param of the overlay to EPSG:32628 (SRS of baselayer); I can see the base layer, but the overlay isn't shown.

My code is this:

baselayer = new OpenLayers.Layer.WMS(
               baselayername, baselayerurl,
                  width: varmap.size.w,
                  srs: 'EPSG:32628',
                  layers: baselayername,
                  height: varmap.size.h,
                  styles: style,
                  format: format

overlaylayer = new OpenLayers.Layer.WMS(
               overlaylayer name, overlaylayer url,
                  width: varmap.size.w,
                  srs: 'EPSG:4326',
                  layers: layername,
                  height: varmap.size.h,
                  styles: style,
                  format: format,
                  transparent: true


How can I do this?

share|improve this question
up vote 7 down vote accepted

That is how it is supposed to work. OpenLayers can't reproject WMS layers for you so you should let the WMS server take care of that for you.

If your WMS can not support EPSG:32628 then you will need to look into setting up a cascading WMS that can reproject it for you (both MapServer and GeoServer 2.1+ can do this).

share|improve this answer
Thanks for your response. I told your answer to my technical OGC and he told me that he's going to update the OGC servers to GeoServer 2.1. – Fran Verona Feb 5 '11 at 11:20
shouldn't need an update. – iant Feb 5 '11 at 16:51

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.