diff --git a/web/client/utils/cesium/WMSUtils.js b/web/client/utils/cesium/WMSUtils.js index d6a5274e42..be3de4bf09 100644 --- a/web/client/utils/cesium/WMSUtils.js +++ b/web/client/utils/cesium/WMSUtils.js @@ -120,6 +120,7 @@ export function wmsToCesiumOptions(options) { format: isVectorFormat(options.format) && 'image/png' || options.format || 'image/png', transparent: options.transparent !== undefined ? options.transparent : true, opacity: opacity, + version: options.version || "1.1.1", tiled: options.tiled !== undefined ? options.tiled : true, width: options.tileSize || 256, height: options.tileSize || 256, diff --git a/web/client/utils/cesium/__tests__/WMSUtils-test.js b/web/client/utils/cesium/__tests__/WMSUtils-test.js index 89b1e4544f..5c6555e807 100644 --- a/web/client/utils/cesium/__tests__/WMSUtils-test.js +++ b/web/client/utils/cesium/__tests__/WMSUtils-test.js @@ -56,6 +56,7 @@ describe('Test the WMSUtil for Cesium', () => { expect(cesiumOptions.layers).toBe('workspace:layer'); expect(cesiumOptions.parameters).toEqual({ styles: '', + version: '1.1.1', format: 'image/png', transparent: true, opacity: 1, @@ -64,6 +65,16 @@ describe('Test the WMSUtil for Cesium', () => { height: 256 }); }); + it('wmsToCesiumOptions with version', () => { + const options = { + type: 'wms', + version: '1.3.0', + url: '/geoserver/wms', + name: 'workspace:layer' + }; + const cesiumOptions = wmsToCesiumOptions(options); + expect(cesiumOptions.parameters.version).toBe('1.3.0'); + }); it('wmsToCesiumOptionsSingleTile', () => { const options = { type: 'wms',