<?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 ArcGIS Online wrong item type from search in ArcGIS JavaScript Maps SDK Questions</title>
    <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/arcgis-online-wrong-item-type-from-search/m-p/753883#M69704</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;When accessing items from ArcGIS Online in the JavaScript API there seems to be an error in the item type property when a tiled map service from AGOL is returned from a search (portal.queryItems(params)). Currently AGOL supports feature services and tiled map services. You can also reference other ArcGIS Server services including map services. When I query items in AGOL it returns items that have a type property. The problem is the tiled map services from AGOL have type map service as do referenced map services from other ArcGIS Servers. These two items need a different call to add them into the map e.g:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; new esri.layers.ArcGISTiledMapServiceLayer(url) OR&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; new esri.layers.ArcGISDynamicMapServiceLayer(url)&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Currently I am differentiating the two by doing a string search on the url for ???tiles??? but this method does not seem to be very robust. &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Does anyone know why this is the case? If there is a better way to differentiate the two item types or if this is a bug that will be fixed?&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Luke&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 16 Aug 2012 07:13:09 GMT</pubDate>
    <dc:creator>LukeStewart</dc:creator>
    <dc:date>2012-08-16T07:13:09Z</dc:date>
    <item>
      <title>ArcGIS Online wrong item type from search</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/arcgis-online-wrong-item-type-from-search/m-p/753883#M69704</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;When accessing items from ArcGIS Online in the JavaScript API there seems to be an error in the item type property when a tiled map service from AGOL is returned from a search (portal.queryItems(params)). Currently AGOL supports feature services and tiled map services. You can also reference other ArcGIS Server services including map services. When I query items in AGOL it returns items that have a type property. The problem is the tiled map services from AGOL have type map service as do referenced map services from other ArcGIS Servers. These two items need a different call to add them into the map e.g:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; new esri.layers.ArcGISTiledMapServiceLayer(url) OR&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; new esri.layers.ArcGISDynamicMapServiceLayer(url)&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Currently I am differentiating the two by doing a string search on the url for ???tiles??? but this method does not seem to be very robust. &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Does anyone know why this is the case? If there is a better way to differentiate the two item types or if this is a bug that will be fixed?&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Luke&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 16 Aug 2012 07:13:09 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/arcgis-online-wrong-item-type-from-search/m-p/753883#M69704</guid>
      <dc:creator>LukeStewart</dc:creator>
      <dc:date>2012-08-16T07:13:09Z</dc:date>
    </item>
  </channel>
</rss>

