2016-03-30 18 views
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); 

答えて

0

私のコードだし、問題が解決します私はPNGとGIFを交換したときに、私はhttps://example.mine.com/Images/blue_marker.png

を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 
         } 
        }] 
       } 
      }] 
     } 
    } 

解決した問題

関連する問題