<?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: legend: hideLayer for tiled map service in ArcGIS JavaScript Maps SDK Questions</title>
    <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/legend-hidelayer-for-tiled-map-service/m-p/705037#M65610</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Tiled services are a flattened version of your data where all layers are baked into a set of images. Once your tiles are generated, you lose the ability to control individual layer visibility when adding your service to a map as a tiled layer (the tradeoff is less control for better performance). &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;If your data behind the tiles is still on your server, you can add your service as a &lt;/SPAN&gt;&lt;A href="http://help.arcgis.com/en/webapi/javascript/arcgis/help/jsapi/arcgisdynamicmapservicelayer.htm"&gt;dynamic map service&lt;/A&gt;&lt;SPAN&gt;, which gives you the ability to control each layer's visibility. Dynamic services work with &lt;/SPAN&gt;&lt;A href="http://help.arcgis.com/en/webapi/javascript/arcgis/help/jsapi/legend.htm#LegendConst"&gt;hideLayers&lt;/A&gt;&lt;SPAN&gt; while tiled services do not.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 17 Aug 2012 12:31:59 GMT</pubDate>
    <dc:creator>derekswingley1</dc:creator>
    <dc:date>2012-08-17T12:31:59Z</dc:date>
    <item>
      <title>legend: hideLayer for tiled map service</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/legend-hidelayer-for-tiled-map-service/m-p/705036#M65609</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 trying to hide some layers from a service, an ArcGIS 10.1 tiled map service. I am using 3.1 of the API...&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;My legend constructor looks like this:&lt;/SPAN&gt;&lt;BR /&gt;&lt;PRE class="plain" name="code"&gt;geoLegend = new esri.dijit.Legend({ &amp;nbsp;&amp;nbsp; map:myMap, &amp;nbsp;&amp;nbsp; layerInfos: [{layer:myLayer, title: 'My data', hideLayers: [0,1,2,3]}] },"legendDiv");&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;But the hideLayers part doesn't seem to stick... What am I doing wrong? Does this not work on tile service... ?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 17 Aug 2012 12:08:16 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/legend-hidelayer-for-tiled-map-service/m-p/705036#M65609</guid>
      <dc:creator>HugoAhlenius</dc:creator>
      <dc:date>2012-08-17T12:08:16Z</dc:date>
    </item>
    <item>
      <title>Re: legend: hideLayer for tiled map service</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/legend-hidelayer-for-tiled-map-service/m-p/705037#M65610</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Tiled services are a flattened version of your data where all layers are baked into a set of images. Once your tiles are generated, you lose the ability to control individual layer visibility when adding your service to a map as a tiled layer (the tradeoff is less control for better performance). &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;If your data behind the tiles is still on your server, you can add your service as a &lt;/SPAN&gt;&lt;A href="http://help.arcgis.com/en/webapi/javascript/arcgis/help/jsapi/arcgisdynamicmapservicelayer.htm"&gt;dynamic map service&lt;/A&gt;&lt;SPAN&gt;, which gives you the ability to control each layer's visibility. Dynamic services work with &lt;/SPAN&gt;&lt;A href="http://help.arcgis.com/en/webapi/javascript/arcgis/help/jsapi/legend.htm#LegendConst"&gt;hideLayers&lt;/A&gt;&lt;SPAN&gt; while tiled services do not.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 17 Aug 2012 12:31:59 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/legend-hidelayer-for-tiled-map-service/m-p/705037#M65610</guid>
      <dc:creator>derekswingley1</dc:creator>
      <dc:date>2012-08-17T12:31:59Z</dc:date>
    </item>
    <item>
      <title>Re: legend: hideLayer for tiled map service</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/legend-hidelayer-for-tiled-map-service/m-p/705038#M65611</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hi Derek, thanks for the response. I was aware that I wouldn't be able to hide layers in the map view for a tiled service, but the legend is still dynamically rendered, when it is requested, right? I had some hope that one would still be able to hide some layers in the legend display! Should I enter this as a feature request on the ideas website?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 20 Aug 2012 07:51:09 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/legend-hidelayer-for-tiled-map-service/m-p/705038#M65611</guid>
      <dc:creator>HugoAhlenius</dc:creator>
      <dc:date>2012-08-20T07:51:09Z</dc:date>
    </item>
    <item>
      <title>Re: legend: hideLayer for tiled map service</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/legend-hidelayer-for-tiled-map-service/m-p/705039#M65612</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I'll double check on this and get back to you.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 20 Aug 2012 14:57:05 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/legend-hidelayer-for-tiled-map-service/m-p/705039#M65612</guid>
      <dc:creator>derekswingley1</dc:creator>
      <dc:date>2012-08-20T14:57:05Z</dc:date>
    </item>
    <item>
      <title>Re: legend: hideLayer for tiled map service</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/legend-hidelayer-for-tiled-map-service/m-p/705040#M65613</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Dereks solution below is way better than my css hack.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 20 Aug 2012 16:43:54 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/legend-hidelayer-for-tiled-map-service/m-p/705040#M65613</guid>
      <dc:creator>ReneRubalcava</dc:creator>
      <dc:date>2012-08-20T16:43:54Z</dc:date>
    </item>
    <item>
      <title>Re: legend: hideLayer for tiled map service</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/legend-hidelayer-for-tiled-map-service/m-p/705041#M65614</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Here's a modified version of the &lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="http://help.arcgis.com/en/webapi/javascript/arcgis/help/jssamples/widget_legend.html" rel="nofollow" target="_blank"&gt;Legend sample&lt;/A&gt;&lt;SPAN&gt; that uses a tiled service and hides a single layer:&amp;nbsp; &lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="http://jsfiddle.net/wxC5k/" rel="nofollow" target="_blank"&gt;http://jsfiddle.net/wxC5k/&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;The key line is:&lt;/SPAN&gt;&lt;BR /&gt;&lt;PRE class="plain" name="code"&gt;layerInfo[0].hideLayers = [1];&lt;/PRE&gt;&lt;DIV style="display:none;"&gt; &lt;/DIV&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;One thing to check is that your layer indexes in hideLayers correspond to valid layer indexes in your map service.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;STRONG&gt;Edit&lt;/STRONG&gt;&lt;SPAN&gt;: Wanted to clarify that my previous post in this thread was wrong, you can use hideLayers with tiled services.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 20 Aug 2012 17:08:29 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/legend-hidelayer-for-tiled-map-service/m-p/705041#M65614</guid>
      <dc:creator>derekswingley1</dc:creator>
      <dc:date>2012-08-20T17:08:29Z</dc:date>
    </item>
    <item>
      <title>Re: legend: hideLayer for tiled map service</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/legend-hidelayer-for-tiled-map-service/m-p/705042#M65615</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;ok, thanks! - will need to experiment more with this... !&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 21 Aug 2012 06:50:31 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/legend-hidelayer-for-tiled-map-service/m-p/705042#M65615</guid>
      <dc:creator>HugoAhlenius</dc:creator>
      <dc:date>2012-08-21T06:50:31Z</dc:date>
    </item>
  </channel>
</rss>

