<?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: Finding service layer 'declaredClass' property (type) in AMD? in ArcGIS JavaScript Maps SDK Questions</title>
    <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/finding-service-layer-declaredclass-property-type/m-p/346937#M32081</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Thanks Jeff - 'instanceof' is a great solution. Just to be clear, that is a JavaScript operator, not a part of the esri JavaScript API correct? Very cool, I'm pretty new to JavaScript still.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 01 Jul 2014 17:42:55 GMT</pubDate>
    <dc:creator>Anonymous User</dc:creator>
    <dc:date>2014-07-01T17:42:55Z</dc:date>
    <item>
      <title>Finding service layer 'declaredClass' property (type) in AMD?</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/finding-service-layer-declaredclass-property-type/m-p/346935#M32079</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I've found numerous threads discussing 'layer.declaredClass' as a way to get to the type of service for a layer in a map (e.g. ArcGISDynamicMapServiceLayer, FeatureLayer, etc.). &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;The only documentation linked was to a &lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="http://livedocs.dojotoolkit.org/dijit/info" rel="nofollow" target="_blank"&gt;Dojo &lt;/A&gt;&lt;SPAN&gt;widget's class, so I am unsure how to work this on a map layer. I tried simply using layer.declaredClass but it was undefined. The API documentation doesn't seem to mention this property, and the only service type with a 'type' property is FeatureLayer. Any help appreciated!&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Related threads:&lt;/SPAN&gt;&lt;BR /&gt;&lt;A class="jive-link-external-small" href="http://forums.arcgis.com/threads/98523-Print-Task-on-Custom-ArcGISImageServiceLayer" rel="nofollow" target="_blank"&gt;http://forums.arcgis.com/threads/98523-Print-Task-on-Custom-ArcGISImageServiceLayer&lt;/A&gt;&lt;BR /&gt;&lt;A class="jive-link-external-small" href="http://forums.arcgis.com/threads/48137-Dynamically-detecting-map-layer-service-type" rel="nofollow" target="_blank"&gt;http://forums.arcgis.com/threads/48137-Dynamically-detecting-map-layer-service-type&lt;/A&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 01 Jul 2014 15:06:47 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/finding-service-layer-declaredclass-property-type/m-p/346935#M32079</guid>
      <dc:creator>Anonymous User</dc:creator>
      <dc:date>2014-07-01T15:06:47Z</dc:date>
    </item>
    <item>
      <title>Re: Finding service layer 'declaredClass' property (type) in AMD?</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/finding-service-layer-declaredclass-property-type/m-p/346936#M32080</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I have seen layer.declaredClass as well, but usually for custom objects.&amp;nbsp; you could try instanceof&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="plain" name="code"&gt; if ((this.rootLayer instanceof (ArcGISDynamicMapServiceLayer) || &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; this.rootLayer instanceof (ArcGISTiledMapServiceLayer)))&lt;/PRE&gt;&lt;DIV style="display:none;"&gt; &lt;/DIV&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;you could also&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="plain" name="code"&gt;console.dir(layer) &lt;/PRE&gt;&lt;DIV style="display:none;"&gt; &lt;/DIV&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;and sniff the properties in Firebug to see if there is a declaration somewhere&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 01 Jul 2014 16:36:37 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/finding-service-layer-declaredclass-property-type/m-p/346936#M32080</guid>
      <dc:creator>JeffPace</dc:creator>
      <dc:date>2014-07-01T16:36:37Z</dc:date>
    </item>
    <item>
      <title>Re: Finding service layer 'declaredClass' property (type) in AMD?</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/finding-service-layer-declaredclass-property-type/m-p/346937#M32081</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Thanks Jeff - 'instanceof' is a great solution. Just to be clear, that is a JavaScript operator, not a part of the esri JavaScript API correct? Very cool, I'm pretty new to JavaScript still.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 01 Jul 2014 17:42:55 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/finding-service-layer-declaredclass-property-type/m-p/346937#M32081</guid>
      <dc:creator>Anonymous User</dc:creator>
      <dc:date>2014-07-01T17:42:55Z</dc:date>
    </item>
    <item>
      <title>Re: Finding service layer 'declaredClass' property (type) in AMD?</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/finding-service-layer-declaredclass-property-type/m-p/346938#M32082</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;correct it is pure javascript&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 02 Jul 2014 13:55:50 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/finding-service-layer-declaredclass-property-type/m-p/346938#M32082</guid>
      <dc:creator>JeffPace</dc:creator>
      <dc:date>2014-07-02T13:55:50Z</dc:date>
    </item>
  </channel>
</rss>

