<?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: Using layer.sublayer to reference Feature layers in MapImageLayer in ArcGIS JavaScript Maps SDK Questions</title>
    <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/using-layer-sublayer-to-reference-feature-layers/m-p/174592#M16204</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Arne,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp;Your issue is the method is called&amp;nbsp;findSublayerById NOT&amp;nbsp;findSubLayer&lt;SPAN style="color: #ff0000;"&gt;&lt;STRONG&gt;s&lt;/STRONG&gt;&lt;/SPAN&gt;ById&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 13 Dec 2018 14:00:08 GMT</pubDate>
    <dc:creator>RobertScheitlin__GISP</dc:creator>
    <dc:date>2018-12-13T14:00:08Z</dc:date>
    <item>
      <title>Using layer.sublayer to reference Feature layers in MapImageLayer</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/using-layer-sublayer-to-reference-feature-layers/m-p/174591#M16203</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;So I have a Mapservice that consists of a number of Feature Layers. So&amp;nbsp;at REST endpoint each service has a URL ending in... :&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;Mapserver/0&lt;BR /&gt;Mapserver/1&lt;BR /&gt;Mapserver/2&lt;BR /&gt;etc...&lt;/P&gt;&lt;P&gt;If I want to run some geometry operations on these FeatureLayers, I was hoping to create a new layer:&lt;/P&gt;&lt;DIV style="color: #d4d4d4; background-color: #1e1e1e; font-weight: normal; font-size: 14px;"&gt;&lt;DIV&gt;&lt;SPAN style="color: #569cd6;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN style="font-family: terminal, monaco, monospace;"&gt;&lt;SPAN style="color: #569cd6;"&gt;&amp;nbsp; &amp;nbsp;let&lt;/SPAN&gt;&lt;SPAN style="color: #d4d4d4;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #9cdcfe;"&gt;myLayer&lt;/SPAN&gt;&lt;SPAN style="color: #d4d4d4;"&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN style="color: #d4d4d4;"&gt;=&lt;/SPAN&gt;&lt;SPAN style="color: #d4d4d4;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #569cd6;"&gt;new&lt;/SPAN&gt;&lt;SPAN style="color: #d4d4d4;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #4ec9b0;"&gt;MapImageLayer&lt;/SPAN&gt;&lt;SPAN style="color: #d4d4d4;"&gt;({&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN style="font-family: terminal, monaco, monospace;"&gt;&lt;SPAN style="color: #d4d4d4;"&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN style="color: #9cdcfe;"&gt;url :&lt;/SPAN&gt;&lt;SPAN style="color: #d4d4d4;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #ce9178;"&gt;&lt;A class="jive-link-external-small" href="https://community.esri.com/external-link.jspa?url=https%3A%2F%2F...........%2FMapServer" rel="nofollow" target="_blank"&gt;https://.........../MapServer&lt;/A&gt;&lt;SPAN&gt;"&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN style="font-family: terminal, monaco, monospace;"&gt;&lt;SPAN style="color: #d4d4d4;"&gt; &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN style="color: #d4d4d4; font-family: terminal, monaco, monospace;"&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;})&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt; &lt;/DIV&gt;&lt;/DIV&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;and then later, reference the underlying FeatureLayers as&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;DIV style="color: #d4d4d4; background-color: #1e1e1e; font-weight: normal; font-size: 14px;"&gt;&lt;DIV&gt; &lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN style="color: #9cdcfe; font-family: tahoma, arial, helvetica, sans-serif;"&gt;&amp;nbsp; &amp;nbsp;myLayer.findSubLayersById(...)&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt; &lt;/DIV&gt;&lt;/DIV&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But that results in 'undefined'. Is such only possible after I reference each sublayer when creating myLayer, such as...&lt;/P&gt;&lt;DIV style="color: #d4d4d4; background-color: #1e1e1e; font-weight: normal; font-size: 14px;"&gt;&lt;DIV&gt;&lt;DIV&gt; &lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN style="font-family: tahoma, arial, helvetica, sans-serif;"&gt;&lt;SPAN style="color: #569cd6;"&gt;&amp;nbsp; &amp;nbsp;let&lt;/SPAN&gt;&lt;SPAN style="color: #d4d4d4;"&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN style="color: #9cdcfe;"&gt;myLayer&lt;/SPAN&gt;&lt;SPAN style="color: #d4d4d4;"&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN style="color: #d4d4d4;"&gt;=&lt;/SPAN&gt;&lt;SPAN style="color: #d4d4d4;"&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN style="color: #569cd6;"&gt;new&lt;/SPAN&gt;&lt;SPAN style="color: #d4d4d4;"&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN style="color: #4ec9b0;"&gt;MapImageLayer&lt;/SPAN&gt;&lt;SPAN style="color: #d4d4d4;"&gt;({&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN style="font-family: tahoma, arial, helvetica, sans-serif;"&gt;&lt;SPAN style="color: #9cdcfe;"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; url :&lt;/SPAN&gt;&lt;SPAN style="color: #d4d4d4;"&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN style="color: #ce9178;"&gt;&lt;A class="jive-link-external-small" href="https://community.esri.com/external-link.jspa?url=https%3A%2F%2F...........%2FMapServer" rel="nofollow" target="_blank"&gt;https://.........../MapServer&lt;/A&gt;&lt;SPAN&gt;"&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #d4d4d4;"&gt;,&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN style="font-family: tahoma, arial, helvetica, sans-serif;"&gt;&lt;SPAN style="color: #9cdcfe;"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; sublayers :&lt;/SPAN&gt;&lt;SPAN style="color: #d4d4d4;"&gt;&amp;nbsp;[&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN style="font-family: tahoma, arial, helvetica, sans-serif;"&gt;&lt;SPAN style="color: #d4d4d4;"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;{&lt;/SPAN&gt;&lt;SPAN style="color: #9cdcfe;"&gt;id :&lt;/SPAN&gt;&lt;SPAN style="color: #d4d4d4;"&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN style="color: #b5cea8;"&gt;0&lt;/SPAN&gt;&lt;SPAN style="color: #d4d4d4;"&gt;},&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN style="font-family: tahoma, arial, helvetica, sans-serif;"&gt;&lt;SPAN style="color: #d4d4d4;"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;{&lt;/SPAN&gt;&lt;SPAN style="color: #9cdcfe;"&gt;id :&lt;/SPAN&gt;&lt;SPAN style="color: #d4d4d4;"&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN style="color: #b5cea8;"&gt;1&lt;/SPAN&gt;&lt;SPAN style="color: #d4d4d4;"&gt;},&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN style="color: #d4d4d4; font-family: tahoma, arial, helvetica, sans-serif;"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; ]&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN style="color: #d4d4d4; font-family: tahoma, arial, helvetica, sans-serif;"&gt;&amp;nbsp; &amp;nbsp;})&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN style="color: #3d3d3d; font-family: tahoma, arial, helvetica, sans-serif;"&gt;'&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;DIV style="color: #d4d4d4;"&gt; &lt;/DIV&gt;&lt;DIV style="color: #d4d4d4;"&gt; &lt;/DIV&gt;&lt;DIV style="color: #d4d4d4;"&gt;&lt;SPAN style="color: #000000;"&gt;Or is there&amp;nbsp;a simpler way to bring in all Feature layer and&amp;nbsp;make them accessible? Can&amp;nbsp;create list or collection of all feature layers and then reference them by index?&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 12 Dec 2018 23:09:41 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/using-layer-sublayer-to-reference-feature-layers/m-p/174591#M16203</guid>
      <dc:creator>Arne_Gelfert</dc:creator>
      <dc:date>2018-12-12T23:09:41Z</dc:date>
    </item>
    <item>
      <title>Re: Using layer.sublayer to reference Feature layers in MapImageLayer</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/using-layer-sublayer-to-reference-feature-layers/m-p/174592#M16204</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Arne,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp;Your issue is the method is called&amp;nbsp;findSublayerById NOT&amp;nbsp;findSubLayer&lt;SPAN style="color: #ff0000;"&gt;&lt;STRONG&gt;s&lt;/STRONG&gt;&lt;/SPAN&gt;ById&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 13 Dec 2018 14:00:08 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/using-layer-sublayer-to-reference-feature-layers/m-p/174592#M16204</guid>
      <dc:creator>RobertScheitlin__GISP</dc:creator>
      <dc:date>2018-12-13T14:00:08Z</dc:date>
    </item>
    <item>
      <title>Re: Using layer.sublayer to reference Feature layers in MapImageLayer</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/using-layer-sublayer-to-reference-feature-layers/m-p/174593#M16205</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Robert, thanks for chiming in and for all your other contributions throughout the community. Keep seeing your name all over the place. I think I may have snuck in the extra "s" when making my post because my original code the correct method. I guess where I was going with this&amp;nbsp;question was whether I can only reference sublayers that are explicitly declared when I create my MapImageLayer, which means I'd have to list foo 13 sublayers along with creating naming names for them for later reference. I had hoped there would be a way to access the sublayers along with the names visible at the REST endpoint without having to hardcode them into my MapImageLayer definition.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 17 Dec 2018 16:35:03 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/using-layer-sublayer-to-reference-feature-layers/m-p/174593#M16205</guid>
      <dc:creator>Arne_Gelfert</dc:creator>
      <dc:date>2018-12-17T16:35:03Z</dc:date>
    </item>
  </channel>
</rss>

