<?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 with Map.ZoomTo in ArcGIS API for Silverlight Questions</title>
    <link>https://community.esri.com/t5/arcgis-api-for-silverlight-questions/problem-with-map-zoomto/m-p/607816#M15607</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I have ran into this problem, and not sure what the issue is. I am trying to zoom to a county (through a tool), and when I call Map.ZoomTo with the extent of the feature that I want, I get a blank map, and no errors show up (In IE, Firefox, etc). I can zoom back to the map full extent (through a zoom to full extent tool), and the map displays again. However, whenever I try to zoom again (using our zoom tool), the same issue occurs. We have several types of layers in our map (Dynamic, Tiled, ImageService, Graphics), and the Map.ZoomTo function just doesn't work. Any ideas?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I have a reference to the Map in our tool (_Map), and am calling it with the below code:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;_Map.ZoomTo(fs.Features(0).Geometry.Extent)&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I have verified that there is a feature being returned, and I am trying to zoom to the extent of that feature. This is a polygon feature of a county.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 03 Nov 2010 14:33:58 GMT</pubDate>
    <dc:creator>BrentStevener</dc:creator>
    <dc:date>2010-11-03T14:33:58Z</dc:date>
    <item>
      <title>Problem with Map.ZoomTo</title>
      <link>https://community.esri.com/t5/arcgis-api-for-silverlight-questions/problem-with-map-zoomto/m-p/607814#M15605</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 still pretty new to ESRI and Silverlight so please be gentle.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I have a map &amp;lt;esri:Map/&amp;gt; with two layers, the ESRI_StreetMap_World_2D Tiled Map and a local Dynamic map layer.&amp;nbsp; The Tiled map is on top of the Dynamic map.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Initially everything is fine, and all built-in functionality appears to work, zoom, pan etc via the map controls.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;The problem arises the first time I attempt to Query a layer and zoom to the returned extent.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I am using the ESRI.ArcGIS.Client.Tasks.Query class and it appears I am getting back a featureset however once I attempt to ZoomTo it the display goes white.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;If I remove the ESRI Street Map the zoom works correctly.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I thought it had something to do with maybe the tiled map not supporting the extent that I was trying to zoom to (Not sure how to tell), but even turning on the SnapToLevels had no effect.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Any help would be greatly appreciated.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 01 Jul 2010 20:03:50 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-silverlight-questions/problem-with-map-zoomto/m-p/607814#M15605</guid>
      <dc:creator>TeranceEmory</dc:creator>
      <dc:date>2010-07-01T20:03:50Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with Map.ZoomTo</title>
      <link>https://community.esri.com/t5/arcgis-api-for-silverlight-questions/problem-with-map-zoomto/m-p/607815#M15606</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;If everything turns white, its usually because an unhandled exception was thrown. Look in the lower left corner of IE for an indication of an error (and dbl click the error icon to get the problem description)&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 01 Jul 2010 22:30:55 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-silverlight-questions/problem-with-map-zoomto/m-p/607815#M15606</guid>
      <dc:creator>dotMorten_esri</dc:creator>
      <dc:date>2010-07-01T22:30:55Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with Map.ZoomTo</title>
      <link>https://community.esri.com/t5/arcgis-api-for-silverlight-questions/problem-with-map-zoomto/m-p/607816#M15607</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I have ran into this problem, and not sure what the issue is. I am trying to zoom to a county (through a tool), and when I call Map.ZoomTo with the extent of the feature that I want, I get a blank map, and no errors show up (In IE, Firefox, etc). I can zoom back to the map full extent (through a zoom to full extent tool), and the map displays again. However, whenever I try to zoom again (using our zoom tool), the same issue occurs. We have several types of layers in our map (Dynamic, Tiled, ImageService, Graphics), and the Map.ZoomTo function just doesn't work. Any ideas?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I have a reference to the Map in our tool (_Map), and am calling it with the below code:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;_Map.ZoomTo(fs.Features(0).Geometry.Extent)&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I have verified that there is a feature being returned, and I am trying to zoom to the extent of that feature. This is a polygon feature of a county.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 03 Nov 2010 14:33:58 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-silverlight-questions/problem-with-map-zoomto/m-p/607816#M15607</guid>
      <dc:creator>BrentStevener</dc:creator>
      <dc:date>2010-11-03T14:33:58Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with Map.ZoomTo</title>
      <link>https://community.esri.com/t5/arcgis-api-for-silverlight-questions/problem-with-map-zoomto/m-p/607817#M15608</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;It might be a spatial reference issue.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;'ZoomTo' method is expecting a geometry in the same spatial reference than the map.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;What is the spatial reference of your feature?&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;You might also find&amp;nbsp; some infos in this thread: &lt;/SPAN&gt;&lt;BR /&gt;&lt;A href="http://forums.arcgis.com/threads/15209-How-to-zoom-in-a-selected-feature"&gt;http://forums.arcgis.com/threads/15209-How-to-zoom-in-a-selected-feature&lt;/A&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 03 Nov 2010 15:00:42 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-silverlight-questions/problem-with-map-zoomto/m-p/607817#M15608</guid>
      <dc:creator>DominiqueBroux</dc:creator>
      <dc:date>2010-11-03T15:00:42Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with Map.ZoomTo</title>
      <link>https://community.esri.com/t5/arcgis-api-for-silverlight-questions/problem-with-map-zoomto/m-p/607818#M15609</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;First, I was calling Geometry.Extent instead of just using the Geometry object in the Map.ZoomTo method. The reason for this was that when trying to use the normal Geometry object, nothing was done, because of an error that only displayed in IE. &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;The error is because of the spatial reference of the geometry of the returned feature is different than the spatial reference of the map. I believe the Map spatial reference is set to the first layer that has a valid spatial reference, in this case, an ESRI tiled service layer, and I want to zoom into a feature in our layer, which is a dynamic service layer.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;How do I fix this so that the zoom will work?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 03 Nov 2010 15:00:48 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-silverlight-questions/problem-with-map-zoomto/m-p/607818#M15609</guid>
      <dc:creator>BrentStevener</dc:creator>
      <dc:date>2010-11-03T15:00:48Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with Map.ZoomTo</title>
      <link>https://community.esri.com/t5/arcgis-api-for-silverlight-questions/problem-with-map-zoomto/m-p/607819#M15610</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Try by setting the spatial reference of the geometry:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;fs.Features[0].Geometry.SpatialReference = _Map.SpatialReference;
