Renaming of getGetFeatureInfoUrl and getGetLegendGraphicUrl

This commit is contained in:
Simon Seyock
2019-09-18 10:38:34 +02:00
parent 10326d0e81
commit b2885e86fb
9 changed files with 30 additions and 26 deletions

View File

@@ -198,12 +198,12 @@ describe('ol.source.TileWMS', function() {
});
describe('#getGetFeatureInfoUrl', function() {
describe('#getFeatureInfoUrl', function() {
it('returns the expected GetFeatureInfo URL', function() {
const source = new TileWMS(options);
source.pixelRatio_ = 1;
const url = source.getGetFeatureInfoUrl(
const url = source.getFeatureInfoUrl(
[-7000000, -12000000],
19567.87924100512, getProjection('EPSG:3857'),
{INFO_FORMAT: 'text/plain'});
@@ -237,7 +237,7 @@ describe('ol.source.TileWMS', function() {
it('returns the expected GetFeatureInfo URL when source\'s projection is different from the parameter', function() {
const source = new TileWMS(optionsReproj);
source.pixelRatio_ = 1;
const url = source.getGetFeatureInfoUrl(
const url = source.getFeatureInfoUrl(
[-7000000, -12000000],
19567.87924100512, getProjection('EPSG:3857'),
{INFO_FORMAT: 'text/plain'});
@@ -267,7 +267,7 @@ describe('ol.source.TileWMS', function() {
it('sets the QUERY_LAYERS param as expected', function() {
const source = new TileWMS(options);
source.pixelRatio_ = 1;
const url = source.getGetFeatureInfoUrl(
const url = source.getFeatureInfoUrl(
[-7000000, -12000000],
19567.87924100512, getProjection('EPSG:3857'),
{INFO_FORMAT: 'text/plain', QUERY_LAYERS: 'foo,bar'});
@@ -299,11 +299,11 @@ describe('ol.source.TileWMS', function() {
});
});
describe('#getGetLegendGraphicUrl', function() {
describe('#getLegendGraphicUrl', function() {
it('returns the getLegenGraphic url as expected', function() {
const source = new TileWMS(options);
const url = source.getGetLegendGraphicUrl(0.1);
const url = source.getLegendUrl(0.1);
const uri = new URL(url);
expect(uri.protocol).to.be('http:');
expect(uri.hostname).to.be('example.com');
@@ -319,7 +319,7 @@ describe('ol.source.TileWMS', function() {
it('does not include SCALE if no resolution was provided', function() {
const source = new TileWMS(options);
const url = source.getGetLegendGraphicUrl();
const url = source.getLegendUrl();
const uri = new URL(url);
const queryData = uri.searchParams;
expect(queryData.get('SCALE')).to.be(null);
@@ -327,7 +327,7 @@ describe('ol.source.TileWMS', function() {
it('adds additional params as expected', function() {
const source = new TileWMS(options);
const url = source.getGetLegendGraphicUrl(0.1, {
const url = source.getLegendUrl(0.1, {
STYLE: 'STYLE_VALUE',
FEATURETYPE: 'FEATURETYPE_VALUE',
RULE: 'RULE_VALUE',