<?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: Custom feature layer does not show in Legend. in ArcGIS JavaScript Maps SDK Questions</title>
    <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/custom-feature-layer-does-not-show-in-legend/m-p/1317510#M81944</link>
    <description>&lt;P&gt;It doesn't look like it; conditional logic based upon the declaredClass property is spread amongst at least 4 supporting modules (none of which is the Legend module itself).&lt;/P&gt;</description>
    <pubDate>Thu, 10 Aug 2023 17:14:45 GMT</pubDate>
    <dc:creator>JoelBennett</dc:creator>
    <dc:date>2023-08-10T17:14:45Z</dc:date>
    <item>
      <title>Custom feature layer does not show in Legend.</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/custom-feature-layer-does-not-show-in-legend/m-p/1317099#M81924</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I am trying to extend FeatureLayer in order to add minor, but important to me, functions and properties.&lt;/P&gt;&lt;P&gt;When I do create and instance of the FeatureLayer sublayer, I can see no legend, where I do see a legend when I use the generic FeatureLayer.&lt;BR /&gt;&lt;BR /&gt;Even this example of a Sublayer for Feature layer does not show any symbols in the legend:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;@subclass("myproj.classes.layers.CustomFeatureLayer")
export class CustomFeatureLayer extends FeatureLayer {
       //Purposely left empty to test legend
}&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-right" image-alt="EugeneStaten_0-1691608953400.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/77710i82E6C86973F304B2/image-size/medium?v=v2&amp;amp;px=400" role="button" title="EugeneStaten_0-1691608953400.png" alt="EugeneStaten_0-1691608953400.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;What should I do to make a subclass of a FeatureLayer recognizable by the legend?&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;Is there a function I can override in the Legend?&lt;/P&gt;&lt;P&gt;Is there something I can add in the ActiveLayerInfo object to make the Legend pay attention?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 09 Aug 2023 19:28:43 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/custom-feature-layer-does-not-show-in-legend/m-p/1317099#M81924</guid>
      <dc:creator>EugeneStaten</dc:creator>
      <dc:date>2023-08-09T19:28:43Z</dc:date>
    </item>
    <item>
      <title>Re: Custom feature layer does not show in Legend.</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/custom-feature-layer-does-not-show-in-legend/m-p/1317209#M81930</link>
      <description>&lt;P&gt;The Legend determines internally what layers it supports and doesn't via the layer's declaredClass property.&amp;nbsp; If it isn't a recognized type (e.g. "myproj.classes.layers.CustomFeatureLayer"), then the layer won't be supported.&lt;/P&gt;&lt;P&gt;If you don't have any custom logic driven by the declaredClass property, and none of your added properties or methods contain anything terribly conflicting with the default implementation, you can just reset it (preferably with your&amp;nbsp;constructor);&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;this.declaredClass = "esri.layers.FeatureLayer";&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 09 Aug 2023 23:21:17 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/custom-feature-layer-does-not-show-in-legend/m-p/1317209#M81930</guid>
      <dc:creator>JoelBennett</dc:creator>
      <dc:date>2023-08-09T23:21:17Z</dc:date>
    </item>
    <item>
      <title>Re: Custom feature layer does not show in Legend.</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/custom-feature-layer-does-not-show-in-legend/m-p/1317262#M81933</link>
      <description>&lt;P&gt;Thanks Joel,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;That worked!&lt;/P&gt;&lt;P&gt;Now, the obvious, next question:&amp;nbsp; Can we add a list of custom layer declarations to the Legend's current list of declarations?&lt;/P&gt;</description>
      <pubDate>Thu, 10 Aug 2023 04:42:49 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/custom-feature-layer-does-not-show-in-legend/m-p/1317262#M81933</guid>
      <dc:creator>EugeneStaten</dc:creator>
      <dc:date>2023-08-10T04:42:49Z</dc:date>
    </item>
    <item>
      <title>Re: Custom feature layer does not show in Legend.</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/custom-feature-layer-does-not-show-in-legend/m-p/1317451#M81943</link>
      <description>&lt;P&gt;I'd absolutely love if there were controlled versions of some of the widgets, or at least not fully implicit.&lt;/P&gt;</description>
      <pubDate>Thu, 10 Aug 2023 15:55:31 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/custom-feature-layer-does-not-show-in-legend/m-p/1317451#M81943</guid>
      <dc:creator>AddisonShaw</dc:creator>
      <dc:date>2023-08-10T15:55:31Z</dc:date>
    </item>
    <item>
      <title>Re: Custom feature layer does not show in Legend.</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/custom-feature-layer-does-not-show-in-legend/m-p/1317510#M81944</link>
      <description>&lt;P&gt;It doesn't look like it; conditional logic based upon the declaredClass property is spread amongst at least 4 supporting modules (none of which is the Legend module itself).&lt;/P&gt;</description>
      <pubDate>Thu, 10 Aug 2023 17:14:45 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/custom-feature-layer-does-not-show-in-legend/m-p/1317510#M81944</guid>
      <dc:creator>JoelBennett</dc:creator>
      <dc:date>2023-08-10T17:14:45Z</dc:date>
    </item>
  </channel>
</rss>

