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
}
);
varmap.addLayers([baselayer,overlaylayer]);
How can I do this?