<?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: Differentiate between TiledMapServiceLayer and DynamicMapServiceLayer in code in .NET Maps SDK Questions</title>
    <link>https://community.esri.com/t5/net-maps-sdk-questions/differentiate-between-tiledmapservicelayer-and/m-p/27974#M320</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;We had to deal with a similar issue at one point and we used the same ?f=pjson parameters to obtain the map service description.&amp;nbsp; But rather than using the "capabilities" value, we used "tileInfo" instead.&amp;nbsp; So if the service has tileInfo, it is a map service that supports tile cache.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 18 Feb 2016 15:10:10 GMT</pubDate>
    <dc:creator>HuyHo</dc:creator>
    <dc:date>2016-02-18T15:10:10Z</dc:date>
    <item>
      <title>Differentiate between TiledMapServiceLayer and DynamicMapServiceLayer in code</title>
      <link>https://community.esri.com/t5/net-maps-sdk-questions/differentiate-between-tiledmapservicelayer-and/m-p/27970#M316</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In my application it's currently possible to add both ArcGISTiledMapServiceLayer and ArcGISDynamicMapServiceLayer types. The issue I have is that I can't find a good way to query the service to determine which type the user is adding.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It seems I can always add a Tiled layer as a dynamic service, but the opposite (expectedly) throws an exception. What I would like to do is be able to determine and/or query in code whether a given service Uri/Url is hosting tiles or is a "standard" dynamic map service. Is this possible? The exception raised when I add a dynamic as a tiled is "no valid tile info", is there a way to check the service for tile info and then determine which type of map layer object to create based on that? It would be possible to catch the exception and then regenerate the other type, but I'm trying to save that as a last resort option.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks!&lt;/P&gt;&lt;P&gt;Aaron&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 10 Feb 2016 22:27:14 GMT</pubDate>
      <guid>https://community.esri.com/t5/net-maps-sdk-questions/differentiate-between-tiledmapservicelayer-and/m-p/27970#M316</guid>
      <dc:creator>AaronHigh</dc:creator>
      <dc:date>2016-02-10T22:27:14Z</dc:date>
    </item>
    <item>
      <title>Re: Differentiate between TiledMapServiceLayer and DynamicMapServiceLayer in code</title>
      <link>https://community.esri.com/t5/net-maps-sdk-questions/differentiate-between-tiledmapservicelayer-and/m-p/27971#M317</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Aaron,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;First thing I think it is good to take a look about this diagram. Based on this online documentation: (&lt;A href="https://developers.arcgis.com/net/desktop/api-reference/html/2ea4f345-9142-41a2-aa0f-f2612c86e12b.htm" title="https://developers.arcgis.com/net/desktop/api-reference/html/2ea4f345-9142-41a2-aa0f-f2612c86e12b.htm"&gt;Layer types&lt;/A&gt; )&lt;/P&gt;&lt;P&gt;&lt;IMG alt="Layers Mini OMD" class="jive-image" src="https://developers.arcgis.com/net/desktop/api-reference/media/Layers_Mini_OMD.png" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000; font-family: 'Segoe UI', 'Lucida Grande', Verdana, Arial, Helvetica, sans-serif; font-size: 15px;"&gt;An &lt;/SPAN&gt;&lt;A href="https://developers.arcgis.com/net/desktop/api-reference/html/T_Esri_ArcGISRuntime_Layers_ArcGISDynamicMapServiceLayer.htm" style="color: #03697a; font-family: 'Segoe UI', 'Lucida Grande', Verdana, Arial, Helvetica, sans-serif; font-size: 15px;"&gt;ArcGISDynamicMapServiceLayer&lt;/A&gt;&lt;SPAN style="color: #000000; font-family: 'Segoe UI', 'Lucida Grande', Verdana, Arial, Helvetica, sans-serif; font-size: 15px;"&gt; is a dynamic ArcGIS REST image service layer that allows you to work a with map service resource exposed by the ArcGIS Server REST API (available in ArcGIS Server 9.3 and above). A dynamic map service generates images on the fly. The background color for an ArcGISDynamicMapServiceLayer will always be transparent.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000; font-family: 'Segoe UI', 'Lucida Grande', Verdana, Arial, Helvetica, sans-serif; font-size: 15px;"&gt;&lt;SPAN style="color: #000000; font-family: 'Segoe UI', 'Lucida Grande', Verdana, Arial, Helvetica, sans-serif; font-size: 15px;"&gt;An &lt;/SPAN&gt;&lt;A href="https://developers.arcgis.com/net/desktop/api-reference/html/T_Esri_ArcGISRuntime_Layers_ArcGISTiledMapServiceLayer.htm" style="color: #03697a; font-family: 'Segoe UI', 'Lucida Grande', Verdana, Arial, Helvetica, sans-serif; font-size: 15px;"&gt;ArcGISTiledMapServiceLayer&lt;/A&gt;&lt;SPAN style="color: #000000; font-family: 'Segoe UI', 'Lucida Grande', Verdana, Arial, Helvetica, sans-serif; font-size: 15px;"&gt; is a cached ArcGIS REST map service layer that allows you to work with a cached map service resource exposed by the ArcGIS Server REST API (available in ArcGIS Server 9.3 and above). A cached service accesses pre-created tiles from a cache instead of dynamically rendering images.&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000; font-family: 'Segoe UI', 'Lucida Grande', Verdana, Arial, Helvetica, sans-serif; font-size: 15px;"&gt;Then, the question about how to determine whether is an ArcGISDynamicMapServiceLayer or ArcGISTiledMapServiceLayer, I think you can first compare the REST JSON for both type of layers. Here I shared with you two different json url for each type:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000; font-size: 15px; font-family: 'Segoe UI', 'Lucida Grande', Verdana, Arial, Helvetica, sans-serif;"&gt;ArcGISDynamicMapServiceLayer: &lt;A href="https://sampleserver6.arcgisonline.com/arcgis/rest/services/USA/MapServer/0?f=pjson" title="https://sampleserver6.arcgisonline.com/arcgis/rest/services/USA/MapServer/0?f=pjson"&gt;https://sampleserver6.arcgisonline.com/arcgis/rest/services/USA/MapServer/0?f=pjson&lt;/A&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000; font-size: 15px; font-family: 'Segoe UI', 'Lucida Grande', Verdana, Arial, Helvetica, sans-serif;"&gt; &lt;SPAN style="color: #000000; font-family: 'Segoe UI', 'Lucida Grande', Verdana, Arial, Helvetica, sans-serif; font-size: 15px;"&gt;ArcGISTiledMapServiceLayer: &lt;A href="https://sampleserver6.arcgisonline.com/arcgis/rest/services/USA/MapServer/0?f=pjson" title="https://sampleserver6.arcgisonline.com/arcgis/rest/services/USA/MapServer/0?f=pjson"&gt;https://sampleserver6.arcgisonline.com/arcgis/rest/services/USA/MapServer/0?f=pjson&lt;/A&gt; &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000; font-size: 15px; font-family: 'Segoe UI', 'Lucida Grande', Verdana, Arial, Helvetica, sans-serif;"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000; font-family: 'Segoe UI', 'Lucida Grande', Verdana, Arial, Helvetica, sans-serif; font-size: 15px;"&gt;You can see in &lt;SPAN style="color: #000000; font-family: 'Segoe UI', 'Lucida Grande', Verdana, Arial, Helvetica, sans-serif; font-size: 15px;"&gt;ArcGISDynamicMapServiceLayer the parameter &lt;STRONG&gt;"capabilities": "Data,Map,Query"&lt;/STRONG&gt; versus &lt;SPAN style="color: #000000; font-family: 'Segoe UI', 'Lucida Grande', Verdana, Arial, Helvetica, sans-serif; font-size: 15px;"&gt;ArcGISTiledMapServiceLayer is &lt;STRONG&gt;"capabilities": "Map"&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000; font-size: 15px; font-family: 'Segoe UI', 'Lucida Grande', Verdana, Arial, Helvetica, sans-serif;"&gt;Based on this documentation, you may try to use "GetType" method to distinguish both type of layers&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000; font-size: 15px; font-family: 'Segoe UI', 'Lucida Grande', Verdana, Arial, Helvetica, sans-serif;"&gt;&lt;A href="https://developers.arcgis.com/net/desktop/api-reference/html/T_Esri_ArcGISRuntime_Layers_Layer.htm" title="https://developers.arcgis.com/net/desktop/api-reference/html/T_Esri_ArcGISRuntime_Layers_Layer.htm"&gt;Layer Class&lt;/A&gt; or parse the JSON to compare the capabilities. Basically, you need to compare two layer types of json and eventually find a parameter can identify the type.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000; font-size: 15px; font-family: 'Segoe UI', 'Lucida Grande', Verdana, Arial, Helvetica, sans-serif;"&gt;Hope this can help.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000; font-size: 15px; font-family: 'Segoe UI', 'Lucida Grande', Verdana, Arial, Helvetica, sans-serif;"&gt;Best Regards,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 11 Feb 2016 01:00:23 GMT</pubDate>
      <guid>https://community.esri.com/t5/net-maps-sdk-questions/differentiate-between-tiledmapservicelayer-and/m-p/27971#M317</guid>
      <dc:creator>YueWu1</dc:creator>
      <dc:date>2016-02-11T01:00:23Z</dc:date>
    </item>
    <item>
      <title>Re: Differentiate between TiledMapServiceLayer and DynamicMapServiceLayer in code</title>
      <link>https://community.esri.com/t5/net-maps-sdk-questions/differentiate-between-tiledmapservicelayer-and/m-p/27972#M318</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I was aware of the inheritance hierarchy, I was just trying to make a determination as to which type of Layer object to construct based on the service capabilities. A simple WebRequest to poll the capabilities member does the trick quite nicely. The difference between "TileMap" and "Map" in the capabilities was key here as if the service has tiles, I'd rather load it as a tiled layer than a dynamic layer for performance reasons.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks again,&lt;/P&gt;&lt;P&gt;Aaron&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 11 Feb 2016 20:11:37 GMT</pubDate>
      <guid>https://community.esri.com/t5/net-maps-sdk-questions/differentiate-between-tiledmapservicelayer-and/m-p/27972#M318</guid>
      <dc:creator>AaronHigh</dc:creator>
      <dc:date>2016-02-11T20:11:37Z</dc:date>
    </item>
    <item>
      <title>Re: Differentiate between TiledMapServiceLayer and DynamicMapServiceLayer in code</title>
      <link>https://community.esri.com/t5/net-maps-sdk-questions/differentiate-between-tiledmapservicelayer-and/m-p/27973#M319</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Getting the tile info is key here as you've found. However I'd like to add that if you map is in a different spatial reference than the spatial reference of the service getting added, you want to ignore the tile info and create a dynamic layer. The dynamic layer supports projection on the fly, while tile caches doesn't and requires the spatial reference to match.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 18 Feb 2016 04:47:44 GMT</pubDate>
      <guid>https://community.esri.com/t5/net-maps-sdk-questions/differentiate-between-tiledmapservicelayer-and/m-p/27973#M319</guid>
      <dc:creator>dotMorten_esri</dc:creator>
      <dc:date>2016-02-18T04:47:44Z</dc:date>
    </item>
    <item>
      <title>Re: Differentiate between TiledMapServiceLayer and DynamicMapServiceLayer in code</title>
      <link>https://community.esri.com/t5/net-maps-sdk-questions/differentiate-between-tiledmapservicelayer-and/m-p/27974#M320</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;We had to deal with a similar issue at one point and we used the same ?f=pjson parameters to obtain the map service description.&amp;nbsp; But rather than using the "capabilities" value, we used "tileInfo" instead.&amp;nbsp; So if the service has tileInfo, it is a map service that supports tile cache.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 18 Feb 2016 15:10:10 GMT</pubDate>
      <guid>https://community.esri.com/t5/net-maps-sdk-questions/differentiate-between-tiledmapservicelayer-and/m-p/27974#M320</guid>
      <dc:creator>HuyHo</dc:creator>
      <dc:date>2016-02-18T15:10:10Z</dc:date>
    </item>
  </channel>
</rss>

