Skip to content

Commit

Permalink
Small fixes about layer params and print (qgis and mapserver case)
Browse files Browse the repository at this point in the history
  • Loading branch information
mricca committed Dec 12, 2016
1 parent 2f0b144 commit ae14a59
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 5 deletions.
1 change: 1 addition & 0 deletions web/client/components/TOC/fragments/legend/Legend.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ const Legend = React.createClass({
LEGEND_OPTIONS: this.props.legendOptions
// SCALE TODO
}, layer.legendParams || {},
layer.params || {},
layer.params && layer.params.SLD_BODY ? {SLD_BODY: layer.params.SLD_BODY} : {});
SecurityUtils.addAuthenticationParameter(url, query);

Expand Down
4 changes: 3 additions & 1 deletion web/client/plugins/Save.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,9 @@ const Save = React.createClass({
type: layer.type,
url: layer.url,
bbox: layer.bbox,
visibility: layer.visibility
visibility: layer.visibility,
singleTile: layer.singleTile || false,
...assign({}, layer.params ? {params: layer.params} : {})
};
});
// Groups are ignored, as they already are defined in the layers
Expand Down
4 changes: 3 additions & 1 deletion web/client/plugins/SaveAs.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,9 @@ const SaveAs = React.createClass({
type: layer.type,
url: layer.url,
bbox: layer.bbox,
visibility: layer.visibility
visibility: layer.visibility,
singleTile: layer.singleTile || false,
...assign({}, layer.params ? {params: layer.params} : {})
};
});
// Groups are ignored, as they already are defined in the layers
Expand Down
7 changes: 4 additions & 3 deletions web/client/utils/PrintUtils.js
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ const PrintUtils = {
"layers": [
layer.name
],
"format": layer.format || "image/jpeg",
"format": layer.format || "image/png",
"styles": [
layer.style || ''
],
Expand All @@ -123,7 +123,7 @@ const PrintUtils = {
{
"name": "",
"icons": [
(isArray(layer.url) ? layer.url[0] : layer.url) + url.format({
PrintUtils.normalizeUrl(layer.url) + url.format({
query: {
TRANSPARENT: true,
EXCEPTIONS: "application/vnd.ogc.se_xml",
Expand All @@ -137,7 +137,8 @@ const PrintUtils = {
minSymbolSize: spec.iconSize,
fontFamily: spec.fontFamily,
LEGEND_OPTIONS: "forceLabels:" + (spec.forceLabels ? "on" : "") + ";fontAntialiasing:" + spec.antiAliasing + ";dpi:" + spec.legendDpi + ";fontStyle:" + (spec.bold && "bold" || (spec.italic && "italic") || ''),
format: "image/png"
format: "image/png",
...assign({}, layer.params)
}
})
]
Expand Down

0 comments on commit ae14a59

Please sign in to comment.