AnsweredAssumed Answered

WebApp Builder 2.9 Print widget does not send correct baseMap in Web_Map_as_JSON

Question asked by svator on Oct 10, 2018
Latest reply on Oct 15, 2018 by svator

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":"<my WMTS server>",
    "layer":"<my layer title>",
    "format":"image/png",
    "tileMatrixSet":"EPSG:900913"

}

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://<my WMTS server>?SERVICE=WMTS&VERSION=1.0.0&REQUEST=GetTile&LAYER=<my layer title>&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":[
            ]
        }
    }

}

Outcomes