Merge pull request #14048 from mike-000/wms-params

Clone the WMS params option
This commit is contained in:
Andreas Hocevar
2022-08-26 12:23:14 +02:00
committed by GitHub
5 changed files with 8 additions and 4 deletions

View File

@@ -206,8 +206,8 @@ describe('ol/source/ImageWMS', function () {
it('extends FORMAT_OPTIONS if it is already present', function () {
options.serverType = 'geoserver';
const source = new ImageWMS(options);
options.params.FORMAT_OPTIONS = 'param1:value1';
const source = new ImageWMS(options);
pixelRatio = 2;
const image = source.getImage(extent, resolution, pixelRatio, projection);
const uri = new URL(image.src_);

View File

@@ -150,8 +150,8 @@ describe('ol/source/TileWMS', function () {
it('extends FORMAT_OPTIONS if it is already present', function () {
options.serverType = 'geoserver';
const source = new TileWMS(options);
options.params.FORMAT_OPTIONS = 'param1:value1';
const source = new TileWMS(options);
const tile = source.getTile(3, 2, 2, 2, getProjection('CRS:84'));
const uri = new URL(tile.src_);
const queryData = uri.searchParams;