clone the params option

This commit is contained in:
mike-000
2022-08-24 11:36:42 +01:00
parent 08ad881d5e
commit d74379a7d9
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;