update projection processing. if a layer (or the map) declares its projection as 'none' then no SRS parameter is added to the WMS/WFS requests

git-svn-id: http://svn.openlayers.org/trunk/openlayers@960 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
This commit is contained in:
euzuro
2006-07-17 15:39:44 +00:00
parent f9034ac9a2
commit fc41d9dac1
4 changed files with 17 additions and 6 deletions
+7 -2
View File
@@ -133,17 +133,22 @@
function test_07_Layer_WMS_getFullRequestString (t) {
t.plan( 1 );
t.plan( 2 );
var map = new OpenLayers.Map('map');
map.projection = "xx";
tUrl = "http://octo.metacarta.com/cgi-bin/mapserv";
tParams = { layers: 'basic',
format: 'image/png'};
var tLayer = new OpenLayers.Layer.WMS(name, tUrl, tParams, null);
var tLayer = new OpenLayers.Layer.WMS(name, tUrl, tParams);
map.addLayer(tLayer);
str = tLayer.getFullRequestString();
t.eq(str, "http://octo.metacarta.com/cgi-bin/mapserv?LAYERS=basic&FORMAT=image/png&SERVICE=WMS&VERSION=1.1.1&REQUEST=GetMap&STYLES=&EXCEPTIONS=application/vnd.ogc.se_inimage&SRS=xx", "getFullRequestString() adds SRS value");
tLayer.projection = "none";
str = tLayer.getFullRequestString();
t.eq(str, "http://octo.metacarta.com/cgi-bin/mapserv?LAYERS=basic&FORMAT=image/png&SERVICE=WMS&VERSION=1.1.1&REQUEST=GetMap&STYLES=&EXCEPTIONS=application/vnd.ogc.se_inimage", "getFullRequestString() by default does *not* add SRS value if projection is 'none'");
}
function test_99_Layer_WMS_destroy (t) {