1
印刷タスクサービスでWebマップ(Esri)をエクスポートしようとしました。 localhostとstaging.xxx.com(http)でも動作しますが、preview.xxx.com(https)では、エラー500がスローされます。実行操作の実行中にエラーが発生しました。ESRI印刷タスク(エクスポートWebマップ)が返されます。
{"error":{"code":500,"message":"Error performing execute operation","details":[]}}
私は何が起こっているのか把握できません。ステージングはhttpとプレビューを使用してhttpsを使用しますが、それは唯一の違いです。
は、ここで私は、Esriのはmap.When Iデバッグをエクスポートするとき、層の詳細は画像(GIF)のURLを送信していましたGIF画像をサポートしていません、問題を発見した
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);