The export options JSON parameter is missing from the request when printing with any template. Other templates still successfully print, but if the MAP_ONLY template is chosen (by first adding it as an option in the printLayouts in the index.html file), the request will fail with the error:
ERROR 001305: Missing or invalid 'exportOptions' property in WebMap; cannot derive a size for the output image. Failed to execute (Export Web Map). Failed to execute (Export Web Map Task).
The attempted remedy of hard-coding the exportOptions parameter either in the index.html file or in the layout.js file (around line 1000) also fails:
exportOptions = {
'outputSize': [
800,
1100
],
"dpi": 96
}
The JSON request adds these parameters, but the outputSize dimensions are set to null, resulting in the same error message:
{
"exportOptions": {
"outputSize": [
null,
null
],
"dpi": 96
}
}
To fix the JSON request, the null values can be changed to [800, 1100]:
{
"exportOptions": {
"outputSize": [
800,
1100
],
"dpi": 96
}
}
The export options JSON parameter is missing from the request when printing with any template. Other templates still successfully print, but if the MAP_ONLY template is chosen (by first adding it as an option in the printLayouts in the index.html file), the request will fail with the error:
ERROR 001305: Missing or invalid 'exportOptions' property in WebMap; cannot derive a size for the output image. Failed to execute (Export Web Map). Failed to execute (Export Web Map Task).
The attempted remedy of hard-coding the exportOptions parameter either in the index.html file or in the layout.js file (around line 1000) also fails:
exportOptions = {
'outputSize': [
800,
1100
],
"dpi": 96
}
The JSON request adds these parameters, but the outputSize dimensions are set to null, resulting in the same error message:
{
"exportOptions": {
"outputSize": [
null,
null
],
"dpi": 96
}
}
To fix the JSON request, the null values can be changed to [800, 1100]:
{
"exportOptions": {
"outputSize": [
800,
1100
],
"dpi": 96
}
}