WMS GetMap request parameters shall be params

To avoid surprises, we configure everything that is a WMS GetMap
request parameter in the params object, and not as direct
configuration option. This affects the VERSION and TRANSPARENT
params.
This commit is contained in:
ahocevar
2013-03-05 10:54:33 +01:00
committed by Tim Schaub
parent a912d48b59
commit c1f3a6cc54
7 changed files with 31 additions and 36 deletions

View File

@@ -74,10 +74,10 @@ describe('ol.TileUrlFunction', function() {
'http://wms?foo=bar', {});
var tileCoord = new ol.TileCoord(1, 0, 0);
var tileUrl = tileUrlFunction(tileCoord, tileGrid, epsg3857);
var expected = 'http://wms?foo=bar&SERVICE=WMS&VERSION=1.3.0&' +
'REQUEST=GetMap&FORMAT=image%2Fpng&TRANSPARENT=true&WIDTH=256&' +
'HEIGHT=256&BBOX=-20037508.342789244%2C20037508.342789244%2C0%2C' +
'40075016.68557849&CRS=EPSG%3A3857&STYLES=';
var expected = 'http://wms?foo=bar&SERVICE=WMS&VERSION=1.3.0&REQUEST=' +
'GetMap&FORMAT=image%2Fpng&TRANSPARENT=true&WIDTH=256&HEIGHT=256&' +
'STYLES=&CRS=EPSG%3A3857&BBOX=-20037508.342789244%2C2' +
'0037508.342789244%2C0%2C40075016.68557849';
expect(tileUrl).toEqual(expected);
});
it('creates expected URL respecting axis orientation', function() {
@@ -86,10 +86,10 @@ describe('ol.TileUrlFunction', function() {
'http://wms?foo=bar', {});
var tileCoord = new ol.TileCoord(1, 0, 0);
var tileUrl = tileUrlFunction(tileCoord, tileGrid, epsg4326);
var expected = 'http://wms?foo=bar&SERVICE=WMS&VERSION=1.3.0&' +
'REQUEST=GetMap&FORMAT=image%2Fpng&TRANSPARENT=true&WIDTH=256&' +
'HEIGHT=256&BBOX=20037508.342789244%2C-20037508.342789244%2C' +
'40075016.68557849%2C0&CRS=EPSG%3A4326&STYLES=';
var expected = 'http://wms?foo=bar&SERVICE=WMS&VERSION=1.3.0&REQUEST=' +
'GetMap&FORMAT=image%2Fpng&TRANSPARENT=true&WIDTH=256&HEIGHT=256&' +
'STYLES=&CRS=EPSG%3A4326&BBOX=20037508.342789244%2C' +
'-20037508.342789244%2C40075016.68557849%2C0';
expect(tileUrl).toEqual(expected);
});
});