getGetLegendRequestUrl accepts a LAYER parameter now

This commit is contained in:
simonseyock
2019-08-07 15:15:53 +02:00
committed by Simon Seyock
parent b2885e86fb
commit 89e8d6d693
4 changed files with 36 additions and 18 deletions

View File

@@ -368,7 +368,8 @@ describe('ol.source.ImageWMS', function() {
WIDTH: 'WIDTH_VALUE',
HEIGHT: 'HEIGHT_VALUE',
EXCEPTIONS: 'EXCEPTIONS_VALUE',
LANGUAGE: 'LANGUAGE_VALUE'
LANGUAGE: 'LANGUAGE_VALUE',
LAYER: 'LAYER_VALUE'
});
const uri = new URL(url);
expect(uri.protocol).to.be('http:');
@@ -376,7 +377,7 @@ describe('ol.source.ImageWMS', function() {
expect(uri.pathname).to.be('/wms');
const queryData = uri.searchParams;
expect(queryData.get('FORMAT')).to.be('FORMAT_VALUE');
expect(queryData.get('LAYER')).to.be('layer');
expect(queryData.get('LAYER')).to.be('LAYER_VALUE');
expect(queryData.get('REQUEST')).to.be('GetLegendGraphic');
expect(queryData.get('SERVICE')).to.be('WMS');
expect(queryData.get('VERSION')).to.be('1.3.0');

View File

@@ -337,7 +337,8 @@ describe('ol.source.TileWMS', function() {
WIDTH: 'WIDTH_VALUE',
HEIGHT: 'HEIGHT_VALUE',
EXCEPTIONS: 'EXCEPTIONS_VALUE',
LANGUAGE: 'LANGUAGE_VALUE'
LANGUAGE: 'LANGUAGE_VALUE',
LAYER: 'LAYER_VALUE'
});
const uri = new URL(url);
expect(uri.protocol).to.be('http:');
@@ -345,7 +346,7 @@ describe('ol.source.TileWMS', function() {
expect(uri.pathname).to.be('/wms');
const queryData = uri.searchParams;
expect(queryData.get('FORMAT')).to.be('FORMAT_VALUE');
expect(queryData.get('LAYER')).to.be('layer');
expect(queryData.get('LAYER')).to.be('LAYER_VALUE');
expect(queryData.get('REQUEST')).to.be('GetLegendGraphic');
expect(queryData.get('SERVICE')).to.be('WMS');
expect(queryData.get('VERSION')).to.be('1.3.0');