When I select a WMTS baseMap in BasemapGallery widget, and then try to use the Print Widget. The background map is blank when i try to print.
I have made two observations in the WebMap JSON. Firstly, why is the basemap in operationalLayers (see below JSON)? Should'nt it be in a "baseMap": [{}]? Secondly, when looking at ExportWebMap specification—Documentation (10.5) | ArcGIS Enterprise I realize that in order to get my WMTS based background map to work with the Printing GP i need to have it in following format:
{
"type":"wmts",
"url":"<SPAN class="token tag"><SPAN class="token tag"><SPAN class="punctuation token"><</SPAN>my</SPAN> <SPAN class="attr-name token">WMTS</SPAN> <SPAN class="attr-name token">server</SPAN><SPAN class="punctuation token">></SPAN></SPAN>",
"layer":"<SPAN class="token tag"><SPAN class="token tag"><SPAN class="punctuation token"><</SPAN>my</SPAN> <SPAN class="attr-name token">layer</SPAN> <SPAN class="attr-name token">title</SPAN><SPAN class="punctuation token">></SPAN></SPAN>",
"format":"image/png",
"tileMatrixSet":"EPSG:900913"
}<SPAN class="line-numbers-rows"><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN></SPAN>Here below is what is being sent from Print Widget to Print GP:
{
"mapOptions":{
"showAttribution":true,
"extent":{
"xmin":1930303.7983142724,
"ymin":8351147.285023411,
"xmax":1989924.6803766293,
"ymax":8386117.225463833,
"spatialReference":{
"wkid":102100
}
},
"spatialReference":{
"wkid":102100
},
"scale":144447.638572
},
"operationalLayers":[
{
"id":"layer2",
"title":"layer2",
"opacity":1,
"minScale":0,
"maxScale":0,
"type":"WebTiledLayer",
"urlTemplate":"http://<SPAN class="token tag"><SPAN class="token tag"><SPAN class="punctuation token"><</SPAN>my</SPAN> <SPAN class="attr-name token">WMTS</SPAN> <SPAN class="attr-name token">server</SPAN><SPAN class="punctuation token">></SPAN></SPAN>?SERVICE=WMTS&VERSION=1.0.0&REQUEST=GetTile&LAYER=<SPAN class="token tag"><SPAN class="token tag"><SPAN class="punctuation token"><</SPAN>my</SPAN> <SPAN class="attr-name token">layer</SPAN> <SPAN class="attr-name token">title</SPAN><SPAN class="punctuation token">></SPAN></SPAN>&STYLE=&FORMAT=image/png&TILEMATRIXSET=EPSG:900913&TILEMATRIX={level}&TILEROW={row}&TILECOL={col}",
"credits":""
}
],
"exportOptions":{
"outputSize":[
670,
500
],
"dpi":96
},
"layoutOptions":{
"titleText":"",
"authorText":"",
"copyrightText":"",
"customTextElements":[
{
"Ordernummer":"Number"
},
{
"Name":"Name"
},
{
"Date":"2018-10-10 10:30:42"
}
],
"scaleBarOptions":{
"metricUnit":"esriKilometers",
"metricLabel":"km",
"nonMetricUnit":"esriMiles",
"nonMetricLabel":"mi"
},
"legendOptions":{
"operationalLayers":[
]
}
}
}<SPAN class="line-numbers-rows"><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN></SPAN>