1. 程式人生 > >地圖打印出現400錯誤,是由於ArcGIS Server釋出服務命名的Bug造成

地圖打印出現400錯誤,是由於ArcGIS Server釋出服務命名的Bug造成

 

       最近在利用arcgis api for js開發一個列印的功能,起初為了服務名稱能規範點,釋出的服務都是帶字尾MapServer,如在這個專案上命名為GridMapServer,就會出現地圖列印功能出現400錯誤,只要重新起一個名字就行了,希望能幫到大家。這個錯誤花了幾天的時間排查最後才發現,神坑......

"Error executing tool.: Layer "grid500": Failed to create layer from service at http://localhost:6080/arcgis/rest/services/

GridMapServer/MapServer/0.↵ERROR: code:400, Invalid URL, Bad syntax in request.↵Failed to execute (Export Web Map).↵Failed to execute (Export Web Map Task)."