Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/2.3'
Browse files Browse the repository at this point in the history
  • Loading branch information
sbrunner committed Mar 20, 2019
2 parents c6d9fda + 84ae087 commit 8026f96
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 5 deletions.
7 changes: 6 additions & 1 deletion contribs/gmf/src/print/component.js
Original file line number Diff line number Diff line change
Expand Up @@ -995,7 +995,12 @@ class Controller {
server.url,
layer_names,
server.imageType,
server.type
server.type,
undefined,
undefined,
undefined,
undefined,
{opacity: layer.get('opacity')}
);
layer.setZIndex(-200);
} else {
Expand Down
11 changes: 7 additions & 4 deletions src/map/LayerHelper.js
Original file line number Diff line number Diff line change
Expand Up @@ -74,11 +74,13 @@ const REFRESH_PARAM = 'random';
* @param {string=} opt_time time parameter for layer queryable by time/periode
* @param {Object.<string, string>=} opt_params WMS parameters.
* @param {string=} opt_crossOrigin crossOrigin.
* @param {Object=} opt_customOptions Some initial options.
* @param {Object=} opt_customSourceOptions Some initial options.
* @param {Object=} opt_customLayerOptions The layer opacity.
* @return {import("ol/layer/Image.js").default} WMS Layer.
*/
LayerHelper.prototype.createBasicWMSLayer = function(sourceURL,
sourceLayersName, sourceFormat, opt_serverType, opt_time, opt_params, opt_crossOrigin, opt_customOptions) {
sourceLayersName, sourceFormat, opt_serverType, opt_time, opt_params, opt_crossOrigin,
opt_customSourceOptions, opt_customLayerOptions) {

const params = {
'FORMAT': sourceFormat,
Expand All @@ -93,7 +95,7 @@ LayerHelper.prototype.createBasicWMSLayer = function(sourceURL,
// OpenLayers expects 'qgis' insteads of 'qgisserver'
olServerType = opt_serverType.replace(ServerType.QGISSERVER, 'qgis');
}
const options = Object.assign({}, opt_customOptions, {
const options = Object.assign({}, opt_customSourceOptions, {
url: sourceURL,
params: params,
serverType: olServerType,
Expand All @@ -104,7 +106,8 @@ LayerHelper.prototype.createBasicWMSLayer = function(sourceURL,
source.updateParams(opt_params);
}

return new olLayerImage({source});
const layerOptions = Object.assign({}, opt_customLayerOptions, {source});
return new olLayerImage(layerOptions);
};


Expand Down

0 comments on commit 8026f96

Please sign in to comment.