<?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: adding map service url in ArcGIS API for Silverlight Questions</title>
    <link>https://community.esri.com/t5/arcgis-api-for-silverlight-questions/adding-map-service-url/m-p/722722#M18545</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Try this&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;
ArcGISTiledMapServiceLayer tiles = new ArcGISTiledMapServiceLayer() 
{ 
&amp;nbsp;&amp;nbsp;&amp;nbsp; Url = "http://services.arcgisonline.com/ArcGIS/rest/services/World_Street_Map/MapServer/0"
};
MapApplication.Current.Map.Layers.Add(tiles);
MapApplication.SetLayerName(tiles, "World Street Map");
&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;EDIT:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;The layer you are trying&amp;nbsp; to add is as feature layer, so you might want to try FeatureLayer instead of ArcGISTiledMapServiceLayer.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sun, 12 Dec 2021 06:55:00 GMT</pubDate>
    <dc:creator>JohanCarlsson</dc:creator>
    <dc:date>2021-12-12T06:55:00Z</dc:date>
    <item>
      <title>adding map service url</title>
      <link>https://community.esri.com/t5/arcgis-api-for-silverlight-questions/adding-map-service-url/m-p/722721#M18544</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;hi,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;i am trying to add mapservice through programtically (NOT XAML) through code behind in a simple &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;webmap application. here i am able to read the service Background.Child but not able to bind it to mapcontrol&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;code i have used is&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;&lt;SPAN&gt;((ESRI.ArcGIS.Client.ArcGISTiledMapServiceLayer)((new List&amp;lt;ESRI.ArcGIS.Client.Layer&amp;gt;(((ESRI.ArcGIS.Client.Map)(BackgroundBorder.Child)).Layers))[0])).Url = "&lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="http://services.arcgisonline.com/ArcGIS/rest/services/World_Street_Map/MapServer" rel="nofollow" target="_blank"&gt;http://services.arcgisonline.com/ArcGIS/rest/services/World_Street_Map/MapServer&lt;/A&gt;&lt;SPAN&gt;";&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Error;&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;"Index was out of range. Must be non-negative and less than the size of the collection"&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;kindly let me know any solution for this.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;thanks in advance.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;rakesh&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 19 Nov 2013 03:18:12 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-silverlight-questions/adding-map-service-url/m-p/722721#M18544</guid>
      <dc:creator>rakeshmenga</dc:creator>
      <dc:date>2013-11-19T03:18:12Z</dc:date>
    </item>
    <item>
      <title>Re: adding map service url</title>
      <link>https://community.esri.com/t5/arcgis-api-for-silverlight-questions/adding-map-service-url/m-p/722722#M18545</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Try this&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;
ArcGISTiledMapServiceLayer tiles = new ArcGISTiledMapServiceLayer() 
{ 
&amp;nbsp;&amp;nbsp;&amp;nbsp; Url = "http://services.arcgisonline.com/ArcGIS/rest/services/World_Street_Map/MapServer/0"
};
MapApplication.Current.Map.Layers.Add(tiles);
MapApplication.SetLayerName(tiles, "World Street Map");
&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;EDIT:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;The layer you are trying&amp;nbsp; to add is as feature layer, so you might want to try FeatureLayer instead of ArcGISTiledMapServiceLayer.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 12 Dec 2021 06:55:00 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-silverlight-questions/adding-map-service-url/m-p/722722#M18545</guid>
      <dc:creator>JohanCarlsson</dc:creator>
      <dc:date>2021-12-12T06:55:00Z</dc:date>
    </item>
    <item>
      <title>Re: adding map service url</title>
      <link>https://community.esri.com/t5/arcgis-api-for-silverlight-questions/adding-map-service-url/m-p/722723#M18546</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;((ESRI.ArcGIS.Client.ArcGISTiledMapServiceLayer)((new List&amp;lt;ESRI.ArcGIS.Client.Layer&amp;gt;(((ESRI.ArcGIS.Client.Map)(BackgroundBorder.Child)).Layers))[0])).Url = "http://services.arcgisonline.com/ArcGIS/rest/services/World_Street_Map/MapServer";&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;SPAN&gt;Add an x:Name attribute to Map in xaml, then use that name to access the map in the code-behind file.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;There is a samples page for SL API.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 19 Nov 2013 11:44:36 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-silverlight-questions/adding-map-service-url/m-p/722723#M18546</guid>
      <dc:creator>DenisT</dc:creator>
      <dc:date>2013-11-19T11:44:36Z</dc:date>
    </item>
  </channel>
</rss>

