-1

Why the wms layer ignoring srs parameter srs:"EPSG:4326" and always sending "EPSG:900913" as srs value..?

this the code,

    map.projection= new OpenLayers.Projection("EPSG:4326");

    var wmslayer = new OpenLayers.Layer.WMS("Cities",
 "http://{208.184.113.91}/ArcGIS/services/BurkeMcDowell2013_06_26FORGOPI/MapServer/WMSServer?service=WMS",                                               
      {layers: '0', 
       srs:"EPSG:4326", 
       transparent: true 
      },{
       projection: new OpenLayers.Projection('4326')
      });
2
  • 2
    post your whole code
    – Gery
    Commented Jun 29, 2013 at 9:36
  • It's actually because internally openlayers fills out the SRS parameter, you cannot override this by adding it to the parameter list. Openlayers will overwrite it. You have to reproject.
    – Glenn Plas
    Commented Feb 10, 2016 at 16:07

2 Answers 2

2

You only posted part of your code, but you probably have a map object without a projection (defaults to "EPSG:900913") and since the layer has to be compatible with the map object to be displayed correctly, OpenLayers will overrule your SRS.

1
  • Thanks for quick reply milovanderlinder. I have a map object and i set project before layer request..i edited the question could you please check Commented Jun 29, 2013 at 9:32
1

You have a base layer in 900913 then either Google or osm then. There is no way to reproject them.

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