[Geoserver-users] Problem with displaying wms layer in EPSG:2180

I have a problem with displaying wms layer. I need to display layer in
EPSG:2180 but layer displayed always in WGS 84. How can I do set this
properly.

*layer settings (postgis):*
- SRS: EPSG:2180
(layer in QGIS are displayed OK - as Add Layer from PostGIS...)

*layer settings (geoserver):*
- Native SRS: EPSG:2180
- Declared SRS: EPSG:2180
- SRS Handling: Force declared

*OpenLayers code:*
  layer = new OpenLayers.Layer.WMS(
      "OpenLayers WMS",
            "http://localhost:8080/geoserver/wms",
      { srs: 'EPSG:2180', layers: 'postgis:ot_adja_a' }
  );
  
*geoserver.log:*
...
2014-05-23 11:52:07,243 INFO [geoserver.wms] -
Request: getMap
  Width = 256
  Height = 256
  BgColor = java.awt.Color[r=255,g=255,b=255]
  Tiled = false
  Palette = null
  SRS = EPSG:4326
  FeatureVersion = null
  Styles = [StyleImpl[ name=ot_adms_a]]
  Layers = [org.geoserver.wms.MapLayerInfo@anonymised.com]
  TilesOrigin = null
  MaxFeatures = null
  Crs = GEOGCS["WGS 84",
  DATUM["World Geodetic System 1984",
    SPHEROID["WGS 84", 6378137.0, 298.257223563, AUTHORITY["EPSG","7030"]],
    AUTHORITY["EPSG","6326"]],
  PRIMEM["Greenwich", 0.0, AUTHORITY["EPSG","8901"]],
  UNIT["degree", 0.017453292519943295],
  AXIS["Geodetic longitude", EAST],
  AXIS["Geodetic latitude", NORTH],
  AUTHORITY["EPSG","4326"]]
  Bbox = SRSEnvelope[20.21484375 : 20.390625, 53.0859375 : 53.26171875]
  RemoteOwsType = null
  RemoteOwsURL = null
  Env = {}
  FormatOptions = {}
  Angle = 0.0
  CQLFilter = null
  Elevation =
  FeatureId = null
  StartIndex = null
  ViewParams = null
  Transparent = false
  SldBody = null
  ValidateSchema = false
  Sld = null
  SldVersion = null
  Exceptions = SE_XML
  Buffer = 0
  Filter = null
  Format = image/jpeg
  Filters = null
  Time =
  Get = true
  BaseUrl = http://localhost:8080/geoserver/
  RawKvp = {BBOX=20.21484375,53.0859375,20.390625,53.26171875, VERSION=1.1.1,
FORMAT=image/jpeg, SERVICE=WMS, HEIGHT=256, LAYERS=postgis:ot_adja_a,
REQUEST=GetMap, STYLES=, SRS=EPSG:4326, WIDTH=256}
  RequestCharset = UTF-8
  Version = 1.1.1
  Request = GetMap

--
View this message in context: http://osgeo-org.1560.x6.nabble.com/Problem-with-displaying-wms-layer-in-EPSG-2180-tp5142479.html
Sent from the GeoServer - User mailing list archive at Nabble.com.

In openlayers, the request to the WMS server will be in the SRS of whatever baselayer you have set (so it will overlay the baselayer). The baselayer SRS overrides anything you might try to set up. Make sure baselayer is in 2180.

Notice: This email and any attachments are confidential.
If received in error please destroy and immediately notify us.
Do not copy or disclose the contents.

Thanks for your help

It's a solution:

var mapOptions = {
projection: new OpenLayers.Projection('EPSG:2180'),
units: 'm',
minResolution: '1',
maxResolution: '4000',
resolutions: [
3052.7655842634194,
1526.3827921317097,
763.1913960658549,
381.59569803292743,
190.79784901646372,
95.39892450823186,
47.69946225411593,
23.849731127057964,
11.924865563528982,
5.962432781764491,
2.9812163908822455,
1.4906081954411228
],
maxExtent: new OpenLayers.Bounds(150000, 120000, 920000, 800000),
maxScale: 1000000
};
map = new OpenLayers.Map('map', mapOptions);
var ot_adms_a = new OpenLayers.Layer.WMS(
"ot_adms_a",
"http://localhost:8080/geoserver/wms",
{layers: 'postgis:ot_adja_a', projection: 'EPSG:2180', isBaseLayer: true},
{singleTile: true}
);
map.addLayer(ot_adms_a);
alert(map.getProjectionObject());
map.zoomToMaxExtent();

--
View this message in context: http://osgeo-org.1560.x6.nabble.com/Problem-with-displaying-wms-layer-in-EPSG-2180-tp5142479p5143557.html
Sent from the GeoServer - User mailing list archive at Nabble.com.