<?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 Feature Layer Name undefined? in ArcGIS JavaScript Maps SDK Questions</title>
    <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/feature-layer-name-undefined/m-p/141011#M13114</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;This may be something silly that I'm doing wrong, but my feature layer name keeps coming back as undefined.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;console.log(featureLayer) produces this:&lt;/SPAN&gt;&lt;BR /&gt;&lt;PRE class="plain" name="code"&gt;
a -&amp;gt;
...
id: "graphicsLayer4"
..
name: "Fire Station"
..
&lt;/PRE&gt;&lt;DIV style="display:none;"&gt; &lt;/DIV&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;console.log(featureLayer.id) produces "graphicsLayer4"&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;console.log(featureLayer.name) produces "undefined"&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Any ideas what I'm doing wrong?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 03 Aug 2012 11:37:12 GMT</pubDate>
    <dc:creator>AdamWills</dc:creator>
    <dc:date>2012-08-03T11:37:12Z</dc:date>
    <item>
      <title>Feature Layer Name undefined?</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/feature-layer-name-undefined/m-p/141011#M13114</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;This may be something silly that I'm doing wrong, but my feature layer name keeps coming back as undefined.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;console.log(featureLayer) produces this:&lt;/SPAN&gt;&lt;BR /&gt;&lt;PRE class="plain" name="code"&gt;
a -&amp;gt;
...
id: "graphicsLayer4"
..
name: "Fire Station"
..
&lt;/PRE&gt;&lt;DIV style="display:none;"&gt; &lt;/DIV&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;console.log(featureLayer.id) produces "graphicsLayer4"&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;console.log(featureLayer.name) produces "undefined"&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Any ideas what I'm doing wrong?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 03 Aug 2012 11:37:12 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/feature-layer-name-undefined/m-p/141011#M13114</guid>
      <dc:creator>AdamWills</dc:creator>
      <dc:date>2012-08-03T11:37:12Z</dc:date>
    </item>
    <item>
      <title>Re: Feature Layer Name undefined?</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/feature-layer-name-undefined/m-p/141012#M13115</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;from the api reference:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;"The name of the layer as defined in the map service."&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;
a -&amp;gt;
...
id: "graphicsLayer4"
&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;console.log(featureLayer.name) - would return the name of the layer as defined in the service. Doesn't look like you can define name, only properties listed in the 'constructor detail' section of the api reference.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 07:46:39 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/feature-layer-name-undefined/m-p/141012#M13115</guid>
      <dc:creator>danbecker</dc:creator>
      <dc:date>2021-12-11T07:46:39Z</dc:date>
    </item>
    <item>
      <title>Re: Feature Layer Name undefined?</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/feature-layer-name-undefined/m-p/141013#M13116</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I'm not looking to define the name - just want to return the name in the service.&amp;nbsp; But it keeps returning undefined.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 03 Aug 2012 12:47:42 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/feature-layer-name-undefined/m-p/141013#M13116</guid>
      <dc:creator>AdamWills</dc:creator>
      <dc:date>2012-08-03T12:47:42Z</dc:date>
    </item>
    <item>
      <title>Re: Feature Layer Name undefined?</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/feature-layer-name-undefined/m-p/141014#M13117</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Since name is coming from map service you have to wait till layer is added to map then only you can access its properties like name. Here is the sample code to retrieve the name from feature layer:&lt;/SPAN&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt; 
dojo.connect(featureLayer,"onLoad",function(){
alert(featureLayer.name);&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; });
&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Here is the complete sample:&lt;/SPAN&gt;&lt;BR /&gt;&lt;A href="http://jsfiddle.net/rahulm/nGc9b/" rel="nofollow noopener noreferrer" target="_blank"&gt;http://jsfiddle.net/rahulm/nGc9b/&lt;/A&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 07:46:42 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/feature-layer-name-undefined/m-p/141014#M13117</guid>
      <dc:creator>RahulMetangale1</dc:creator>
      <dc:date>2021-12-11T07:46:42Z</dc:date>
    </item>
    <item>
      <title>Re: Feature Layer Name undefined?</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/feature-layer-name-undefined/m-p/141015#M13118</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Perhaps I'm just confused as to when I log the object, I get the name returned, but when I try to access that property, I can't.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Edit: And I can access other properties, such as the id and url....&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 03 Aug 2012 14:06:35 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/feature-layer-name-undefined/m-p/141015#M13118</guid>
      <dc:creator>AdamWills</dc:creator>
      <dc:date>2012-08-03T14:06:35Z</dc:date>
    </item>
    <item>
      <title>Re: Feature Layer Name undefined?</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/feature-layer-name-undefined/m-p/141016#M13119</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;Perhaps I'm just confused as to when I log the object, I get the name returned, but when I try to access that property, I can't.&lt;BR /&gt;&lt;BR /&gt;Edit: And I can access other properties, such as the id and url....&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;I have the same problem. Have you came up with a solution for it?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 23 May 2014 09:18:21 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/feature-layer-name-undefined/m-p/141016#M13119</guid>
      <dc:creator>ChristianDebono</dc:creator>
      <dc:date>2014-05-23T09:18:21Z</dc:date>
    </item>
  </channel>
</rss>

