<?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: Resolution problem in ArcGIS API for Silverlight Questions</title>
    <link>https://community.esri.com/t5/arcgis-api-for-silverlight-questions/resolution-problem/m-p/112163#M2808</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;I would strongly advise against changing the Url at runtime. Depending on what service you change it to, weird things can happen.&lt;BR /&gt;Instead remove the layer, create a new instance and add that to the map.&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Morton,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;If this is not recommended, why is there a code sample provided in the interactive samples?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;A href="http://resources.esri.com/help/9.3/arcgisserver/apis/silverlight/samples/start.htm#SwitchMap"&gt;http://resources.esri.com/help/9.3/arcgisserver/apis/silverlight/samples/start.htm#SwitchMap&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I guess the follow up question would be why doesn't the sample demonstrate switching between the tiled, image and dynamic services? &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Keith&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 15 Sep 2010 18:05:19 GMT</pubDate>
    <dc:creator>KeithNightlinger</dc:creator>
    <dc:date>2010-09-15T18:05:19Z</dc:date>
    <item>
      <title>Resolution problem</title>
      <link>https://community.esri.com/t5/arcgis-api-for-silverlight-questions/resolution-problem/m-p/112152#M2797</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I have a map control in a silverlight 3 app with API 1.2 that shows dynamically users' map services. The first layer is an arcgisonline street layer, and on top of that a user's service. The first map displays ok and it shows a resolution of NaN(??), when reloading the map control with other services (dynamic and cached as well) I get "error on Page" and a resolution value of thousands.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;How can I make this at work? Thanks.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 01 Sep 2010 14:22:00 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-silverlight-questions/resolution-problem/m-p/112152#M2797</guid>
      <dc:creator>AgatinoLa_Rosa</dc:creator>
      <dc:date>2010-09-01T14:22:00Z</dc:date>
    </item>
    <item>
      <title>Re: Resolution problem</title>
      <link>https://community.esri.com/t5/arcgis-api-for-silverlight-questions/resolution-problem/m-p/112153#M2798</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I'm not sure I'm completely following this one. When mention only one map, but then go on to say "the first map". Did you mean the first layer? (although a layer doesn't have a 'resolution')&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;If a map shows right, the resolution cannot be NaN. A layer doesn't have a resolution&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;When do you check the Map.Resolution property? Before or after the layers has initialized?&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;What error did you get on the page? Could you share the exception and the stacktrace?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 01 Sep 2010 15:15:41 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-silverlight-questions/resolution-problem/m-p/112153#M2798</guid>
      <dc:creator>dotMorten_esri</dc:creator>
      <dc:date>2010-09-01T15:15:41Z</dc:date>
    </item>
    <item>
      <title>Re: Resolution problem</title>
      <link>https://community.esri.com/t5/arcgis-api-for-silverlight-questions/resolution-problem/m-p/112154#M2799</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Thanks Morten, I will try to make myself clear. It is a single map with two Services, the first is an arcgisonline street service [always the same at design time], and the second is configured at run time (could be cached or dynamic according to the selected service by the user). The map control includes a ESRI navigation tool. The first time the map is displayed it goes ok, then I select another service replacing url at run time. This time it stopped at the following procedure:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;private void Map_ExtentChanged(object sender, ExtentEventArgs args)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp; if (!double.IsNaN(Map.Resolution) &amp;amp;&amp;amp; ZoomSlider != null)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; ZoomSlider.Value = ResolutionToValue(Map.Resolution);&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Then the map disappears and on the browser there is the following error:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Unhandled Error in Silverlight Application&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Code:4004&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Category:ManagedRuntimeError&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Message: System.NullReferenceException.Object reference not set to an instance of an object&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;at ESRI.ArcGIS.Client.Map&amp;lt;&amp;gt;c_DisplayClass1b&amp;lt;&amp;gt;c_DisplayClass1e&amp;lt;beginZoomToExtent&amp;gt;b_17()&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I have seen that the resolution after initialize is not NaN as you suspected, I did put the alert at the wrong location. However I think it is the change of resolution due to the change of runtime service that gives this problem. If I select always the same service at runtime and the resolution stays as same the map shows ok.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thank you for your time.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 01 Sep 2010 15:53:48 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-silverlight-questions/resolution-problem/m-p/112154#M2799</guid>
      <dc:creator>AgatinoLa_Rosa</dc:creator>
      <dc:date>2010-09-01T15:53:48Z</dc:date>
    </item>
    <item>
      <title>Re: Resolution problem</title>
      <link>https://community.esri.com/t5/arcgis-api-for-silverlight-questions/resolution-problem/m-p/112155#M2800</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I would strongly advise against changing the Url at runtime. Depending on what service you change it to, weird things can happen.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Instead remove the layer, create a new instance and add that to the map.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 01 Sep 2010 23:29:49 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-silverlight-questions/resolution-problem/m-p/112155#M2800</guid>
      <dc:creator>dotMorten_esri</dc:creator>
      <dc:date>2010-09-01T23:29:49Z</dc:date>
    </item>
    <item>
      <title>Re: Resolution problem</title>
      <link>https://community.esri.com/t5/arcgis-api-for-silverlight-questions/resolution-problem/m-p/112156#M2801</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;This has been one of my tries, I have created new instances as follow&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;if cached...&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&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; ArcGISTiledMapServiceLayer thisCachedService = new ArcGISTiledMapServiceLayer()&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&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;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&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; Url = ...,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&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; ID = "ServiceLayer"&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&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;&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;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&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; this.baseMap.Layers.Insert(1, thisCachedService);&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&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; thisCachedService.Initialize(); &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;if dynamic...&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ArcGISDynamicMapServiceLayer thisDynamicService = new ArcGISDynamicMapServiceLayer()&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&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;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&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; Url = ...,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&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; ID = "ServiceLayer"&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&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;&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;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&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; this.baseMap.Layers.Insert(1, thisDynamicService);&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&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; thisDynamicService.Initialize();&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;and then removed from the list of layers....&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; for (int i = 0; i &amp;lt; this.baseMap.Layers.Count; i++)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&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; if (this.baseMap.Layers&lt;I&gt;.ID == "ServiceLayer")&lt;/I&gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&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;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&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;&amp;nbsp;&amp;nbsp; this.baseMap.Layers.RemoveAt(i);&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&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;&amp;nbsp;&amp;nbsp; break;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&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;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;However, if I use Map.Layers.Clear() it does not read the map layers as configured at design time anymore and I need this insert/removeat procedure.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I have also disabled the navigation tool with no success. I don't know what else to try...&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 02 Sep 2010 04:22:14 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-silverlight-questions/resolution-problem/m-p/112156#M2801</guid>
      <dc:creator>AgatinoLa_Rosa</dc:creator>
      <dc:date>2010-09-02T04:22:14Z</dc:date>
    </item>
    <item>
      <title>Re: Resolution problem</title>
      <link>https://community.esri.com/t5/arcgis-api-for-silverlight-questions/resolution-problem/m-p/112157#M2802</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;After several more tries I have seen that if I remove the zoomto and panto the map shows ok for any dynamic/cached url at runtime. What I do not understand is that the very first time I load the xaml the zoomto and panto procedures work. After this time it goes blank.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;What could be the problem when using zoomto/panto at runtime more than once in a silverlight map control?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 02 Sep 2010 10:07:07 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-silverlight-questions/resolution-problem/m-p/112157#M2802</guid>
      <dc:creator>AgatinoLa_Rosa</dc:creator>
      <dc:date>2010-09-02T10:07:07Z</dc:date>
    </item>
    <item>
      <title>Re: Resolution problem</title>
      <link>https://community.esri.com/t5/arcgis-api-for-silverlight-questions/resolution-problem/m-p/112158#M2803</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 not able to reproduce the problem. If I understood correctly, you need to replace the layer at run-time.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I am using the following code:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;XAML&lt;/SPAN&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;
 &amp;lt;Grid x:Name="LayoutRoot" Background="White"&amp;gt;
