<?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: Problem Switching between maps with different Spatial Refrence in ArcGIS API for Silverlight Questions</title>
    <link>https://community.esri.com/t5/arcgis-api-for-silverlight-questions/problem-switching-between-maps-with-different/m-p/172478#M4278</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;That worked, Thanks&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Is there a way I can restore the current extent so the user is still zoomed in to the same location?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 12 Apr 2012 18:26:20 GMT</pubDate>
    <dc:creator>TylerRothermund</dc:creator>
    <dc:date>2012-04-12T18:26:20Z</dc:date>
    <item>
      <title>Problem Switching between maps with different Spatial Refrence</title>
      <link>https://community.esri.com/t5/arcgis-api-for-silverlight-questions/problem-switching-between-maps-with-different/m-p/172476#M4276</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;When I switch between maps that have a different spatial reference I get an exception that the Layers have to be cleared first.&amp;nbsp;&amp;nbsp; So I cleared the layers and add a new ArcGISTiledMapServiceLayer, but nothing gets displayed and no exceptions.&amp;nbsp; Any Ideas?&amp;nbsp; &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="plain" name="code"&gt;private void SetMapUrl(string mapUrl)
&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; MyMap.Layers.Remove(ServiceLayer);
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ArcGISTiledMapServiceLayer serviceLayer = Resources["ServiceLayer"] as ArcGISTiledMapServiceLayer;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; serviceLayer.Url = mapUrl;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; MyMap.Layers.Insert(0, serviceLayer);
&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; if (UseMapProxy(mapUrl))
&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; string proxyUrl = BaseUrl + "/ArcGisMapProxyHandler.ashx";
&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; serviceLayer.ProxyURL = proxyUrl;
&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; else
&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; serviceLayer.ProxyURL = "";
&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;/PRE&gt;&lt;DIV style="display:none;"&gt; &lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 12 Apr 2012 01:11:29 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-silverlight-questions/problem-switching-between-maps-with-different/m-p/172476#M4276</guid>
      <dc:creator>TylerRothermund</dc:creator>
      <dc:date>2012-04-12T01:11:29Z</dc:date>
    </item>
    <item>
      <title>Re: Problem Switching between maps with different Spatial Refrence</title>
      <link>https://community.esri.com/t5/arcgis-api-for-silverlight-questions/problem-switching-between-maps-with-different/m-p/172477#M4277</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Might be an extent issue. You can't keep the current map extent whan changing the map spatialreference.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Try :&lt;/SPAN&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;private void SetMapUrl(string mapUrl)
{
&lt;SPAN style="color:#ff0000;"&gt;&amp;nbsp;&amp;nbsp; MyMap.Layers.Clear();
&amp;nbsp;&amp;nbsp; MyMap.Extent = null;
&lt;/SPAN&gt;&amp;nbsp;&amp;nbsp; ArcGISTiledMapServiceLayer serviceLayer = Resources["ServiceLayer"] as ArcGISTiledMapServiceLayer;
&amp;nbsp;&amp;nbsp; serviceLayer.Url = mapUrl;
&amp;nbsp;&amp;nbsp; MyMap.Layers.Insert(0, serviceLayer);
......
&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 08:55:46 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-silverlight-questions/problem-switching-between-maps-with-different/m-p/172477#M4277</guid>
      <dc:creator>DominiqueBroux</dc:creator>
      <dc:date>2021-12-11T08:55:46Z</dc:date>
    </item>
    <item>
      <title>Re: Problem Switching between maps with different Spatial Refrence</title>
      <link>https://community.esri.com/t5/arcgis-api-for-silverlight-questions/problem-switching-between-maps-with-different/m-p/172478#M4278</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;That worked, Thanks&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Is there a way I can restore the current extent so the user is still zoomed in to the same location?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 12 Apr 2012 18:26:20 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-silverlight-questions/problem-switching-between-maps-with-different/m-p/172478#M4278</guid>
      <dc:creator>TylerRothermund</dc:creator>
      <dc:date>2012-04-12T18:26:20Z</dc:date>
    </item>
    <item>
      <title>Re: Problem Switching between maps with different Spatial Refrence</title>
      <link>https://community.esri.com/t5/arcgis-api-for-silverlight-questions/problem-switching-between-maps-with-different/m-p/172479#M4279</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;That worked, Thanks&lt;BR /&gt;&lt;BR /&gt;Is there a way I can restore the current extent so the user is still zoomed in to the same location? &lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Sure but, as the Spatial Reference is no more the same, you will have to project the old extent in the new SR (at server side with a geometry service or at client side for basic cases).&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 13 Apr 2012 06:46:36 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-silverlight-questions/problem-switching-between-maps-with-different/m-p/172479#M4279</guid>
      <dc:creator>DominiqueBroux</dc:creator>
      <dc:date>2012-04-13T06:46:36Z</dc:date>
    </item>
  </channel>
</rss>

