<?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 Zoom to Query Result in ArcGIS Viewer for Silverlight Questions</title>
    <link>https://community.esri.com/t5/arcgis-viewer-for-silverlight-questions/zoom-to-query-result/m-p/313942#M906</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I am trying to zoom to the results of a query which is added to my map as a graphics layer. I have been trying numerous ways to get the map to zoom to that layer but can't get it to work. Once the layer is added I have no issues with using the Go To buton to zoom into the layer. I am missing something but I am not sure what. Here is a sample of one way I was trying to accomplish this.&lt;/SPAN&gt;&lt;BR /&gt;&lt;PRE class="plain" name="code"&gt;
string layerID = "Policy";
 Layer zoomlayer = MapApplication.Current.Map.Layers[layerID];
 MapApplication.Current.Map.ZoomTo(zoomlayer.FullExtent.Extent);
&lt;/PRE&gt;&lt;DIV style="display:none;"&gt; &lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 31 Dec 2012 13:36:52 GMT</pubDate>
    <dc:creator>BrianLeroux</dc:creator>
    <dc:date>2012-12-31T13:36:52Z</dc:date>
    <item>
      <title>Zoom to Query Result</title>
      <link>https://community.esri.com/t5/arcgis-viewer-for-silverlight-questions/zoom-to-query-result/m-p/313942#M906</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I am trying to zoom to the results of a query which is added to my map as a graphics layer. I have been trying numerous ways to get the map to zoom to that layer but can't get it to work. Once the layer is added I have no issues with using the Go To buton to zoom into the layer. I am missing something but I am not sure what. Here is a sample of one way I was trying to accomplish this.&lt;/SPAN&gt;&lt;BR /&gt;&lt;PRE class="plain" name="code"&gt;
string layerID = "Policy";
 Layer zoomlayer = MapApplication.Current.Map.Layers[layerID];
 MapApplication.Current.Map.ZoomTo(zoomlayer.FullExtent.Extent);
&lt;/PRE&gt;&lt;DIV style="display:none;"&gt; &lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 31 Dec 2012 13:36:52 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-viewer-for-silverlight-questions/zoom-to-query-result/m-p/313942#M906</guid>
      <dc:creator>BrianLeroux</dc:creator>
      <dc:date>2012-12-31T13:36:52Z</dc:date>
    </item>
    <item>
      <title>Re: Zoom to Query Result</title>
      <link>https://community.esri.com/t5/arcgis-viewer-for-silverlight-questions/zoom-to-query-result/m-p/313943#M907</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;PanTo works with this but ZoomTo does not. ??&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;
MapApplication.Current.Map.PanTo(zoomlayer.FullExtent.Extent);.
&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 14:58:24 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-viewer-for-silverlight-questions/zoom-to-query-result/m-p/313943#M907</guid>
      <dc:creator>BrianLeroux</dc:creator>
      <dc:date>2021-12-11T14:58:24Z</dc:date>
    </item>
    <item>
      <title>Re: Zoom to Query Result</title>
      <link>https://community.esri.com/t5/arcgis-viewer-for-silverlight-questions/zoom-to-query-result/m-p/313944#M908</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Have you tried something like this:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;MapApplication.Current.Map.Extent = zoomLayer.FullExtent;&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 02 Jan 2013 18:23:39 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-viewer-for-silverlight-questions/zoom-to-query-result/m-p/313944#M908</guid>
      <dc:creator>KarenEllett</dc:creator>
      <dc:date>2013-01-02T18:23:39Z</dc:date>
    </item>
    <item>
      <title>Re: Zoom to Query Result</title>
      <link>https://community.esri.com/t5/arcgis-viewer-for-silverlight-questions/zoom-to-query-result/m-p/313945#M909</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;Have you tried something like this:&lt;BR /&gt;&lt;BR /&gt;MapApplication.Current.Map.Extent = zoomLayer.FullExtent;&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;This did not work. Map extent remained the same.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 02 Jan 2013 19:16:14 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-viewer-for-silverlight-questions/zoom-to-query-result/m-p/313945#M909</guid>
      <dc:creator>BrianLeroux</dc:creator>
      <dc:date>2013-01-02T19:16:14Z</dc:date>
    </item>
    <item>
      <title>Re: Zoom to Query Result</title>
      <link>https://community.esri.com/t5/arcgis-viewer-for-silverlight-questions/zoom-to-query-result/m-p/313946#M910</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;NEVER MIND.&amp;nbsp; I FOUND IT.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Based on your suggestion, "MapApplication.Current.Map.PanTo(zoomlayer.FullExtent.Extent);", I am unable to see "Current" under MapApplication nor "Map" after "Current", what do I miss?&amp;nbsp; Thanks&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;ESRIStandardMapApplication1.App.Current.Map.PanTo(graphicOHI.FullExtent.Extent);&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Error message:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;'System.Windows.Application' does not contain a definition for 'Map' and no extension method 'Map' accepting a first argument of type 'System.Windows.Application' could be found (are you missing a using directive or an assembly reference?) C:\Staging\_PROJECTS\ESRIStandardMapApplication1\ESRIStandardMapApplication1\MainPage.xaml.cs 291 65 ESRIStandardMapApplication1&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 20 Feb 2013 12:29:41 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-viewer-for-silverlight-questions/zoom-to-query-result/m-p/313946#M910</guid>
      <dc:creator>YurongTan</dc:creator>
      <dc:date>2013-02-20T12:29:41Z</dc:date>
    </item>
    <item>
      <title>Re: Zoom to Query Result</title>
      <link>https://community.esri.com/t5/arcgis-viewer-for-silverlight-questions/zoom-to-query-result/m-p/313947#M911</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;You have pointed to the wrong assembly.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;This is the full path to the map:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;ESRI.ArcGIS.Client.Extensibility.MapApplication.Current.Map&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 21 Feb 2013 12:14:54 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-viewer-for-silverlight-questions/zoom-to-query-result/m-p/313947#M911</guid>
      <dc:creator>JohanCarlsson</dc:creator>
      <dc:date>2013-02-21T12:14:54Z</dc:date>
    </item>
  </channel>
</rss>

