<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: How do I pass the clipping parameter for the export request in ArcGIS API for JavaScript 3 in ArcGIS JavaScript Maps SDK Questions</title>
    <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/how-do-i-pass-the-clipping-parameter-for-the/m-p/1241967#M79660</link>
    <description>&lt;P&gt;I guess that could work if I did the request manually myself whenever the map was panned or zoomed, but I'd prefer letting the API do the export request itself.&lt;/P&gt;&lt;P&gt;I did some experimenting and found that I could hack in some extra parameters by adding them to the private &lt;STRONG&gt;_params&lt;/STRONG&gt; property of the layer.&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;Ex:&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;const layer = &lt;/SPAN&gt;&lt;SPAN&gt;new&lt;/SPAN&gt; &lt;SPAN&gt;ArcGISDynamicMapServiceLayer&lt;/SPAN&gt;&lt;SPAN&gt;(url, options)&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&lt;SPAN&gt;layer._params.clipping =&amp;nbsp;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN&gt;JSON&lt;/SPAN&gt;&lt;SPAN&gt;.&lt;/SPAN&gt;&lt;SPAN&gt;stringify&lt;/SPAN&gt;&lt;SPAN&gt;({&lt;/SPAN&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;geometryType&lt;/SPAN&gt;&lt;SPAN&gt;:&lt;/SPAN&gt; &lt;SPAN&gt;'esriGeometryPolygon'&lt;/SPAN&gt;&lt;SPAN&gt;,&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;geometry&lt;/SPAN&gt;&lt;SPAN&gt;:&lt;/SPAN&gt;&lt;SPAN&gt; {&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;rings&lt;/SPAN&gt;&lt;SPAN&gt;: [[[382057.1446,5390601.6059],[382057.2633,5390601.4493],[382057.3779,5390601.2897],[382057.4883,5390601.1272],[382057.5946,5390600.9619],[382057.6965,5390600.7939],[382057.7941,5390600.6234],[382057.8872,5390600.4504],[382057.9758,5390600.275],[382058.0599,5390600.0974],[382058.1394,5390599.9177],[382058.2142,5390599.736],[382058.2844,5390599.5525],[382058.3497,5390599.3672],[382058.4103,5390599.1803],[382058.466,5390598.9919],[382058.5169,5390598.8021],[382058.5628,5390598.611],[382058.6038,5390598.4189],[382058.6398,5390598.2257],[382058.6708,5390598.0317],[382058.6969,5390597.8369],[382058.7178,5390597.6416],[382058.7338,5390597.4457],[382058.7447,5390597.2495],[382058.7505,5390597.0531],[382058.7513,5390596.8566]]],&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;spatialReference&lt;/SPAN&gt;&lt;SPAN&gt;:&lt;/SPAN&gt;&lt;SPAN&gt; { &lt;/SPAN&gt;&lt;SPAN&gt;wkid&lt;/SPAN&gt;&lt;SPAN&gt;:&lt;/SPAN&gt; &lt;SPAN&gt;32188&lt;/SPAN&gt;&lt;SPAN&gt;, &lt;/SPAN&gt;&lt;SPAN&gt;latestWkid&lt;/SPAN&gt;&lt;SPAN&gt;:&lt;/SPAN&gt; &lt;SPAN&gt;32188&lt;/SPAN&gt;&lt;SPAN&gt; }&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;}&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;})&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;It works, the image is clipped properly.&lt;/DIV&gt;&lt;DIV&gt;Thanks&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;</description>
    <pubDate>Fri, 16 Dec 2022 16:46:13 GMT</pubDate>
    <dc:creator>YohanBienvenue</dc:creator>
    <dc:date>2022-12-16T16:46:13Z</dc:date>
    <item>
      <title>How do I pass the clipping parameter for the export request in ArcGIS API for JavaScript 3</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/how-do-i-pass-the-clipping-parameter-for-the/m-p/1241684#M79656</link>
      <description>&lt;P&gt;Starting at ArcGIS Server 10.8, for map services using the ArcGIS Pro runtime, the&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;A href="https://developers.arcgis.com/rest/services-reference/enterprise/export-map.htm" rel="nofollow noreferrer" target="_blank"&gt;export&lt;/A&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;request now supports the&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;STRONG&gt;clipping&lt;/STRONG&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;parameter to clip the image produced, according to the geometry included in the clipping parameter.&lt;/P&gt;&lt;P&gt;This works fine when I test it manually (e.g. Either through the ArcGIS REST Services Directory for the export request, or by using Postman). The image is clipped. However I need to do this clipping within a web application using the&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;A href="https://developers.arcgis.com/javascript/3/jsapi/" rel="nofollow noreferrer" target="_blank"&gt;ArcGIS API for Javascript 3&lt;/A&gt;.&lt;/P&gt;&lt;P&gt;For instance for the&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;A href="https://developers.arcgis.com/javascript/3/jsapi/arcgisdynamicmapservicelayer-amd.html" rel="nofollow noreferrer" target="_blank"&gt;ArcGISDynamicMapServiceLayer&lt;/A&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;I see no obvious way to input this&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;STRONG&gt;clipping&lt;/STRONG&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;parameter. Neither directly or through some other configuration. Is this possible?&lt;/P&gt;&lt;P&gt;If this is not currently supported in the ArcGIS API for Javascript 3, is there a way to hack in some extra parameters when the API makes&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;STRONG&gt;export&lt;/STRONG&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;requests? So that I could manually set this clipping myself?&lt;/P&gt;</description>
      <pubDate>Thu, 15 Dec 2022 19:19:44 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/how-do-i-pass-the-clipping-parameter-for-the/m-p/1241684#M79656</guid>
      <dc:creator>YohanBienvenue</dc:creator>
      <dc:date>2022-12-15T19:19:44Z</dc:date>
    </item>
    <item>
      <title>Re: How do I pass the clipping parameter for the export request in ArcGIS API for JavaScript 3</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/how-do-i-pass-the-clipping-parameter-for-the/m-p/1241801#M79657</link>
      <description>&lt;P&gt;In terms of hacks, I think &lt;A href="https://developers.arcgis.com/javascript/3/jsapi/esri.request-amd.html#esrirequest.setrequestprecallback" target="_self"&gt;esriRequest.setRequestPreCallback&lt;/A&gt; may be your best bet.&amp;nbsp; It allows you to intercept and modify requests before they're sent.&amp;nbsp; I think it's there that you could add the clipping parameter and value.&lt;/P&gt;</description>
      <pubDate>Thu, 15 Dec 2022 23:18:17 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/how-do-i-pass-the-clipping-parameter-for-the/m-p/1241801#M79657</guid>
      <dc:creator>JoelBennett</dc:creator>
      <dc:date>2022-12-15T23:18:17Z</dc:date>
    </item>
    <item>
      <title>Re: How do I pass the clipping parameter for the export request in ArcGIS API for JavaScript 3</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/how-do-i-pass-the-clipping-parameter-for-the/m-p/1241967#M79660</link>
      <description>&lt;P&gt;I guess that could work if I did the request manually myself whenever the map was panned or zoomed, but I'd prefer letting the API do the export request itself.&lt;/P&gt;&lt;P&gt;I did some experimenting and found that I could hack in some extra parameters by adding them to the private &lt;STRONG&gt;_params&lt;/STRONG&gt; property of the layer.&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;Ex:&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;const layer = &lt;/SPAN&gt;&lt;SPAN&gt;new&lt;/SPAN&gt; &lt;SPAN&gt;ArcGISDynamicMapServiceLayer&lt;/SPAN&gt;&lt;SPAN&gt;(url, options)&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&lt;SPAN&gt;layer._params.clipping =&amp;nbsp;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN&gt;JSON&lt;/SPAN&gt;&lt;SPAN&gt;.&lt;/SPAN&gt;&lt;SPAN&gt;stringify&lt;/SPAN&gt;&lt;SPAN&gt;({&lt;/SPAN&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;geometryType&lt;/SPAN&gt;&lt;SPAN&gt;:&lt;/SPAN&gt; &lt;SPAN&gt;'esriGeometryPolygon'&lt;/SPAN&gt;&lt;SPAN&gt;,&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;geometry&lt;/SPAN&gt;&lt;SPAN&gt;:&lt;/SPAN&gt;&lt;SPAN&gt; {&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;rings&lt;/SPAN&gt;&lt;SPAN&gt;: [[[382057.1446,5390601.6059],[382057.2633,5390601.4493],[382057.3779,5390601.2897],[382057.4883,5390601.1272],[382057.5946,5390600.9619],[382057.6965,5390600.7939],[382057.7941,5390600.6234],[382057.8872,5390600.4504],[382057.9758,5390600.275],[382058.0599,5390600.0974],[382058.1394,5390599.9177],[382058.2142,5390599.736],[382058.2844,5390599.5525],[382058.3497,5390599.3672],[382058.4103,5390599.1803],[382058.466,5390598.9919],[382058.5169,5390598.8021],[382058.5628,5390598.611],[382058.6038,5390598.4189],[382058.6398,5390598.2257],[382058.6708,5390598.0317],[382058.6969,5390597.8369],[382058.7178,5390597.6416],[382058.7338,5390597.4457],[382058.7447,5390597.2495],[382058.7505,5390597.0531],[382058.7513,5390596.8566]]],&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;spatialReference&lt;/SPAN&gt;&lt;SPAN&gt;:&lt;/SPAN&gt;&lt;SPAN&gt; { &lt;/SPAN&gt;&lt;SPAN&gt;wkid&lt;/SPAN&gt;&lt;SPAN&gt;:&lt;/SPAN&gt; &lt;SPAN&gt;32188&lt;/SPAN&gt;&lt;SPAN&gt;, &lt;/SPAN&gt;&lt;SPAN&gt;latestWkid&lt;/SPAN&gt;&lt;SPAN&gt;:&lt;/SPAN&gt; &lt;SPAN&gt;32188&lt;/SPAN&gt;&lt;SPAN&gt; }&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;}&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;})&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;It works, the image is clipped properly.&lt;/DIV&gt;&lt;DIV&gt;Thanks&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;</description>
      <pubDate>Fri, 16 Dec 2022 16:46:13 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/how-do-i-pass-the-clipping-parameter-for-the/m-p/1241967#M79660</guid>
      <dc:creator>YohanBienvenue</dc:creator>
      <dc:date>2022-12-16T16:46:13Z</dc:date>
    </item>
    <item>
      <title>Re: How do I pass the clipping parameter for the export request in ArcGIS API for JavaScript 3</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/how-do-i-pass-the-clipping-parameter-for-the/m-p/1242020#M79663</link>
      <description>&lt;P&gt;Actually Joel, you were right. It does appear that&amp;nbsp;&lt;SPAN&gt;esriRequest&lt;/SPAN&gt;&lt;SPAN&gt;.&lt;/SPAN&gt;&lt;SPAN&gt;setRequestPreCallback is called for each and every export request automatically. That's very nice, and will simplify a lot of things for me.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Thanks!&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 16 Dec 2022 15:29:20 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/how-do-i-pass-the-clipping-parameter-for-the/m-p/1242020#M79663</guid>
      <dc:creator>YohanBienvenue</dc:creator>
      <dc:date>2022-12-16T15:29:20Z</dc:date>
    </item>
  </channel>
</rss>

