Skip to content
Snippets Groups Projects
Commit b1838f22 authored by olivier.guyot's avatar olivier.guyot
Browse files

Merge branch 'fix-impression-wmts' into 'master'

fix: projection code on wmts print

See merge request pub/geomatique/descartes/d-inkmap!16
parents ac0e1ee1 d51a06a1
No related branches found
No related tags found
No related merge requests found
......@@ -75,10 +75,14 @@ var print = {
// by default do not encode the target url, otherwise some urls with existing params
// might not work well down the line
urlObj.search = url;
// make sure we have at least one query mark in the target url
// (encode the ? in that case, otherwise it will get removed)
if (url.indexOf('?') === -1) {
// make sure we have at least one query mark in the target url
// (encode the ? in that case, otherwise it will get removed)
urlObj.search = url + encodeURIComponent('?');
} else if (url.substr(-1, 1) === '?') {
// if the url ends with a query mark, simply encode it to have the
// same result as above
urlObj.search = url.substr(0, url.length - 1) + encodeURIComponent('?');
}
return urlObj.toString();
});
......@@ -115,7 +119,7 @@ var print = {
layer: resourceLayer.layerName,
opacity: layer.opacity / 100,
matrixSet: layer.matrixSet,
projection: layer.projection.getCode(),
projection: layer.projection,
format: layer.format,
style: resourceLayer.layerStyles || 'default',
tileGrid: {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment