<?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: Export Web Map Specification - map service layer  - layers array not used in ArcGIS JavaScript Maps SDK Questions</title>
    <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/export-web-map-specification-map-service-layer/m-p/758799#M70228</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;"layers" property is for dynamic layers, not for controlling to exclude/include sub layers in the printout. In short, if there is no dynamic layers in the map, "layers" shouldn't be used.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;For more information about dynamic layers, please visit:&lt;/SPAN&gt;&lt;BR /&gt;&lt;A href="http://help.arcgis.com/en/webapi/javascript/arcgis/help/jsapi_start.htm#jsapi/dynamiclayerinfo.htm"&gt;http://help.arcgis.com/en/webapi/javascript/arcgis/help/jsapi_start.htm#jsapi/dynamiclayerinfo.htm&lt;/A&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 27 Jul 2012 22:35:04 GMT</pubDate>
    <dc:creator>JianHuang</dc:creator>
    <dc:date>2012-07-27T22:35:04Z</dc:date>
    <item>
      <title>Export Web Map Specification - map service layer  - layers array not used</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/export-web-map-specification-map-service-layer/m-p/758798#M70227</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hi,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I am generating json for the &lt;/SPAN&gt;&lt;SPAN style="font-style:italic;"&gt;Export Web Map Task&lt;/SPAN&gt;&lt;SPAN&gt;. The web map contains one operational layer, a map service layer. I can set layer visibility using the &lt;/SPAN&gt;&lt;SPAN style="color: #0066cc; text-decoration: underline;"&gt;visibleLayers&lt;/SPAN&gt;&lt;SPAN&gt; array. However, I also need to control if labels are displayed. The layers array is meant to provide this sort of functionality. But when I populate the layers array it is not being used at all. Even if I specify the minimal amount of data for a layer eg &lt;/SPAN&gt;&lt;SPAN style="color: #0066cc; text-decoration: underline;"&gt;{"id":2}&lt;/SPAN&gt;&lt;SPAN&gt; it does not work.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;The following json exports all layers rather than just layer 2 as specified (see &lt;/SPAN&gt;&lt;SPAN style="color: #0066cc; text-decoration: underline;"&gt;"layers":[{"id":2}]&lt;/SPAN&gt;&lt;SPAN&gt;) :&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;&lt;SPAN&gt;{"mapOptions":{"extent":{"xmin":-119.99765880885,"ymin":35.101642914773109,"xmax":-119.06245925015001,"ymax":35.652787188033635,"spatialReference":{"wkid":4326,"wkt":null}},"scale":524039.9997638216,"rotation":0,"spatialReference":{"wkid":4326,"wkt":null},"time":null},"operationalLayers":[{"id":"Military","url":"&lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="http://sampleserver6.arcgisonline.com:80/arcgis/rest/services/Military/MapServer" rel="nofollow" target="_blank"&gt;http://sampleserver6.arcgisonline.com:80/arcgis/rest/services/Military/MapServer&lt;/A&gt;&lt;SPAN&gt;","token":"","title":"Military","visibility":true,"opacity":1,"minScale":0,"maxScale":0,"gdbVersion":null,"visibleLayers":[],"layers":[{"id":2}]}],"baseMap":{"title":null,"baseMapLayers":[]},"exportOptions":{"dpi":null,"outputSize":[750,442]},"layoutOptions":{"titleText":null,"authorText":null,"copyrightText":null,"scaleBarOptions":{"metricUnit":null,"metricLabel":null,"nonMetricUnit":null,"nonMetricLabel":null},"customTextElements":{},"legendOptions":{"operationalLayers":null}}}&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;The following works, but is uses the the &lt;/SPAN&gt;&lt;SPAN style="color: #0066cc; text-decoration: underline;"&gt;visibleLayers&lt;/SPAN&gt;&lt;SPAN&gt; array:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;&lt;SPAN&gt;{"mapOptions":{"extent":{"xmin":-119.99765880885,"ymin":35.101642914773109,"xmax":-119.06245925015001,"ymax":35.652787188033635,"spatialReference":{"wkid":4326,"wkt":null}},"scale":524039.9997638216,"rotation":0,"spatialReference":{"wkid":4326,"wkt":null},"time":null},"operationalLayers":[{"id":"Military","url":"&lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="http://sampleserver6.arcgisonline.com:80/arcgis/rest/services/Military/MapServer" rel="nofollow" target="_blank"&gt;http://sampleserver6.arcgisonline.com:80/arcgis/rest/services/Military/MapServer&lt;/A&gt;&lt;SPAN&gt;","token":"","title":"Military","visibility":true,"opacity":1,"minScale":0,"maxScale":0,"gdbVersion":null,"visibleLayers":[2],"layers":[]}],"baseMap":{"title":null,"baseMapLayers":[]},"exportOptions":{"dpi":null,"outputSize":[750,442]},"layoutOptions":{"titleText":null,"authorText":null,"copyrightText":null,"scaleBarOptions":{"metricUnit":null,"metricLabel":null,"nonMetricUnit":null,"nonMetricLabel":null},"customTextElements":{},"legendOptions":{"operationalLayers":null}}}&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;You can test at:&lt;/SPAN&gt;&lt;BR /&gt;&lt;A href="http://sampleserver6.arcgisonline.com/arcgis/rest/services/Utilities/PrintingTools/GPServer/Export Web Map Task/execute"&gt;http://sampleserver6.arcgisonline.com/arcgis/rest/services/Utilities/PrintingTools/GPServer/Export Web Map Task/execute&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Any help/&lt;/SPAN&gt;&lt;SPAN style="color: #222222; font-family: Verdana;"&gt;guidance w&lt;/SPAN&gt;&lt;SPAN&gt;ould be appreciated.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thank you.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;PS I forgot to mention that the example map above does not have dynamic layers enabled. However, I have also tested on another site where dynamic layers are enabled and I get the same results.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 26 Jul 2012 04:16:15 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/export-web-map-specification-map-service-layer/m-p/758798#M70227</guid>
      <dc:creator>ScottSugden</dc:creator>
      <dc:date>2012-07-26T04:16:15Z</dc:date>
    </item>
    <item>
      <title>Re: Export Web Map Specification - map service layer  - layers array not used</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/export-web-map-specification-map-service-layer/m-p/758799#M70228</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;"layers" property is for dynamic layers, not for controlling to exclude/include sub layers in the printout. In short, if there is no dynamic layers in the map, "layers" shouldn't be used.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;For more information about dynamic layers, please visit:&lt;/SPAN&gt;&lt;BR /&gt;&lt;A href="http://help.arcgis.com/en/webapi/javascript/arcgis/help/jsapi_start.htm#jsapi/dynamiclayerinfo.htm"&gt;http://help.arcgis.com/en/webapi/javascript/arcgis/help/jsapi_start.htm#jsapi/dynamiclayerinfo.htm&lt;/A&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 27 Jul 2012 22:35:04 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/export-web-map-specification-map-service-layer/m-p/758799#M70228</guid>
      <dc:creator>JianHuang</dc:creator>
      <dc:date>2012-07-27T22:35:04Z</dc:date>
    </item>
    <item>
      <title>Re: Export Web Map Specification - map service layer  - layers array not used</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/export-web-map-specification-map-service-layer/m-p/758800#M70229</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hi Jian,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thank you for the feedback.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;But if dynamic layers are enabled for that map service can I not use "layers" to exclude/include sub layers in the printout? If not, for those layers in the map service that have labels how I am to exclude/include labels per layer based on the client side settings in the printout?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 28 Jul 2012 19:42:53 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/export-web-map-specification-map-service-layer/m-p/758800#M70229</guid>
      <dc:creator>ScottSugden</dc:creator>
      <dc:date>2012-07-28T19:42:53Z</dc:date>
    </item>
  </channel>
</rss>

