ESRI 打印任务(导出网络地图)returns 500

ESRI Print Task (export web map) returns 500

我尝试使用打印任务服务导出 web 地图 (Esri)。它在 localhost 和 staging.xxx.com(http) too.But 中工作 preview.xxx.com(https) ,它抛出错误 500: Error performing execute operation.

{"error":{"code":500,"message":"Error performing execute operation","details":[]}}

我不知道发生了什么,暂存使用 http 而预览使用 https,这是唯一的区别。

这是我的代码

        var printTask = new esriLoader.PrintTask(PrintTaskServiceUrl);
        esriLoader.Config.defaults.io.proxyUrl = proxyUrl;
        esriLoader.Config.defaults.io.alwaysUseProxy = true;
        var template = new esriLoader.PrintTemplate();
        template.exportOptions = {
            width: 1015,
            height: 633,
            dpi: 96 // if 200 ,map image will get good quality
        };
        template.format = "JPG";
        template.layout = "MAP_ONLY",
        template.preserveScale = false;
        template.showLabels = true;
        template.showAttribution = false;

        template.layoutOptions = {
            "legendLayers": [], // empty array means no legend
            "scalebarUnit": "Miles",
            "copyrightText": "<div>xxx</div>",
        }
        var params = new esriLoader.PrintParameters();

        params.map = map;
        params.template = template;

        printTask.execute(params, success, error);

我发现了问题,导出时 Esri 将不支持 GIF 图像 map.When 我调试了,图层详细信息使用 url 图像 (gif) 发送,当我替换时问题已解决带有 png 的 gif..

{
        "id": "userLocation",
        "opacity": 1,
        "minScale": 0,
        "maxScale": 0,
        "featureCollection": {
            "layers": [{
                "layerDefinition": {
                    "name": "pointLayer",
                    "geometryType": "esriGeometryPoint"
                },
                "featureSet": {
                    "geometryType": "esriGeometryPoint",
                    "features": [{
                        "geometry": {
                            "x": 76.299399,
                            "y": 9.963090099999999,
                            "spatialReference": {
                                "wkid": 2226
                            }
                        },
                        "symbol": {
                            "angle": 0,
                            "xoffset": 0,
                            "yoffset": 0,
                            "type": "esriPMS",
                            "url": *"https://example.mine.com/Images/blue_marker.gif"*,
                            "width": 26.25,
                            "height": 26.25
                        }
                    }]
                }
            }]
        }
    }

当我将 gif 更改为 png 时问题已解决 https://example.mine.com/Images/blue_marker.png