<?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: Easy way to set the resolution to include all items on a GraphicsLayer in ArcGIS API for Silverlight Questions</title>
    <link>https://community.esri.com/t5/arcgis-api-for-silverlight-questions/easy-way-to-set-the-resolution-to-include-all/m-p/223015#M5598</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;have you tried calling the ZoomTo method of the map with the full extent of the graphics layer?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="plain" name="code"&gt;var graphicsLayer = MyMap.Layers["MyGraphicsLayer"] as GraphicsLayer; MyMap.ZoomTo(graphicsLayer.FullExtent);&lt;/PRE&gt;&lt;DIV style="display:none;"&gt; &lt;/DIV&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Cheers,&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 17 Jan 2012 22:52:07 GMT</pubDate>
    <dc:creator>DaveTimmins</dc:creator>
    <dc:date>2012-01-17T22:52:07Z</dc:date>
    <item>
      <title>Easy way to set the resolution to include all items on a GraphicsLayer</title>
      <link>https://community.esri.com/t5/arcgis-api-for-silverlight-questions/easy-way-to-set-the-resolution-to-include-all/m-p/223014#M5597</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;When the user clicks on a marker I add new items to a map that might be outside of the current extent.&amp;nbsp;&amp;nbsp; Is there an easy way to set the resolution to the smallest value that will still display all the items that have been drawn on a GraphicsLayer?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 17 Jan 2012 18:19:27 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-silverlight-questions/easy-way-to-set-the-resolution-to-include-all/m-p/223014#M5597</guid>
      <dc:creator>TylerRothermund</dc:creator>
      <dc:date>2012-01-17T18:19:27Z</dc:date>
    </item>
    <item>
      <title>Re: Easy way to set the resolution to include all items on a GraphicsLayer</title>
      <link>https://community.esri.com/t5/arcgis-api-for-silverlight-questions/easy-way-to-set-the-resolution-to-include-all/m-p/223015#M5598</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;have you tried calling the ZoomTo method of the map with the full extent of the graphics layer?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="plain" name="code"&gt;var graphicsLayer = MyMap.Layers["MyGraphicsLayer"] as GraphicsLayer; MyMap.ZoomTo(graphicsLayer.FullExtent);&lt;/PRE&gt;&lt;DIV style="display:none;"&gt; &lt;/DIV&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Cheers,&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 17 Jan 2012 22:52:07 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-silverlight-questions/easy-way-to-set-the-resolution-to-include-all/m-p/223015#M5598</guid>
      <dc:creator>DaveTimmins</dc:creator>
      <dc:date>2012-01-17T22:52:07Z</dc:date>
    </item>
    <item>
      <title>Re: Easy way to set the resolution to include all items on a GraphicsLayer</title>
      <link>https://community.esri.com/t5/arcgis-api-for-silverlight-questions/easy-way-to-set-the-resolution-to-include-all/m-p/223016#M5599</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;Hi,&lt;BR /&gt;&lt;BR /&gt;have you tried calling the ZoomTo method of the map with the full extent of the graphics layer?&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;var graphicsLayer = MyMap.Layers["MyGraphicsLayer"] as GraphicsLayer;
MyMap.ZoomTo(graphicsLayer.FullExtent);&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;Cheers,&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks, thats what I was needed.&amp;nbsp; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;My markers are 125px wide and the top right corner is placed on the x/y cordinate, so I ended up using this to make sure the entire marker was visible&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;I had to use some trial an error on the +/- but it seems to work.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;var e&amp;nbsp; = GraphicsLayer.FullExtent;
MyMap.Extent = new Envelope( e.XMin - 4, e.YMin - 1, e.XMax + 4 , e.YMax + 1);&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 10:51:12 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-silverlight-questions/easy-way-to-set-the-resolution-to-include-all/m-p/223016#M5599</guid>
      <dc:creator>TylerRothermund</dc:creator>
      <dc:date>2021-12-11T10:51:12Z</dc:date>
    </item>
  </channel>
</rss>