_Map.ZoomTo(fs.Features(0).Geometry)
&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 12 Dec 2021 02:01:24 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-silverlight-questions/problem-with-map-zoomto/m-p/607819#M15610</guid>
      <dc:creator>DominiqueBroux</dc:creator>
      <dc:date>2021-12-12T02:01:24Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with Map.ZoomTo</title>
      <link>https://community.esri.com/t5/arcgis-api-for-silverlight-questions/problem-with-map-zoomto/m-p/607820#M15611</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Doesn't seem to be that easy. Whenever I try to set the geometry spatial reference, it hangs the browser and no execution happens after that (I tried displaying a simple messagebox right after the line, but it never shows). I can see that the spatial references are different (WKID 4326 is map, 26914 is geometry) before I try to set the feature's spatial reference to the map spatial reference.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 03 Nov 2010 15:27:04 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-silverlight-questions/problem-with-map-zoomto/m-p/607820#M15611</guid>
      <dc:creator>BrentStevener</dc:creator>
      <dc:date>2010-11-03T15:27:04Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with Map.ZoomTo</title>
      <link>https://community.esri.com/t5/arcgis-api-for-silverlight-questions/problem-with-map-zoomto/m-p/607821#M15612</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I don't know where are coming your feature from, but if it's coming from a Query you can set the parameter '&lt;/SPAN&gt;&lt;SPAN style="font-size: 2; font-family: Consolas;"&gt;OutSpatialReference' &lt;SPAN style="font-family:Tahoma;"&gt;in order to get geometries in geographical coordinates (WKID=4326).&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family:Tahoma;"&gt;If this is not possible, you might have to project the geometry, the easiest way being by a geometry service.&lt;/SPAN&gt;&lt;BR /&gt; &lt;BR /&gt; &lt;BR /&gt;&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 03 Nov 2010 15:45:55 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-silverlight-questions/problem-with-map-zoomto/m-p/607821#M15612</guid>
      <dc:creator>DominiqueBroux</dc:creator>
      <dc:date>2010-11-03T15:45:55Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with Map.ZoomTo</title>
      <link>https://community.esri.com/t5/arcgis-api-for-silverlight-questions/problem-with-map-zoomto/m-p/607822#M15613</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;That's actually what I was trying, and it looks like that worked. I set the query's OutSpatialReference property to the Map's spatial reference, and then the returned geometry had the same spatial reference, and it worked (after clearing out the pesky browser cache!)&lt;/SPAN&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;
 Dim q As New Query
 ...
 q.ReturnGeometry = True
 q.OutSpatialReference = _Map.SpatialReference
 ...
&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks for the quick responses, looks like it is all working beautifully now!&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 12 Dec 2021 02:01:27 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-silverlight-questions/problem-with-map-zoomto/m-p/607822#M15613</guid>
      <dc:creator>BrentStevener</dc:creator>
      <dc:date>2021-12-12T02:01:27Z</dc:date>
    </item>
  </channel>
</rss>