&amp;nbsp; &amp;lt;esri:Map x:Name="MyMap" ExtentChanged="MyMap_ExtentChanged"&amp;gt;
&amp;nbsp;&amp;nbsp; &amp;lt;esri:ArcGISTiledMapServiceLayer Url="http://server.arcgisonline.com/ArcGIS/rest/services/World_Street_Map/MapServer" /&amp;gt;
&amp;nbsp; &amp;lt;/esri:Map&amp;gt;
&amp;nbsp; &amp;lt;Button Content="Replace Layer" Click="Button_Click" VerticalAlignment="Top" HorizontalAlignment="Center"/&amp;gt;
 &amp;lt;/Grid&amp;gt;
&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Code-behind:&lt;/SPAN&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;
private void Button_Click(object sender, RoutedEventArgs e)
&amp;nbsp; {
&amp;nbsp;&amp;nbsp; ArcGISDynamicMapServiceLayer dynamic = new ArcGISDynamicMapServiceLayer() { Url = "http://sampleserver3.arcgisonline.com/ArcGIS/rest/services/BloomfieldHillsMichigan/LandusePlanning/MapServer" };&amp;nbsp;&amp;nbsp; 
&amp;nbsp;&amp;nbsp; dynamic.Initialize();
&amp;nbsp;&amp;nbsp; ArcGISTiledMapServiceLayer tiledLayer = this.MyMap.Layers[0] as ArcGISTiledMapServiceLayer;
&amp;nbsp;&amp;nbsp; if (tiledLayer != null)
&amp;nbsp;&amp;nbsp; {
&amp;nbsp;&amp;nbsp;&amp;nbsp; this.MyMap.Layers.Remove(tiledLayer);
&amp;nbsp;&amp;nbsp;&amp;nbsp; this.MyMap.Layers.Add(dynamic);
&amp;nbsp;&amp;nbsp; }
&amp;nbsp; }
private void MyMap_ExtentChanged(object sender, ESRI.ArcGIS.Client.ExtentEventArgs e)
&amp;nbsp; {
// placed a breakpoint here to make sure the map's extent still get updated after replacing layer.
&amp;nbsp; }
&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 06:42:38 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-silverlight-questions/resolution-problem/m-p/112158#M2803</guid>
      <dc:creator>JenniferNery</dc:creator>
      <dc:date>2021-12-11T06:42:38Z</dc:date>
    </item>
    <item>
      <title>Re: Resolution problem</title>
      <link>https://community.esri.com/t5/arcgis-api-for-silverlight-questions/resolution-problem/m-p/112159#M2804</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Thanks Jennifer, I have been able to replace layers at run time. However, I need to zoom/pan to the extent of the new layer in my map. My c# code has a procedure that sends a rest request to the gisserver and reads the envelope extent of the new layer, and then zoomto and panto the new envelope. The first time I set at run time the layer I see my map, after the first replacement the procedures zoomto and panto return an error on page. &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;So my question is why these two procedures (zoomto and panto) return an error.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 08 Sep 2010 06:44:56 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-silverlight-questions/resolution-problem/m-p/112159#M2804</guid>
      <dc:creator>AgatinoLa_Rosa</dc:creator>
      <dc:date>2010-09-08T06:44:56Z</dc:date>
    </item>
    <item>
      <title>Re: Resolution problem</title>
      <link>https://community.esri.com/t5/arcgis-api-for-silverlight-questions/resolution-problem/m-p/112160#M2805</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;It's hard to tell without knowing the error message or stack trace.&amp;nbsp; Could you share your code?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 09 Sep 2010 02:33:38 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-silverlight-questions/resolution-problem/m-p/112160#M2805</guid>
      <dc:creator>JenniferNery</dc:creator>
      <dc:date>2010-09-09T02:33:38Z</dc:date>
    </item>
    <item>
      <title>Re: Resolution problem</title>
      <link>https://community.esri.com/t5/arcgis-api-for-silverlight-questions/resolution-problem/m-p/112161#M2806</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;it is on this thread reply # 3. Thanks.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 09 Sep 2010 06:56:22 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-silverlight-questions/resolution-problem/m-p/112161#M2806</guid>
      <dc:creator>AgatinoLa_Rosa</dc:creator>
      <dc:date>2010-09-09T06:56:22Z</dc:date>
    </item>
    <item>
      <title>Re: Resolution problem</title>
      <link>https://community.esri.com/t5/arcgis-api-for-silverlight-questions/resolution-problem/m-p/112162#M2807</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Are you using the ZoomSlider to update the map's resolution too? What exactly does ResolutionToValue() do? I suspect you use it to convert the double value to int? How are you setting the slider's Minimum and Maximum values? Your code-behind shows that you use the map's resolution to update the value on the ZoomSlider but are you using the slider to update the map's resolution too? Are you doing any binding in your XAML? I wonder if the error occurs before or after the ZoomSlider value is set. Try to debug through this and also look at the stack trace if there's any helpful information there. I'm sorry that I have more questions that answer, it's difficult to pin point the error without knowing the purpose of the slider and how it is used with the map.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 13 Sep 2010 02:39:17 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-silverlight-questions/resolution-problem/m-p/112162#M2807</guid>
      <dc:creator>JenniferNery</dc:creator>
      <dc:date>2010-09-13T02:39:17Z</dc:date>
    </item>
    <item>
      <title>Re: Resolution problem</title>
      <link>https://community.esri.com/t5/arcgis-api-for-silverlight-questions/resolution-problem/m-p/112163#M2808</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;I would strongly advise against changing the Url at runtime. Depending on what service you change it to, weird things can happen.&lt;BR /&gt;Instead remove the layer, create a new instance and add that to the map.&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Morton,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;If this is not recommended, why is there a code sample provided in the interactive samples?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;A href="http://resources.esri.com/help/9.3/arcgisserver/apis/silverlight/samples/start.htm#SwitchMap"&gt;http://resources.esri.com/help/9.3/arcgisserver/apis/silverlight/samples/start.htm#SwitchMap&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I guess the follow up question would be why doesn't the sample demonstrate switching between the tiled, image and dynamic services? &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Keith&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 Sep 2010 18:05:19 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-silverlight-questions/resolution-problem/m-p/112163#M2808</guid>
      <dc:creator>KeithNightlinger</dc:creator>
      <dc:date>2010-09-15T18:05:19Z</dc:date>
    </item>
    <item>
      <title>Re: Resolution problem</title>
      <link>https://community.esri.com/t5/arcgis-api-for-silverlight-questions/resolution-problem/m-p/112164#M2809</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Valid point.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 16 Sep 2010 14:53:08 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-silverlight-questions/resolution-problem/m-p/112164#M2809</guid>
      <dc:creator>dotMorten_esri</dc:creator>
      <dc:date>2010-09-16T14:53:08Z</dc:date>
    </item>
  </channel>
</rss>

