AnsweredAssumed Answered

esri js api post for exportMap

Question asked by NicolasGIS on Apr 4, 2017
Latest reply on Sep 25, 2017 by NicolasGIS

Hello,

 

I have an arcgis ArcGISDynamicMapServiceLayer with quite a big number of "layerDefinitions" applied with the "setLayerDefinitions" method. 

The problem is that the GET export REST function of ArcGIS Server 10.4.1 (with webadaptor on IIS) does not work as the request is too big so a POST would be necessary.

 

It is stated in the documentation that "If the layer definition expression is longer than approximately 2000 characters you will need to set up a proxy page.". 

 

I configured the ESRI proxy GitHub project on my server and configured JS api (3.20) to always use the proxy:

esriConfig.defaults.io.proxyUrl = "<url_to_proxy>"
esriConfig
.defaults.io.alwaysUseProxy = true;

The problem is that requests are still sent as GET operation so it does not work as well.

 

How am I supposed to tell JS API to POST for export map operation either directly to the REST api or to the proxy ?

 

Thanks for your help,

 

Nicolas

Outcomes