1

I am using the print dijit so as to export a web map that contain a WebTiledLayer. When I use as of the export servive one that directs to arcgis online it works properly. On the other hand when I change the url, so as to point to my service, exporting fails, getting a timeout error which says : dojo.io.script error RequestTimeoutError: Timeout exceeded { message="Timeout exceeded"............

My server is arcgis 10.2.2 while the online one is 10.2.1, but I dont think this can be a problem I

  <script>
  var app = {};
  app.map = null; app.toolbar = null; app.tool = null; app.symbols = null; app.printer = null;
  require([
  "esri/layers/WebTiledLayer",
    "esri/map", "esri/dijit/Print",
    "dojo/dom", "dijit/form/Button",
  ], function(

  WebTiledLayer,
    Map, Print,
     dom, 
     Button
  ) {
    app.map = new Map("map", {
      center: [0, 0],
      zoom: 3
    });
    // print dijit
    app.printer = new Print({
      map: app.map,
      url: "http://sampleserver6.arcgisonline.com/arcgis/rest/services/Utilities/PrintingTools/GPServer/Export%20Web%20Map%20Task"
      //url: "http://myserver:6080/arcgis/rest/services/Utilities/PrintingTools/GPServer/Export%20Web%20Map%20Task"
    }, 
    dom.byId("printButton"));
    app.printer.startup();
    var tiles="http://www.mytiles.int/cpdbmap/graybasemap/{z}/{x}/{y}.png" ;
    var tiledLayer = new esri.layers.WebTiledLayer(tiles.replace('{z}/{x}/{y}','${level}/${col}/${row}'), {
                    id: "anID"
                });
     app.map.addLayer(tiledLayer);
  });
</script>
  • Is the service myserver:6080/arcgis/rest/services/Utilities/PrintingTools/… of the same execution type (esriExecutionTypeSynchronous) as the arcgisonline one? – Aamir Suleman Feb 9 '15 at 21:54
  • Yes it is of the same type. – Smalis Feb 9 '15 at 22:39
  • the next question then is whether or not the 'arcgis' user on the machine hosting ArcGIS Server is allowed to make internet requests to access the resources you'd like to print. – John Gravois Feb 10 '15 at 15:03
  • @JohnGravois If you mean if there is connectivity. Yes there is. From the machine hosting the gis server I can see the tiled map. Only the PrintTask service is not able to do it. – Smalis Feb 10 '15 at 15:44
  • @JohnGravois Connectivity of the service to external resouses (in my case the tiled service) could be the problem. But how could I check if my arcgis user who owns the service (PrintTask) can see external resources ? – Smalis Feb 10 '15 at 17:04

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.