<?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: Access Specific Layers within a MapService to Toggle them on/off in ArcGIS JavaScript Maps SDK Questions</title>
    <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/access-specific-layers-within-a-mapservice-to/m-p/698252#M65021</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I learned that the class &lt;/SPAN&gt;&lt;SPAN style="font-style:italic;"&gt;"featureLayer"&lt;/SPAN&gt;&lt;SPAN&gt; can be used to display an individual layer within both a mapservice or a feature service..&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;A href="http://help.arcgis.com/en/webapi/javascript/arcgis/help/jsapi_start.htm" rel="nofollow noopener noreferrer" target="_blank"&gt;http://help.arcgis.com/en/webapi/javascript/arcgis/help/jsapi_start.htm&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN style="font-style:italic;"&gt;[INDENT]&lt;BLOCKQUOTE class="jive-quote"&gt;dojo.require("esri.layers.FeatureLayer");&lt;BR /&gt;&lt;BR /&gt;The feature layer inherits from the graphics layer and can be used to display features from a single layer in either a Map Service or Feature Service. The layer can be either a (spatial) layer or (non-spatial) table. If the underlying layer (or table) is from a Feature Service, its features can be edited. ESRI- Javascript API Reference&lt;/BLOCKQUOTE&gt;&lt;/SPAN&gt;&lt;SPAN&gt;[/INDENT]&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Here is the code I now have that utilizes this method.. and it works!!:D&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt; var featureLayer = new esri.layers.FeatureLayer("http://gis.co.frederick.va.us/ArcGIS/rest/services/Fire_and_Rescue/Fire_and_Rescue/MapServer/8",{
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; mode: esri.layers.FeatureLayer.MODE_ONDEMAND,
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; displayOnPan:false,outFields: ["*"], opacity:.5, tileWidth:150, tileHeight:150, visible:false,
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; infoTemplate: infoTemplate
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; });&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sun, 12 Dec 2021 05:23:16 GMT</pubDate>
    <dc:creator>AlexGray</dc:creator>
    <dc:date>2021-12-12T05:23:16Z</dc:date>
    <item>
      <title>Access Specific Layers within a MapService to Toggle them on/off</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/access-specific-layers-within-a-mapservice-to/m-p/698251#M65020</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I have access to number of ESRI Mapservices and would like to be able to access specific layers within the mapservices in my online map application I am working on creating with the ESRI Javascript API. &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I have looked at and hoped that I could use this sample map &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;A href="http://help.arcgis.com/en/webapi/javascript/arcgis/demos/map/map_legendvisible.html"&gt;http://help.arcgis.com/en/webapi/javascript/arcgis/demos/map/map_legendvisible.html&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;and substitute some of the data I have access to.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;When I do substitute mapservices that we have here, the sample map will toggle on and off the entire mapservice and not the specific layer I was hoping it would.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Here is the mapservice I am trying to access with this code.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;A href="http://gis1.co.frederick.va.us/ArcGIS/rest/services/Planning/testplanning/MapServer"&gt;http://gis1.co.frederick.va.us/ArcGIS/rest/services/Planning/testplanning/MapServer&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I would love to hear from someone about a solution.. Nothing seems as straight forward as it looks..&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 30 Sep 2010 14:59:06 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/access-specific-layers-within-a-mapservice-to/m-p/698251#M65020</guid>
      <dc:creator>AlexGray</dc:creator>
      <dc:date>2010-09-30T14:59:06Z</dc:date>
    </item>
    <item>
      <title>Re: Access Specific Layers within a MapService to Toggle them on/off</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/access-specific-layers-within-a-mapservice-to/m-p/698252#M65021</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I learned that the class &lt;/SPAN&gt;&lt;SPAN style="font-style:italic;"&gt;"featureLayer"&lt;/SPAN&gt;&lt;SPAN&gt; can be used to display an individual layer within both a mapservice or a feature service..&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;A href="http://help.arcgis.com/en/webapi/javascript/arcgis/help/jsapi_start.htm" rel="nofollow noopener noreferrer" target="_blank"&gt;http://help.arcgis.com/en/webapi/javascript/arcgis/help/jsapi_start.htm&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN style="font-style:italic;"&gt;[INDENT]&lt;BLOCKQUOTE class="jive-quote"&gt;dojo.require("esri.layers.FeatureLayer");&lt;BR /&gt;&lt;BR /&gt;The feature layer inherits from the graphics layer and can be used to display features from a single layer in either a Map Service or Feature Service. The layer can be either a (spatial) layer or (non-spatial) table. If the underlying layer (or table) is from a Feature Service, its features can be edited. ESRI- Javascript API Reference&lt;/BLOCKQUOTE&gt;&lt;/SPAN&gt;&lt;SPAN&gt;[/INDENT]&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Here is the code I now have that utilizes this method.. and it works!!:D&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt; var featureLayer = new esri.layers.FeatureLayer("http://gis.co.frederick.va.us/ArcGIS/rest/services/Fire_and_Rescue/Fire_and_Rescue/MapServer/8",{
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; mode: esri.layers.FeatureLayer.MODE_ONDEMAND,
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; displayOnPan:false,outFields: ["*"], opacity:.5, tileWidth:150, tileHeight:150, visible:false,
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; infoTemplate: infoTemplate
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; });&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 12 Dec 2021 05:23:16 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/access-specific-layers-within-a-mapservice-to/m-p/698252#M65021</guid>
      <dc:creator>AlexGray</dc:creator>
      <dc:date>2021-12-12T05:23:16Z</dc:date>
    </item>
  </channel>
</rss>

