ArcGIS API for JS 打印功能报错

ArcGIS JS 3.x,使用printtask方法打印地图,但是会报错"Error executing tool. Export Web Map Job",server上的日志报错则是

无法与服务器建立连接 (WinINet Error while using HTTPS security, 12029), URL = http:///arcgis/rest/services/ditu/MapServer/17


Error executing tool. Export Web Map Job ID: jbb275dbabcd848d6879fd5c199ec175c : Layer "ditu": Unable to connect to map server at http:///arcgis/rest/services/ditu/MapServer. Layer "ditu": Failed to create layer from service at http:///arcgis/rest/services/ditu/MapServer/17. Failed to execute (ExportWebMap). Failed to execute (Export Web Map).


想想应该是跨域的问题,尝试了代理的方法(https://github.com/Esri/resource-proxy/blob/master/Java/README.md)但不是特别明白,在配置完proxy.config和proxy.jsp文件之后,添加了如下代码
esri.config.defaults.io.proxyUrl= "http://192.168.0.207:9391/Java/proxy.jsp";

esri.config.defaults.io.alwaysUseProxy= false;
会报错,好像还是没解决跨域问题

Access to XMLHttpRequest at 'XXX' from origin 'YYY' has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource.


已邀请:

许丹石

赞同来自:

http://域名/arcgis/rest/services/ditu/MapServer/17看起来是一个通过代理后的地址。以原始的服务的6080或6443访问是否可以呢?

要回复问题请先登录注册